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 100–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, respectively1. 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–101 m. Because of the thin reaction zone, the required mesh size for reactive flow problems is approximately 303 times finer than that for nonreactive flow problems2.

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 20233. Although utilization of hardware development is limited, quantum machine resources have been used for high-cost problems4. 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 algorithm5 (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.

Figure 1
figure 1

The overall picture of the future effective usage of classical and quantum computers for combustion analysis with the HHL algorithm and the Carleman linearization.

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 expansion6. 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 control7,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 problems10,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 diverge8. 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, 103k 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:

$$\frac{\text{d}{\varvec{u}}}{\text{dt}}={\varvec{F}}\left({\varvec{u}}\right),$$
(1)

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:

$$\begin{aligned} \frac{{{\text{d}}{\varvec{u}}}}{{{\text{dt}}}} & = {\varvec{F}}\left({\varvec{u}} \right) \\ & \approx {\varvec{F}}\left( {{\varvec{u}}^{n} } \right) + \left( {\frac{{\partial {\varvec{F}}}}{{\partial {\varvec{u}}}}} \right)^{n} \left( {{\varvec{u}} - {\varvec{u}}^{n} } \right) \\ & = {\varvec{F}}\left( {{\varvec{u}}^{n} } \right) + J^{n} ({\varvec{u}} - {\varvec{u}}^{n} ), \\ \end{aligned}$$
(2)

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:

$$\begin{aligned} & \frac{{{\varvec{u}}^{{N + 1}} - {\varvec{u}}^{N} }}{{\Delta t}} = {\varvec{F}}\left( {{\varvec{u}}^{N} } \right) + J^{N} \left( {{\varvec{u}}^{{N + 1}} - {\varvec{u}}^{N} } \right) \\ & \left( {I - \Delta tJ^{N} } \right){\varvec{u}}^{{N + 1}} = \left( {I - \Delta tJ^{N} } \right){\varvec{u}}^{N} + \Delta t{\varvec{F}}\left( {{\varvec{u}}^{N} } \right), \\ & {\varvec{u}}^{{N + 1}} = {\varvec{u}}^{N} + \left( {I - \Delta tJ^{N} } \right)^{{ - 1}} \Delta t{\varvec{F}}\left( {{\varvec{u}}^{N} } \right), \\ \end{aligned}$$
(3)

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:

$${\varvec{F}}\left({\varvec{x}}\right)=\sum_{i}{A}_{i}{{\varvec{x}}}^{\otimes i},$$
(4)

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

$$\begin{aligned} & {\varvec{x}}^{{ \otimes 1}} = {\varvec{x}}, \\ & {\varvec{x}}^{{ \otimes n}} = {\varvec{x}} \otimes {\varvec{x}}^{{ \otimes n - 1}} = {\varvec{x}}^{{ \otimes n - 1}} \otimes {\varvec{x}}. \\ \end{aligned}$$
(5)

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

$$\frac{\text{d}{\varvec{X}}}{\text{dt}}={A}_{c}{\varvec{X}}, {\varvec{X}}=\left(\begin{array}{c}{\varvec{x}}\\ {{\varvec{x}}}^{\otimes 2}\\ \vdots \\ {{\varvec{x}}}^{\otimes n}\\ \vdots \end{array}\right),$$
(6)

and

$${A}_{c}=\left(\begin{array}{cccccccc}{A}_{1}^{1}& {A}_{2}^{1}& {A}_{3}^{1}& \cdots & {A}_{n}^{1}& {A}_{n+1}^{1}& {A}_{n+2}^{1}& \cdots \\ & {A}_{1}^{2}& {A}_{2}^{2}& \cdots & {A}_{n-1}^{2}& {A}_{n}^{2}& {A}_{n+1}^{2}& \cdots \\ & & {A}_{1}^{3}& & \cdots & & {A}_{n}^{3}& \cdots \\ & & & \ddots & & & & \vdots \end{array}\right),$$
(7)

where

$$\begin{aligned} & A_{j}^{1} = A_{j} , \\ & A_{j}^{i} = A_{j}^{1} \otimes I^{{ \otimes i - 1}} + I \otimes A_{j}^{{i - 1}} \left( {i \ge 2} \right), \\ \end{aligned}$$
(8)

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:

$${A}_{c}=\left(\begin{array}{ccccc}{A}_{1}^{1}& {A}_{2}^{1}& {A}_{3}^{1}& \cdots & {A}_{{n}_{t}}^{1}\\ & {A}_{1}^{2}& {A}_{2}^{2}& \cdots & {A}_{{n}_{t}-1}^{2}\\ & & {A}_{1}^{3}& & {A}_{{n}_{t}-2}^{3}\\ & & & \ddots & \vdots \\ & & & & {A}_{1}^{{n}_{t}}\end{array}\right), {\varvec{X}}=\left(\begin{array}{c}{\varvec{x}}\\ {{\varvec{x}}}^{\otimes 2}\\ \vdots \\ {{\varvec{x}}}^{\otimes {n}_{t}}\end{array}\right),$$
(9)

where nt 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:

$${A}_{c}=\left(\begin{array}{cccccc}{A}_{1}^{1}& {A}_{2}^{1}& {A}_{3}^{1}& & & O\\ & {A}_{1}^{2}& {A}_{2}^{2}& {A}_{3}^{2}& & \\ & & {A}_{1}^{3}& {A}_{2}^{3}& {A}_{3}^{3}& \\ & & & \ddots & \ddots & \ddots \\ O& & & & & {A}_{1}^{{n}_{t}}\end{array}\right).$$
(10)

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

$$\begin{aligned} & \frac{{{\varvec{X}}^{{N + 1}} - {\varvec{X}}^{N} }}{{\Delta t}} = A_{c}^{N} {\varvec{X}}^{N} , \\ & {\varvec{X}}^{{N + 1}} = \left( {I + \Delta tA_{c}^{N} } \right){\varvec{X}}^{N} . \\ \end{aligned}$$
(11)

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:

$$\begin{aligned} & \frac{{{\varvec{X}}^{{N + 1}} - {\varvec{X}}^{N} }}{{\Delta t}} = A_{c}^{{N + 1}} {\varvec{X}}^{{N + 1}} \approx A_{c}^{N} {\varvec{X}}^{{N + 1}} , \\ & \left( {I - \Delta tA_{c}^{N} } \right){\varvec{X}}^{{N + 1}} = {\varvec{X}}^{N} , \\ & {\varvec{X}}^{{N + 1}} = \left( {I - \Delta tA_{c}^{N} } \right)^{{ - 1}} {\varvec{X}}^{N} . \\ \end{aligned}$$
(12)

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. SageMath12 and its library13 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:

$$\begin{aligned} & \frac{{{\text{d}}y}}{{{\text{dt}}}} = - \alpha y^{2} \\ & y\left( {t = 0} \right) = 1.0 \\ & \alpha = 1.0 \\ \end{aligned}$$
(13)

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:

Figure 2
figure 2

Simple nonlinear problem example and solution.

$${\varvec{Y}}={\left(y, {y}^{2}, {y}^{3}, \cdots , {y}^{n}, \cdots \right)}^{T}$$
(14)

The problem is expressed as follows:

$$\frac{\text{d}{\varvec{Y}}}{\text{dt}}={A}_{c}{\varvec{Y}}$$
(15)

where

$$\begin{aligned} A_{c} & = \left( {\begin{array}{*{20}c} {A_{1}^{1} } & {A_{2}^{1} } & {A_{3}^{1} } & {A_{4}^{1} } & \cdots & {A_{n}^{1} } & {A_{{n + 1}}^{1} } & \cdots \\ {} & {A_{1}^{2} } & {A_{2}^{2} } & {A_{3}^{2} } & \cdots & {A_{{n - 1}}^{2} } & {A_{n}^{2} } & \cdots \\ {} & {} & \ddots & {} & {} & {} & \vdots & {} \\ {} & {} & {} & {} & {} & {A_{1}^{n} } & {A_{n}^{2} } & \cdots \\ {} & {} & {} & {} & {} & {} & \ddots & {} \\ \end{array} } \right) \\ & = \left( {\begin{array}{*{20}c} 0 & { - \alpha } & 0 & 0 & \cdots & 0 & 0 & \cdots \\ {} & 0 & { - 2\alpha } & 0 & \cdots & 0 & 0 & \cdots \\ {} & {} & \ddots & {} & {} & {} & \vdots & {} \\ {} & {} & {} & {} & {} & 0 & { - n\alpha } & \cdots \\ {} & {} & {} & {} & {} & {} & \ddots & {} \\ \end{array} } \right) \\ \end{aligned}$$

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.

Figure 3
figure 3

(Top) The comparison of result by Carleman linearization (cross) and reference data by explicit approach (line) for simple nonlinear problems (Eq. (13)) and (bottom) the error between the two approaches (vertical axis reversed to make the maximum absolute value clear).

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.

Figure 4
figure 4

Effect of truncation orders and time step sizes on the maximum or minimum absolute value. The representative absolute error is defined as the maximum or minimum absolute error, whichever has the higher maximum absolute value.

First application to chemical reactive systems—H2–air combustion

This study is the first to attempt the H2–air combustion problem. The reaction mechanism was based on the USC-II syngas mechanism14. 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:

$${X}_{A} + {X}_{B} \leftrightarrow {X}_{C} + {X}_{D}$$
(16)

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

$$\begin{aligned} & \mathop {\omega _{A} }\limits^{.} = k_{f} \left[ {X_{A} } \right]\left[ {X_{B} } \right] - k_{r} \left[ {X_{C} } \right]\left[ {X_{D} } \right], \\ & \mathop {\omega _{B} }\limits^{.} = k_{f} \left[ {X_{A} } \right]\left[ {X_{B} } \right] - k_{r} \left[ {X_{C} } \right]\left[ {X_{D} } \right], \\ & \mathop {\omega _{C} }\limits^{.} = - k_{f} \left[ {X_{A} } \right]\left[ {X_{B} } \right] + k_{r} \left[ {X_{C} } \right]\left[ {X_{D} } \right], \\ & \mathop {\omega _{D} }\limits^{.} = - k_{f} \left[ {X_{A} } \right]\left[ {X_{B} } \right] + k_{r} [X_{C} ][X_{D} ]. \\ \end{aligned}$$
(17)

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 N2 as an inert gas, were selected for the H2–O2 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.

Figure 5
figure 5

Comparison of the results by Carleman linearization (symbols) and reference by Cantera (lines) for nondimensional iso-thermic transient reactor system of H2–air combustion. The time histories of each chemical species were shown under the constant temperature (2000 K) and pressure (1 atm) condition.

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 102 and 103 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.

Figure 6
figure 6

Effect of the truncation order and the time step sizes on the convergence for each species in Fig. 4. The figure illustrates how the computational precision improve with the decrease of the time step size.

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.

Figure 7
figure 7

Estimation of the effect of truncation order on computational costs. The figure displays the increase of the truncation order by 1 caused significant increase of computational costs.

Second application—CH4–air combustion

The zero-dimensional reactor problem with the CH4–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 mech15. 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.

Figure 8
figure 8

Comparison of the results by Carleman linearization (symbols) and reference by Cantera (lines) for nondimensional iso-thermic transient reactor system of CH4–air combustion. The time histories of each chemical species were shown under the constant temperature (2000 K) and pressure (1 atm) condition.

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.