Abstract
While quantum computing provides an exponential advantage in solving linear differential equations, there are relatively few quantum algorithms for solving nonlinear differential equations. In our work, based on the homotopy perturbation method, we propose a quantum algorithm for solving n-dimensional nonlinear dissipative ordinary differential equations (ODEs). Our algorithm first converts the original nonlinear ODEs into the other nonlinear ODEs which can be embedded into finite-dimensional linear ODEs. Then we solve the embedded linear ODEs with quantum linear ODEs algorithm and obtain a state -close to the normalized exact solution of the original nonlinear ODEs with success probability Ω(1). The complexity of our algorithm is O(gηT poly(log(nT/))), where η, g measure the decay of the solution. Our algorithm provides exponential improvement over the best classical algorithms or previous quantum algorithms in n or .
Export citation and abstract BibTeX RIS
Original content from this work may be used under the terms of the Creative Commons Attribution 4.0 licence. Any further distribution of this work must maintain attribution to the author(s) and the title of the work, journal citation and DOI.
1. Introduction
Nonlinear differential equations appear in many fields, such as fluid dynamics, biology, finance, etc. In general, the analytical solutions of nonlinear differential equations cannot be obtained effectively. Numerical methods are often used to solve nonlinear differential equations. However, when solving high-dimensional nonlinear differential equations, too many computing resources are required, which may exceed the computing power of classic computers. It is important to develop more efficient algorithms for solving nonlinear differential equations.
Quantum computing provides a promising way to speed up the solution of various equations. In recent years many quantum algorithms have been developed to solve various equations, such as system of linear equations [1–4], Poisson equation [5], Dirac equation [6], heat equation [7], linear ordinary differential equations (ODEs) [8–11], linear partial ODEs [12, 13] and so on [14–16].
However, because of the linearity of quantum mechanics, solving nonlinear equations with quantum computing is challenging, some related algorithms are proposed [17–25]. An early quantum algorithm for solving nonlinear ODEs is proposed in [17], but the complexity of the algorithm increases exponentially with the evolution time. In [19], the authors proposed a variational quantum algorithm for solving nonlinear differential equations and demonstrate the algorithm by solving one-dimensional nonlinear Schrodinger equation. However, when the equations become complicated, whether the parameterized quantum circuit used in their work is capable of expressing the solution of the problem and the optimization problem of the parameterized quantum circuit has not yet been concluded. In [20], a quantum algorithm for solving nonlinear dissipative ODEs is constructed based on Carleman linearization [26, 27]. This approach embeds the nonlinear ODEs into linear ODEs and solves the linear ODEs with quantum algorithm. The complexity of their algorithm is and q measures decay of the solution. In [21], nonlinear ODEs are embedded in Hilbert space, and the evolution of nonlinear ODEs is approximated by the evolution of subsystems in large systems.
Homotopy perturbation method [28–30] is a semi-analytical technique for solving linear as well as nonlinear ordinary/partial differential equations. This method, which is a combination of homotopy in topology and classic perturbation techniques, provides us with a convenient way to obtain analytic or approximate solutions for a wide variety of problems arising in different fields, such as Duffing equation [31], nonlinear wave equations [32] and so on.
In our work, we propose a quantum algorithm for solving time-independent quadratic nonlinear dissipative ODEs. The more general nonlinear ODEs can be reduced to the quadratic ODEs by introducing additional variables [33, 34]. Our algorithm uses the homotopy perturbation method to transform the problem into a series of nonlinear ODEs which have a special structure. The transformed nonlinear ODEs can be embedded into linear ODEs with a technique similar to Carleman linearization. Then the linear ODEs are solved with quantum linear ODEs algorithm proposed in [9]. Finally, we measure some qubit registers and obtain a state -close to the normalized exact solution u(T)/||u(T)|| at evolution time T.
Our work is similar with Liu's work [20], here we list some differences: (1) the truncation method is different, our work uses homotopy perturbation method and [20] uses Carleman linearization. The convergence condition of homotopy perturbation method and Carleman linearization are different. Liu et al [20] define (here we omit the inhomogeneity term F0 in their definition) and the convergence condition is R < 1. In our work, we define , the convergence condition is K < 1, the factor '4' is caused by the homotopy perturbation method. By corollary 1 in [20] and lemma 9, the truncation errors of Carleman linearization and homotopy perturbation method decrease exponentially with the truncation order c as and , respectively. (2) The dependence of our algorithm on the error and evolution time T in our algorithm is O(T poly(log(1/))), which is O(T2/) in [20]. Therefore the complexity of our algorithm is exponentially improved on compared to [20], the cost of this improvement is a stronger constraint on the problem, i.e. and .
This paper is organized as follows. Section 2 introduces the quadratic ODEs to be solved. Then we show the details of quantum homotopy perturbation method in section 3. Initial state preparation and oracle construction of matrix A are discussed in section 4. In the following three sections we analyze our method from different aspects: section 5 gives an upper bound of the condition number of the linear system to be solved. Section 6 analyzes the solution error of our method. Section 7 gives a lower bound of success probability. Next, the main result of our work is proved in section 8. Finally, we conclude our work with a discussion of the result and some open problems in section 9.
2. Quadratic ODEs
We focus on an initial value problem described by the n-dimensional quadratic ODEs. The problem to be solved is defined as
where u, , , are time independent sparse matrices. The sparsity of F1, F2 is s, which means the number of non-zero elements in each row or column of F1, F2 does not exceed s. We assume F1 is a normal matrix and the eigenvalues λi of F1 satisfy Re(λn ) ⩽ ⋯ ⩽ Re(λ1) < 0. We also assume oracles OF1, OF2 and Ou are given, OF1, OF2 are used to extract the non-zero position and value of F1, F2 respectively, and |uin⟩ is prepared with Ou . In specific, OF1, OF2 and Ou are defined as
where f1(j, k) and f2(j, k) represent the column number of the kth non-zero element in jth row of F1, F2 respectively, g(j) satisfies f1(j, g(j)) = j, here we treat the diagonal element of F1 as a non-zero element. OF13 is used to construct an oracle of a matrix related to F1, the details are shown in the proof of lemma 5.
We define a parameter K which characterizes the nonlinearity of equation (1),
We assume K ⩾ ||uin||, if this is not satisfied, we rescale u to ζu with a suitable constant ζ which keeps unchanged and makes K ⩾ ||uin||. In this paper we use spectral norm, it means ||⋅|| = ||⋅||2.
3. Quantum homotopy perturbation method
In this section, we give the whole process of quantum homotopy perturbation method for solving equation (1). It contains four steps:
- (a)
- (b)
- (c)
- (d)Measurement.
The following four subsections introduce the details of these four steps.
3.1. Homotopy perturbation method
Firstly, we introduce the process of homotopy perturbation method [28–30] for solving equation (1). Using homotopy method, we construct homotopy , which satisfies
Assuming ν is represented as
Substituting equation (5) into equation (4), then equating the terms with identical powers of p, we have the following equations:
When p = 1 in equation (4), we have
The difference between and u is analyzed in section 6.1.
3.2. Linear embedding
Secondly, equation (6) is embedded into the linear ODEs defined in equation (8):
where , satisfies
where βi represents the number of items in , represents jth item of , it is represented as , ai,j,k satisfies
By equation (10), βi satisfies
We set , then by equation (6), yin is written as
We define , the mapping is one-to-one mapping, so we can construct the following two operations
with O(c)-qubit quantum arithmetic circuit, and the gate complexity is O(poly(c)) [35]. O(poly(c)) will not influence the complexity of our algorithm, so the complexity of Oa1 and Oa2 can be ignored in the following analysis. The dimension of is ni+1 βi , so the dimension of is
Next we analyze the structure of matrix A. We have
where , so equation (8) can be written as
Ai,i is ni+1 βi dimensional square matrix, which is represented as
Ai,i+1 is ni+1 βi × ni+2 βi+1 dimensional matrix, its elements are determined by equation (16). |y(t)⟩ is defined to represent :
3.3. Quantum linear ODEs algorithm
Thirdly, equation (8) is solved with the quantum algorithm proposed in [9]. is written as
We define . When k is large enough and the evolution time h is relatively short (for example, h ⩽ 1/||A||), we have . This approximate solution can be used as the initial condition for the next approximation, repeating this procedure m steps we have the approximation of .
Next we introduce the details of the algorithm proposed in [9]. Let and define
where d := m(k + 1) + p, I is an N-dimensional unit matrix. We consider the linear system
where . After evolving m steps, the approximate solution of k-order Taylor series is obtained, and the solution remains unchanged at p steps. The solution of equation (22) is represented as , it can also be written as
By equation (21), |xi,j ⟩ satisfies
Then we have
|xi,0⟩ is the approximate solution of the system at time ih, i = ∈ {0, 1, 2, ..., m}. |xm,0⟩ = |xm,1⟩ = ⋯ = |xm,p ⟩ is the approximate solution of at t = mh.
3.4. Measurement
Finally, we measure some qubit registers of |x⟩ and get a state -close to the normalized solution of equation (1). The measurement is divided into two steps: (1) measure the first qubit register of |x⟩ which is defined in equation (23), if the result is |m(k + 1) + j⟩, j = 0, 1, ..., p, we have |y(t)⟩ in the second qubit register of |x⟩. (2) Measure the first qubit register of |y(t)⟩ which is defined in equation (19), if the result is |0, 0⟩, we get a state -close to |u(t)/||u(t)||⟩ in the qubit second register of |y(t)⟩.
This measurement step is probabilistic, the success probability is analyzed in section 7.
4. State preparation and oracle construction
In this section, we give the preparation of |yin⟩ and oracle construction of A.
4.1. State preparation
We first discuss the preparation of |yin⟩, the result is shown in lemma 1.
Lemma 1. By equation (12), |yin⟩ is defined as
where . Given Ou defined in equation (2), |yin⟩ can be prepared by querying Ou O(c) times.
Then we execute controlled Ou operation on |ψ⟩,
The query complexity of Ou is O(c).
4.2. Oracle construction of A
Before introducing oracle construction of A, we analyze some features of A, including sparsity, upper bound of ||A|| and eigenvalue of A. The results are shown in lemmas 2–4.
Lemma 2. The sparsity of the matrix A is O(sc2).
Proof. The sparsity Ai,i is (i + 1)sc. The sparsity of A0,1 is sc(c + 1)/2, when i ⩾ 1, the sparsity of Ai,i+1 is max{s(c − i), s(i + 1)}. Therefore, the sparsity of matrix A is O(sc2).
Lemma 3. ||A|| satisfies ||A|| ⩽ (c + 1) (||F1|| + ||F2||).
Proof. By the definition of Ai,i , we have
[c + 1]0 = [0, 1, ..., c] and in this paper, for any , [i + 1]0 = [0, 1, ..., i]. Then we analyze upper bound of ||Ai,i+1||. We have , then ||A0,1|| satisfies
When i ⩾ 1, Ai,i+1 can be regarded as βi × βi+1 dimensional block matrix, each block unit is an ni+1 × ni+2 dimensional matrix and has the form I⊗j ⊗ F2 ⊗ I⊗i−j , j ∈ [i + 1]0. From the structure of Ai,i+1, the number of non-zero block unit in each row or column of Ai,i+1 is no more than c, so Ai,i+1 can be divided into at most c matrices which have only one non-zero block unit in each row or column. Therefore,
Combining equations (29)–(31), ||A|| satisfies
Lemma 4. The eigenvalue γi of matrix A satisfies Re(γi ) < 0, i ∈ [N]0.
Proof. From the structure of A, the eigenvalues of A are the sets of eigenvalues of Ai,i for i ∈ [c + 1]0. The eigenvalue of Ai,i is the sum of i + 1 eigenvalues of F1. For any j ∈ [1, 2, ..., n], eigenvalue of F1 λj satisfies Re(λj ) < 0, so the real part of all eigenvalues of Ai,i is less than 0. Therefore, the eigenvalue γi of A satisfies Re(γi ) < 0, i ∈ [N]0.
Next, we introduce the way to construct oracle OA of A. OA gives the way to extract non-zero element position and value of A. We first give lemma 5.
Lemma 5. Let matrix . Oracles Om,1 and Om,2 are defined as
where , ji ∈ [n]0. represents the column number of lth non-zero element in th row of B(m), is also written as , ki ∈ [n]0. Then Om,1, Om,2 can be constructed by querying OF1 m + 1 times.
Proof. When m = 0, B(0) = F1, O0,1, O0,2 can be constructed by querying OF1 once. Assuming when m ⩾ 1, Oracles Om−1,1, Om−1,2 of B(m − 1) are constructed by querying OF1 m times. B(m) is also written as
Generally, we treat the diagonal element of F1 as a non-zero element, so the sparsity of B(m) is (m + 1)c − m. can be represented as
where f1(j, k) and g(j) are defined in equation (2). Then Om,1 can be constructed with equation (35), the construction process needs to query Om−1,1, OF11, OF13 once each.
On the other hand, the element of B(m) is written as
By equation (36), Om,2 can be constructed by querying Om−1,2 and OF12 once each. Therefore Om,1 and Om,2 can be constructed by querying Om−1,1, Om−1,2, OF11, OF12 and OF13 once each.
From the above analysis, Om,1 and Om,2 can be constructed by querying OF1 m + 1 times.
Lemma 6. The oracle OA of A can be constructed by querying OF1 O(c) times and querying OF2 O(1) times.
Proof. To construct OA , we need to construct oracles of Ai,i and Ai,i+1. We first consider Ai,i , we define , by lemma 5, the oracle of B(i) can be constructed by querying OF1 i + 1 times. By equation (18), the oracle of Ai,i can be constructed by querying oracle of B(i) once.
Next we consider Ai,i+1. When i = 0, A0,1 = [F2, F2, ..., F2], the oracle of A0,1 is constructed by querying OF2 once. When i ⩾ 1, Ai,i+1 is also regarded as βi × βi+1 dimensional block matrix D(i), the dimension of each block unit is ni+1 × ni+2. The number of non-zero block unit in jth row of D(i) is . Consider the lth non-zero bolck unit in jth row of D(i), l is represented as , where , the lth non-zero block unit is , and the corresponding is represented as
j' can be obtained from with Oa1. The oracle of the non-zero block unit is constructed by querying OF2 once. By realizing the above process with quantum circuit, we construct an oracle that extracts the non-zero position of Ai,i+1. The specific implementation process is
There are some ancilla qubits to represent and in the process shown in equation (38). For simplicity, we ignore the compute and uncompute process of and .
The oracle that extracts the non-zero value of Ai,i+1 can also be constructed in a similar process. For any , , we can judge whether D(i)j,k is a non-zero block unit and use lj,k to represent the judgement. If D(i)j,k is a non-zero block unit, we can find i1 and represent it as , then we use OF22 to extract the elements of the non-zero block unit. The whole process is shown as
The query complexity of OF22 in the above process is O(1). Therefore, oracle of Ai,i+1 can be constructed by querying OF2 O(1) times.
After constructing the oracles of Ai,i and Ai,i+1, the oracle of A can be directly constructed by querying oracles of Ai,i and Ai,i+1 once. So the oracle OA can be constructed by querying OF1 O(c) times and querying OF2 O(1) times.
5. Condition number
In this section, we give an upper bound of the condition number of Cm,k,p (Ah) defined in section 3.3. We first analyze the upper bound of ||eAht ||, we have the following lemma.
Lemma 7. Consider the matrix A defined in section 3.2, when
for t ⩾ 0, ||eAt || satisfies
Proof. We consider A as a c + 1-dimensional block matrix. A is divided into
B contains Ai,i , i = 0, 1, ..., c and C contains Ai,i+1, i = 0, 1, ..., c − 1. We analyze the upper bound of ||eAt || according to the method introduced in [36], eAt is written as
Using this formula to expand we obtain
Clearly, a repetition of this process gives
where
and
Noting that
and the matrix is zero because it is the product of c + 1, (c + 1) × (c + 1) strictly upper triangular block matrices and thus, Rc (t) = 0. Hence,
By lemma 14, equations (40) and (50),
Then the upper bound of the condition number κC of Cm,k,p (Ah) is analyzed in lemma 8.
Lemma 8. Consider the matrix Cm,k,p (Ah) defined in section 3.3. Let and satisfies ||Ah|| ⩽ 1, . When , k ⩾ 5 and , the condition number κC of Cm,k,p (Ah) satisfies
where e is mathematical constant.
Proof. First we analyze the upper bound of ||Cm,k,p (Ah)−1||, we have
where , |l⟩ represents an N-dimensional state. We define |bl ⟩ := bl |l⟩,
For any l ∈ [d]0, we define
We consider two cases: 0 ⩽ l < m(k + 1) and m(k + 1) ⩽ l ⩽ d.
When 0 ⩽ l < m(k + 1), assuming l = a(k + 1) + b, 0 ⩽ a < m, 0 ⩽ b ⩽ k. Then based on definition of x, we have
where and . By lemma 15, we have
by lemma 7, ||eAh(m−a−1)|| ⩽ c + 1, then we have
Therefore,
By equations (56) and (59), satisfies
therefore,
When m(k + 1) ⩽ l ⩽ d, assuming l = m(k + 1) + b, 0 ⩽ b ⩽ p, xi,j satisfies
then
From equations (61) and (63), for any |B⟩, ||Cm,k,p (Ah)−1|B⟩|| satisfies
then
6. Solution error
In this section, we analyze the solution error of our algorithm. The error mainly comes from two aspects: (1) homotopy perturbation method truncation error. The solution defined in equation (7) is an approximate solution of equation (1), the error bound is determined by the truncation order c, in section 6.1, we analyze the convergence condition of equation (7) and give the error bound. (2) Linear ODEs solution error. We solve the linear ODEs defined in equation (8) with the quantum algorithm proposed in [9]. This algorithm also generates intermediate error, we analyze the error bound in section 6.2.
6.1. Homotopy perturbation method truncation error
We first analyze homotopy perturbation method truncation error, the result is shown in lemma 9.
Lemma 9. Consider the nonlinear ODEs defined in equation (1), the solution of equation (1) obtained by homotopy perturbation method is written as , u(t) represents the exact solution of equation (1). When K < 1 and , satisfies
Proof. u(t) can be represented as , equation (67) is transformed into
To prove equation (68), we analyze the upper bound of ||νi || defined in equation (6). , we have
We define and assume when j ⩽ i, ||νj || satisfies
Then ||νi+1(t)|| satisfies
By equations (70) and (71), αi can be defined as
Equation (72) is the Catalan sequence [37] and satisfies
Combining equations (3) and (70)–(73), for any , ||νi (t)|| has the upper bound
Substituting equation (74) into equation (68), we have
Therefore, when K < 1 and , we have .
6.2. Linear ODEs solution error
Then we analyze the error of solving the linear ODEs defined in equation (8), we have a similar conclusion with theorem 6 in [9], the difference comes from the upper bound of ||eAj || or in our work is different from their work. Our result is shown in lemma 10.
Lemma 10. Consider the linear ODEs defined in equation (8) and the system of linear equations defined in equation (22). Let satisfies ||Ah|| ⩽ 1. When , we have
Proof. The exact solution of equation (8) at t = jh is |y(jh)⟩, it is written as
The solution of equation (22) |xj,0⟩ satisfies
where , the initial value satisfies |y(0)⟩ = |x0,0⟩ = |yin⟩. By lemmas 7 and 15, |||y(jh)⟩ − |xj,0⟩|| satisfies
7. Success probability
As introduced in section 3.4, there are two probabilistic steps in our method. This section gives a lower bound of the success probability of these two steps. The results are shown in lemmas 11 and 12.
Firstly, we analyze the success probability of getting |xm,i ⟩, i = 0, 1, ..., p when measuring |x⟩. By setting appropriate conditions, lemma 11 gives the same conclusion as theorem 7 in [9].
Lemma 11. Consider the system of linear equations defined in equation (22). Let satisfies ||Ah|| ⩽ 1. g = maxt∈[0,mh]|||y(t)⟩||/|||y(mh)⟩||, . When (k + 1)! ⩾ 50m(c + 1) (c + 2)g, we have
Proof. As introduced before, |xm,j ⟩ = |xm,0⟩ for j ∈ [p]0, we define
and
We see |x⟩ = |xgood⟩ + |xbad⟩ and ⟨xgood|xbad⟩ = 0, then
Next we give a lower bound of |||xm,0⟩|| and an upper bound of |||xbad⟩||. We define q = |||y(mh)⟩||, by lemma 10 and (k + 1)! ⩾ 50m(c + 1) (c + 2)g, we have
By the definition of g, |||y(ih)⟩|| ⩽ gq for any i ∈ [m − 1]0, then we have
and
For any i ∈ [m]0, |xi,j ⟩ = (Ah/j)|xi,j−1⟩, we have
We have ||Ah|| ⩽ 1, therefore,
Next, based on , we have
then
and
|||xbad⟩|| satisfies
The last step of equation (92) is derived from the inequality , where I0(2) < 2.28 a modified Bessel function of the first kind [9]. Combining equations (86) and (92), we have
Secondly, we analyze the success probability of the second probabilistic step. After the first measurement, the desired state is the state |y(T)⟩ defined in equation (19). Then we measure the first qubit register of |y(T)⟩, if the result is |0, 0⟩, we have a state -close to |u(T)/||u(T)||⟩ in the second qubit register of |y(T)⟩. The lower bound of the success probability in this measurement is analyzed in lemma 12.
Lemma 12. Let , . When , we have
Proof. We rearrange the components of ,
where , when i ⩾ 1, the component of is represented as , satisfies
By equation (96), the number of elements in is 2i − 1. By equations (74) and (96), for any , we have . Therefore,
By equation (97) and , we have
8. Main result
In this section, we give the main result of our work.
Theorem 1. Given n-dimensional nonlinear dissipative ODEs defined in equation (1) and construct the linear ODEs defined in equation (8). Let T > 0, g = maxt∈[0,T]|||y(t)⟩||/|||y(T)⟩||, η = ||uin||/||u(T)||, . When and , there exists a quantum algorithm to produce |uout(T)⟩ which satisfies ||uout(T) − u(T)/||u(T)|||| ⩽ with Ω(1) success probability. The query complexity of the algorithm for OF1, OF2, Ou is
The gate complexity of this algorithm is larger than its query complexity by a factor of
Proof. Whole process. First we show the whole process of our algorithm. We define η' = ηK/||uin|| and set
and construct the N-dimensional linear ODEs defined in equation (8)
We also set h = T/⌈T||A||⌉, m = p = T/h = ⌈T||A||⌉, , where Ω = 50m(c + 1) (c + 2)g/δ, so k satisfies (k + 1)! ⩾ Ω. Then we construct the linear system defined in equation (22) and solve the linear system with the algorithm proposed in [2]. The normalized solution of equation (22) is represented as
where d = m(k + 1) + p. |x⟩ can also be represented as
where is a normalized state. Assuming the output state of quantum linear system algorithm [2] is
By theorem 5 in [2], we make satisfies
Then we execute measurement step discussed in section 3.4 and get a state -close to |u(T)/||u(T)||⟩ with success probability O((1 − 2K2)/(gη')2). We can amplify the success probability to Ω(1) with quantum amplitude amplification algorithm [38] by running quantum linear system algorithm times.
Proof of correctness. Then we analyze the error bound and the impact of error on success probability.
Assuming u(T) represents the exact solution. We define as
By lemma 9 and our choice of parameter c, we have
Then by lemma 16 and |||u(T)⟩|| = K/η', we have
Let S := {m(k + 1), m(k + 1) + 1, ..., m(k + 1) + p}. By lemma 10 and our choice of parameter k, for any l ∈ S, we have
By equation (112) and lemma 16, we have
By lemma 11, for any l ∈ S, we have
By equations (108) and (114) and lemma 17, we have
Then, combine equations (113) and (115), we have
We default αl is small enough, such as αl < 0.5, then by equation (114) and , we have
|y(T)⟩ and are also written as
and
By lemma 12, we have
By equations (116), (117), (120) and lemma 17, we have
We notice is the output state of our algorithm, we have . Combining equations (111) and (121), we have
On the other hand, caused by solution error, the success probability also changes. By lemma 18, equation (120) and , we have
and
then
Therefore, the success probability of our algorithm is
Complexity analysis. Finally, we analyze the complexity of our algorithm.
By lemmas 2 and 3, the sparsity of A is c2 s and ||A|| ⩽ (c + 1) (||F1|| + ||F2||). The sparsity sC of Cm,k,p (Ah) satisfies
By lemma 8, the condition number κC of Cm,k,p (Ah) satisfies
By theorem 5 in [2] and equation (108), the query complexity of quantum linear system algorithm to oracle of Cm,k,p (Ah) and |0⟩|yin⟩ is
By the definition of Cm,k,p (Ah), the oracle of Cm,k,p (Ah) can be constructed by querying oracle OA once, by lemma 6, OA is constructed by querying OF1 O(c) times and OF2 O(1) times. By lemma 1, |0⟩|yin⟩ can be prepared by querying Ou O(c) times.
Substituting equations (127)–(129) and considering the choice of all parameters, the query complexity of solving equation (22) for OF1, OF2 and Ou is
Using amplitude amplification algorithm [38], we repeat the above process times and get which satisfies |||uout(T)⟩ − u(T)/||u(T)|||| ⩽ with Ω(1) success probability.
The query complexity of the whole process for OF1, OF2 and Ou is
The gate complexity of this algorithm is larger than its query complexity by a factor of
9. Conclusion and discussion
In this paper, we presented a quantum homotopy perturbation method for solving nonlinear dissipative ODEs. The gate complexity of our algorithm is O(gηT poly(log(nT/))). The complexity of the optimal classical algorithm for solving equation (1) is at least linear with n, the complexity of the algorithm proposed in [20] is linear with 1/, so our algorithm provides exponential improvement over the best classical algorithms or previous quantum algorithms in n or . η and g also affect the complexity of our algorithm, η measures the decay of u(T) and increases exponentially as T increases, g measures the decay of defined in equation (8) and also increases exponentially as T increases. Our algorithm is effective when T is relatively small which makes η and g small enough. η and g are also affected by F2, when T is relatively small, the trend of η and g increasing exponentially with T may not be obvious due to the influence of F2, this case makes our algorithm perform better. Our algorithm has the potential to accelerate the solution of various nonlinear equations, and can be applied to nonlinear problems in various fields, such as fluid dynamics, biology, finance, etc, thereby accelerating the research progress of nonlinear science.
Our algorithm only discusses time-independent homogeneous quadratic nonlinear ODEs. When solving time-dependent nonlinear ODEs, the algorithm proposed in [9] is not suitable, an alternative way is to use the algorithm proposed in [8] to solve the linear ODEs, then the dependence of complexity on error becomes O(poly(1/)). Is it possible to optimize the complexity of time-dependent quadratic nonlinear ODEs to O(poly(log(1/))) is an open question.
On the other hand, homotopy analysis method [39] and its derivatives [40–42] are similar to homotopy perturbation method. Whether we can use quantum computing to accelerate the execution process of homotopy analysis method and thus construct a quantum homotopy analysis method is also a question to be investigated further.
Furthermore, how to induce nonlinearity in quantum computing is a basic problem when solving nonlinear equations with quantum algorithm. A common method is producing multiple copies of the original system, some nonlinear quantum algorithms contain copy process [17, 19, 21]. In [43], a linearization technique of nonlinear classical dynamics based on Koopman–von Neumann method is proposed. [44] summarizes three classical linear embedding techniques, including Carleman embedding(Carleman linearization is also called Carleman embedding) [26, 27], coherent states embedding [27, 45] and position-space embedding [46], and then puts forward the prospects of these linear embedding techniques to construct effective quantum algorithms. An open question is whether there are other ways to induce nonlinearity in quantum computing.
Acknowledgements
This work was supported by the National Key Research and Development Program of China (Grant No. 2016YFA0301700), the National Natural Science Foundation of China (Grants No. 11 625 419), the Strategic Priority Research Program of the Chinese Academy of Sciences (Grant No. XDB24030600), and the Anhui Initiative in Quantum Information Technologies (Grants No. AHY080000).
Data availability statement
No new data were created or analyzed in this study.
: Appendix
In this appendix, we give some lemmas used in proving some conclusions of our work. Lemmas 16–18 are given in [9], we just list them again.
Lemma 13. Let γ ⩾ 1, m ∈ N+, when t ⩾ 0, we have
Proof. We consider two cases: (1) 0 < t ⩽ m − 1; (2) t ⩾ m.
When 0 < t ⩽ m − 1, we can find i ∈ [m − 1]0 which satisfies t ∈ (i, i + 1], then we have
We define
It is obvious that for 0 < t ⩽ m − 1. Using Stirling's formula , we have
Therefore,
When t ⩾ m, we have
Similar with the case 0 < t ⩽ m − 1, we also have
Therefore, for any t ⩾ 0, we have .
Lemma 14. Let , m ∈ N+, when t ⩾ 0 and γ/β ⩾ 1, we have
Proof. We define t' = βt, γ' = γ/β, then equation (140) is written as
By lemma 13, we directly obtain equation (141).
Lemma 15. Given a matrix M satisfies ||M|| ⩽ 1 and ||eMt || ⩽ Δ for any t ⩾ 0. Let k, m ∈ N+ and satisfy , . Then for any l ∈ [m]0, we have
Proof. When l = 0, . When l = 1,
Assuming when l ⩽ l', we have
then by ||eMl || ⩽ Δ, we have
When l = l' + 1,
Therefore, for any l ∈ [m]0, we have .
Lemma 16 ([9]). Let |ψ⟩ and |φ⟩ be two vectors such that |||ψ⟩|| ⩾ α > 0 and |||ψ⟩ − |φ⟩|| ⩽ β. Then
Lemma 17 ([9]). Let and , where |ψ0⟩, ψ1⟩, |φ0⟩, |φ1⟩ are unit vectors, and α, β ∈ [0, 1]. Suppose |||ψ⟩ − |φ⟩|| ⩽ δ < α. Then .
Lemma 18 ([9]). Let and , where |ψ0⟩, ψ1⟩, |φ0⟩, |φ1⟩ are unit vectors, and α, β ∈ [0, 1]. Suppose |||ψ⟩ − |φ⟩|| ⩽ δ < α. Then β ⩾ α − δ.