## Abstract

The Harrow, Hassidim, Lloyd (HHL) algorithm, known as the pioneering algorithm for solving linear equations in quantum computers, is expected to accelerate solving large-scale linear ordinary differential equations (ODEs). To efficiently combine classical and quantum computers for high-cost chemical problems, non-linear ODEs (e.g., chemical reactions) must be linearized to the highest possible accuracy. However, the linearization approach has not been fully established yet. In this study, Carleman linearization was examined to transform nonlinear first-order ODEs of chemical reactions into linear ODEs. Although this linearization theoretically requires the generation of an infinite matrix, the original nonlinear equations can be reconstructed. For the practical use, the linearized system should be truncated with finite size and the extent of the truncation determines analysis precision. Matrix should be sufficiently large so that the precision is satisfied because quantum computers can treat such huge matrix. Our method was applied to a one-variable nonlinear \(\dot{y}=-{y}^{2}\) system to investigate the effect of truncation orders and time step sizes on the computational error. Subsequently, two zero-dimensional homogeneous ignition problems for H_{2}–air and CH_{4}–air gas mixtures were solved. The results revealed that the proposed method could accurately reproduce reference data. Furthermore, an increase in the truncation order improved accuracy with large time-step sizes. Thus, our approach can provide accurate numerical simulations rapidly for complex combustion systems.

## Introduction

Because of the rapidly increasing awareness of global environmental problems, combustion technology requirements have increased considerably. Combustion should be controlled under extreme conditions, such as high pressure, high temperature, and lean-fuel conditions. However, analyzing combustion phenomena under such extreme conditions by using an experimental approach is difficult because of the short characteristic time and nonlinear nature of the phenomena. Therefore, numerical approaches have been proposed for detailed analyses. Numerical analyses of combustion systems under extreme conditions require highly accurate methods with detailed information related to chemical reactions. However, detailed analyses of reactive flow result in high computational costs because of additional numerous variables derived from the chemical reactions and stiffness of different characteristic time of each chemical reaction. The detailed chemical reaction model generally involves 10–1000 chemical species. The characteristic times of fluid dynamics, molecular transport, and chemical reactions differ by approximately 10^{0}–10^{−2}, 10^{−2}–10^{−5}, and 10^{−6}–10^{−12} s for the fluid dynamics time, molecular-transport time, and chemical reaction time scale, respectively^{1}. Furthermore, the dimensional parameters increase the scale of the problems because the thickness of the reaction zones is approximately 10^{−5}–10^{−4} m, whereas the scale of practical combustion systems is 10^{−1}–10^{1} m. Because of the thin reaction zone, the required mesh size for reactive flow problems is approximately 30^{3} times finer than that for nonreactive flow problems^{2}.

A possible approach for overcoming these problems is to develop an efficient method or algorithm to evaluate chemical reaction problems in the framework of classical computers without accuracy loss. On the other hand, powerful machine resources of future quantum computers are expected to be used to solve high-cost chemical problems. Rapid developments have been achieved in both quantum computing hardware and software. IBM has shared its roadmap of the scale of quantum computers and will launch a quantum computer with a capacity of more than 1000 qubits in 2023^{3}. Although utilization of hardware development is limited, quantum machine resources have been used for high-cost problems^{4}. The Harrow, Hassidim, Lloyd (HHL) algorithm is the quantum algorithm to solve linear equations \(A{\varvec{x}}={\varvec{b}}\) with *K* variables within the computational time of *O*(poly(log(*K*))) compared with *O*(*K*) required for the best classical algorithm^{5} (The mathematical background and the concept of the quantum circuit of the HHL algorithm is described in the ESM Appendix).

If any general ordinary equations including combustion problem could be converted into linear equations, we could adopt quantum algorithm to numerical analysis on combustion by using the HHL algorithm. Therefore, the conversion of combustion problem, i.e., general ordinary equations into linear equations is essential for future usage of quantum algorithm to solve combustion problem. The present study focused on adopting the Carleman linearization in combustion problem, in which ordinary equations converted into linear equations. Overall picture of such approach shown in Fig. 1 is a key idea of this study.

The Jacobian matrix is a widely utilized linearization approach in a framework of classical computing. In the Jacobian approach, only the first derivative of the original system is considered. Therefore, the order considered in the linearization process is limited. On the other hand, Carleman linearization is based on the Taylor expansion^{6}. Thus, Carleman linearization theoretically provides a linearized system with infinite orders, which has the same information as the original nonlinear system and allows the determination of the degree of orders to which the analysis is considered. Accordingly, the degree of accuracy considered in the Carleman linearization process can be adjusted based on the nonlinearity of the individual problems and other restrictions. The Carleman linearization method has been widely used in system control^{7,8,9}. There have been some trial studies which have tried to adopt numerical analysis to quantum algorithm on reactive flow problems, such as the application to Burgers equations and primarily pure fluid problems^{10,11}, and Carleman linearization was used to linearize the governing equations for fluid problems. Studies have reported the advantage of stability and precision for explicit discretization for time under large time step size conditions under which conventional control methods easily diverge^{8}. This advantage of Carleman linearization is suitable for quantum computers as the following reason. Classical computers would need to work on pre/post processes to make the best use of quantum computers when quantum computers are in practical use. Under such situations, the communication between quantum and classical would be a bottleneck. The communication issue as well as the way of preparation and measurement of state vector is still open question and they are out of the scope of this study. The Carleman linearization could reduce the frequency of this communication due to large time step sizes. This is why the Carleman linearization will fit the quantum computation. Carleman linearization may exhibit a special advantage for a system that has an infinite order or whose variables are correlated with each other. The major problem with the Carleman approach is the large size of the linearized system (\(O({N}^{k}))\), where \(N\) is the number of variables and \(k\) is the truncation order considered in the linearization procedure, as introduced in the next section with equations. When the number of chemical species is 1000, 10^{3k} number of variables are required for Carleman linearization. This problem was also referred to in a previous study in which the system control methods are compared for nonlinear systems. However, the development and growth of quantum technologies can solve cost-related problems. In summary, our final target is to apply quantum computers using HHL algorithm to numerical analysis on combustion, which requires huge computational costs since it involves nonlinear governing equations of chemical reactions and fluid dynamics. The future vision of quantum computing for combustion are summarized in Fig. 1, and this study focuses on the realization of Carleman linearization for future use of quantum computers. As a trial, a nondimensional reactive system with practical chemical reaction mechanisms, which included multiple elementary reactions and chemical species, was selected in this study.

## Formulation

Chemical kinetics are typically first-order ODEs. Therefore, the governing equations for ODEs are summarized as follows:

where \({\varvec{u}}\) is the system variable vector and \(F({\varvec{u}})\) is a nonlinear function.

In this section, the widely used Jacobian matrix linearization is explained. Next, we explain Carleman linearization. Finally, the differences between the Jacobian and Carleman linearization were explained.

## Linearization using the Jacobian matrix

The governing equations (Eq. 1) can be rewritten with linearization using the Jacobian matrix as follows:

where \(J=\frac{\partial {\varvec{F}}}{\partial {\varvec{u}}}\) is the Jacobian matrix, and \(n\) is the time indicator for the solution vector. By discretizing (Eq. 2) over time, the differential equation can be transformed as follows:

where \(N\) and \(\Delta t\) represent the time step and the time step size, respectively. We compare Eq. (3) with one by Carleman methods.

## Linearization using the Carleman matrix

Next, we briefly explain the formulation of Carleman linearization. Here, \({\varvec{F}}\left({\varvec{x}}\right)\) of Eq. (1) can be transformed as follows:

where superscripts of “\(\otimes\)” represent the Kronecker power, which is expressed as follows:

Equation (1) can be written down with the expression of Eq. (5) in linear expression by using Carleman linearization as follows:

and

where

for \(j\ge 1\). From definition \({A}_{c}\), the matrix has infinite rows and columns, and such an infinite matrix cannot be considered in the simulations. Thus, the matrix should be truncated in the order of \({n}_{t}\), and we can summarize the matrix as follows:

where *n*_{t} is termed as the truncation order hereafter. The number of elements in each row and column of the matrix is \({N}_{x}+{N}_{x}^{2}+{N}_{x}^{3}+\cdots +{N}_{x}^{{n}_{t}}=\frac{{N}_{x}^{{n}_{t}+1}-{N}_{x}}{{N}_{x}-1}\). The final target of this study is the chemical reaction problem. Most elementary reactions involve three chemical species at most. The problem is reduced to an upper triangle matrix as follows:

When linearization is completed, the system is discretized for time using an explicit approach as follows:

Discretization can also be performed using the implicit approach. An \({A}_{c}\) can be assumed as a constant through the time between \(N\) and \(N+1\) with a small time step size as follows:

By comparing the matrices whose inverse matrix is required for Eqs. (3) and (12), both the Jacobian method and Carleman linearization produce similar expressions: \(\left(I-\Delta tJ\right)\) and \((I-\Delta t{A}_{c}^{N})\). The differences in the expression is the solution vectors (\({\varvec{u}}\) and \({\varvec{X}}\)**)** and matrices used (\(J\) and \({A}_{c}\)). The definitions of \({A}_{c}\) and \({\varvec{X}}\) clearly reveal that Carleman linearization involves higher-order elements in terms of the original solution vector \({\varvec{x}}\) to be obtained. An implicit approach was used in this study because of the heavy stiffness caused by the chemical reactions mentioned in the following sections. As mentioned, the system size can be estimated \(O(Nnt )\), and becomes large with a slight increase in the number of variables \(Nx\) or the order of truncation \(nt\). In order to verify our method without other disturbances, the solution vector was obtained on a classical computer; no experiments on quantum devices were carried out. The direct method with LU decomposition was used to obtain the solution vector to avoid iterative operations, which could potentially increase the communication between classical and quantum computers. The sparse matrix solver in the SciPy library in Python was implemented to solve the problem. SageMath^{12} and its library^{13} were used for the Carleman linearization procedure using Python interfaces. Python was used to solve the discretized problem.

## Results and discussion

### Nonlinear sample system

A simple description of the problem is presented first. The target problem is expressed as follows:

This problem was selected because of the simplicity of the formulation with the smallest nonlinearity and the consideration of applying the approach to chemically reactive problems. Only single alpha value was applied in this paper because the change of alpha just affects the duration of decay. The initial condition was chosen to simulate the unreacted state of reactants. The solution to this problem is displayed in Fig. 2. In the first step, Carleman linearization was applied to the problem. The Kronecker power of solution \(y\) is prepared as follows:

The problem is expressed as follows:

where

Because of limited computational resources, the dimensions of the system are truncated in the order of \(n\) during computation. The results are compared with reference data in Fig. 3. The reference data were prepared by Euler methods with a time step size of \(1.0\times {10}^{-10}\). Figure 3 displays the absolute errors between the results obtained by Carleman linearization and reference data. The figure clearly displays that the error reaches its maximum at the initial stage of calculation; when \(y\) changes considerably. To understand the basic characteristics of the system and the linearization approach, the absolute maximum value of the error was investigated by changing the time step size and truncation order of Carleman linearization.

The results are displayed in Fig. 4. The horizontal axes reveal the truncation order of Carleman linearization. The time step sizes were varied among the three figures. The error decreased with a decrease in the time step size. The error becomes negative for truncation order two, which is the same order as the problem, whereas the error is positive with a truncation order larger than two. With a truncation order of more than two, the absolute maximum errors remained almost constant. Furthermore, the absolute maximum errors were almost the same regardless of the truncation order. These results implied that the truncation order is sufficient with the same order as that of the problem.

### First application to chemical reactive systems—H_{2}–air combustion

This study is the first to attempt the H_{2}–air combustion problem. The reaction mechanism was based on the USC-II syngas mechanism^{14}. To minimize the number of chemical species, only hydrogen, oxygen, and related species were extracted from the base mechanisms. Nitrogen was also added as an inert species in air. The extracted species are displayed in the figure. In actual chemical reactive systems, the reaction rate of the chemical reaction is expressed as follows:

where \({X}_{i}(i=A-D)\) is the chemical species involved and can be evaluated as follows:

where \(\dot{{\omega }_{i}}, \left[{X}_{i}\right], {k}_{f} ,\text{ and }{k}_{r}\) are the reaction rate of chemical species \(i\), concentration of chemical species \(i\), reaction rate of the forward reaction, and the reaction rate of the reverse reaction, respectively. In actual combustion reaction mechanisms, the number of chemical species involved is in the range of one to three, which indicates that the third order is the maximum order in the evaluation of the chemical reaction. Multiple elementary reactions, such as (Eq. 14), were considered to investigate the total combustion behavior. As mentioned in the formulation section, we used the implicit method because of its stiffness. Stable solutions were obtained with small time steps. By considering the application to quantum computers in the future, solving a large linear system is preferred to extremely small time steps because quantum machines are powerful for large linear problems, whereas frequent communications are critical. Figure 5 displays the time history of the chemical species in a zero-dimensional reactor with a time step size of \(1.0\times {10}^{-8}\). As displayed in the figure, nine species, including N_{2} as an inert gas, were selected for the H_{2}–O_{2} reactions. The equivalence ratio, initial temperature, and pressure were 0.8, 2000 K, and 1 atm, respectively. These conditions are consistent throughout the following discussions, unless otherwise mentioned. Figure 5 displays the successful evaluation of the chemically reactive system because the overall transition of chemical species and the reaction timing agree.

Similar to the analysis in the previous problem, the effect of the size of the time steps on the simulation error was investigated.

Figure 6 displays the convergence of the time step sizes for two truncation orders. As references for the slopes, lines 10^{2} and 10^{3} are plotted as dashed and dotted lines, respectively. As expected, the decrease in the time step size improved accuracy. With an increase in the truncation order, the convergence of time step sizes improved considerably, particularly for large time steps. The calculation diverged when the time step increased to more than 2.0 × 10^{–8}.

Although obvious evidence was not obtained, the stiffness of the system influenced the limitation of the timesteps.

Figure 7 displays the effect of the truncation order on the computational precision and cost. The matrix size is calculated as \(({N}_{v}^{{n}_{t}+1}-1)/({N}_{v}-1)\), where \({N}_{v}\) and \({n}_{t}\) are the number of variables and the truncation order, respectively, the increase in truncation order by 1 resulted in an increase in the matrix size by a factor of 9. The computational costs increased by a factor of approximately 100, that is, \(O({N}_{v}^{2}\)). An increase in the truncation order had a limited effect on the computational costs for matrix preparation.

### Second application—CH_{4}–air combustion

The zero-dimensional reactor problem with the CH_{4}–air case was evaluated to confirm the validity of the general hydrocarbon problem and the effect of the number of variables. The chemical reaction model was based on San Diego mech^{15}. Only up to a single carbon species was extracted because of the lean-fuel conditions and to minimize computational costs. Thus, 21 species were extracted. The equivalence ratio, initial temperature, and pressure were 0.8, 2000 K, and 1 atm, respectively. The time step size was fixed at \(2.0\times {10}^{-8}\), and a further increase in the time step size (e.g. \(4.0\times {10}^{-8}\)) caused numerical divergence. Figure 8 displays the time history of the chemical species considered. As displayed in the figure, the result of the Carleman approach was delayed. A possible cause of this delay is the approximation \({A}_{c}^{N+1}\approx {A}_{c}^{N}\) in the formulation section around Eq. (12), which will be investigated in the future. Another possible cause of this delay is the insufficient truncation order of Carleman linearization. However, the order cannot be increased because of machine limitations. This discrepancy will be investigated in the future with the temperature-dependent reaction systems.

## Conclusion

In order to utilize the quantum computation resources for large-cost chemical reaction analysis, the nonlinear nature of chemical reactions needs to be linearized for the application of the HHL algorithm, the powerful quantum algorithm for large-scale equations. In this study, the Carleman linearization was applied as a linearization method. The linearization method was evaluated using three simple problems. The results showed the validity and reliability of the proposed approach and implied the potential of using the proposed method in quantum computation of chemical kinetics. In the future, we will focus on evaluating more practical combustion problems.

## Data availability

The program data will be available at https://github.com/takakiba/carlin-chem.git.

## References

Warnatz, J., Maas, U. & Dibble Robert, W.

*Combustion*(Springer, 2006).Kobayashi, T.

*Computational Fluid Dynamics Handbook*(Maruzen, 2003). https://doi.org/10.1007/978-3-540-45363-5Gambetta, J. IBM’s roadmap for scaling quantum technology. https://research.ibm.com/blog/ibm-quantum-roadmap. Accessed March 7, 2023 (2020).

Jordan, S. P. Quantum Algorithm Zoo.

*National Institute of Standards and Technology*https://quantumalgorithmzoo.org. Accessed March 7, 2023 (2021).Harrow, A. W., Hassidim, A. & Lloyd, S. Quantum algorithm for linear systems of equations.

*Phys. Rev. Lett.***103**, 1–15 (2009).Carleman, T. Application de la théorie des équations intégrales linéaires aux systèmes d’équations différentielles non linéaires.

*Acta Math.***59**, 63–87 (1932).Svoronos, S. A., Papageorgiou, D. & Tsiligiannis, C. Discretization of nonlinear control systems via the Carleman linearization.

*Chem. Eng. Sci.***49**, 3263–3267 (1994).Nešić, D., Teel, A. R. & Kokotović, P. V. Sufficient conditions for stabilization of sampled-data nonlinear systems via discrete-time approximations.

*Syst. Control Lett.***38**, 259–270 (1999).Brunton, S. L., Brunton, B. W., Proctor, J. L. & Kutz, J. N. Koopman invariant subspaces and finite linear representations of nonlinear dynamical systems for control.

*PLoS ONE***11**, e0150171 (2016).Liu, J.-P.

*et al.*Efficient quantum algorithm for dissipative nonlinear differential equations.*arXiv.*https://doi.org/10.1073/pnas.2026805118 (2020).Oz, F., Vuppala, R. K. S. S., Kara, K. & Gaitan, F. Solving Burgers’ equation with quantum computing.

*Quantum Inf. Process.***21**, 30 (2022).Developers, T. S. SageMath. https://www.sagemath.org. Accessed March 7, 2023 (2020).

Mforets. carlin. https://github.com/mforets/carlin. https://doi.org/10.5281/zenodo.593563. Accessed March 7, 2023 (2021).

Davis, S. G., Joshi, A. V., Wang, H. & Egolfopoulos, F. An optimized kinetic model of H

_{2}/CO combustion.*Proc. Combust. Inst.***30**, 1283–1292 (2005).Engineering, M. and A. Chemical-kinetic mechanisms for combustion applications.

*University of California at San Diego*http://combustion.ucsd.edu. Accessed March 7, 2023.

## Acknowledgements

This study was partially supported by AICE and JSPS KAKENHI (202111887).

## Author information

### Authors and Affiliations

### Contributions

T.A. and Y.M. developed and validated the proposed method. All authors analyzed the results and reviewed the manuscript.

### Corresponding author

## Ethics declarations

### Competing interests

The authors declare no competing interests.

## Additional information

### Publisher's note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

## Supplementary Information

## Rights and permissions

**Open Access** This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by/4.0/.

## About this article

### Cite this article

Akiba, T., Morii, Y. & Maruta, K. Carleman linearization approach for chemical kinetics integration toward quantum computation.
*Sci Rep* **13**, 3935 (2023). https://doi.org/10.1038/s41598-023-31009-9

Received:

Accepted:

Published:

DOI: https://doi.org/10.1038/s41598-023-31009-9

## Comments

By submitting a comment you agree to abide by our Terms and Community Guidelines. If you find something abusive or that does not comply with our terms or guidelines please flag it as inappropriate.