Paper The following article is Open access

Quantum homotopy perturbation method for nonlinear dissipative ordinary differential equations

, and

Published 20 December 2021 © 2021 The Author(s). Published by IOP Publishing Ltd on behalf of the Institute of Physics and Deutsche Physikalische Gesellschaft
, , Citation Cheng Xue et al 2021 New J. Phys. 23 123035 DOI 10.1088/1367-2630/ac3eff

Download Article PDF
DownloadArticle ePub

You need an eReader or compatible software to experience the benefits of the ePub3 file format.

1367-2630/23/12/123035

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 epsilon-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/epsilon))), 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 epsilon.

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 [14], Poisson equation [5], Dirac equation [6], heat equation [7], linear ordinary differential equations (ODEs) [811], linear partial ODEs [12, 13] and so on [1416].

However, because of the linearity of quantum mechanics, solving nonlinear equations with quantum computing is challenging, some related algorithms are proposed [1725]. 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 $O(\frac{{T}^{2}q}{{\epsilon}}\enspace \mathrm{p}\mathrm{o}\mathrm{l}\mathrm{y}(\mathrm{log}(nT/{\epsilon})))$ 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 [2830] 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 epsilon-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 $R=\frac{{\Vert}{u}_{\text{in}}{\Vert}{\Vert}{F}_{2}{\Vert}}{\vert \mathrm{R}\mathrm{e}({\lambda }_{1})\vert }$ (here we omit the inhomogeneity term F0 in their definition) and the convergence condition is R < 1. In our work, we define $K=\frac{4{\Vert}{u}_{\text{in}}{\Vert}{\Vert}{F}_{2}{\Vert}}{\vert \mathrm{R}\mathrm{e}({\lambda }_{1})\vert }=4R$, 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 ${\Vert}{u}_{\text{in}}{\Vert}{R}^{c}{(1-{\text{e}}^{\text{Re}({\lambda }_{1})t})}^{c}$ and $\frac{{K}^{c+2}}{1-K}$, respectively. (2) The dependence of our algorithm on the error epsilon and evolution time T in our algorithm is O(T poly(log(1/epsilon))), which is O(T2/epsilon) in [20]. Therefore the complexity of our algorithm is exponentially improved on epsilon compared to [20], the cost of this improvement is a stronger constraint on the problem, i.e. $K< \sqrt{2}/2$ and $\frac{(c+1)\vert \mathrm{R}\mathrm{e}({\lambda }_{1})\vert }{{\Vert}{F}_{2}{\Vert}}\leqslant 1$.

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

Equation (1)

where u, ${u}_{\text{in}}\in {\mathbb{R}}^{n}$, ${F}_{1}\in {\mathbb{R}}^{n\times n}$, ${F}_{2}\in {\mathbb{R}}^{n\times {n}^{2}}$ 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

Equation (2)

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),

Equation (3)

We assume K ⩾ ||uin||, if this is not satisfied, we rescale u to ζu with a suitable constant ζ which keeps $\frac{4{\Vert}{u}_{\text{in}}{\Vert}{\Vert}{F}_{2}{\Vert}}{\vert \mathrm{R}\mathrm{e}({\lambda }_{1})\vert }$ 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)  
    Using homotopy perturbation method to transform equation (1) into equation (6), a series of nonlinear ODEs with variable νi .
  • (b)  
    Embedding equation (6) into equation (8), linear ODEs with variable $\overrightarrow{y}$.
  • (c)  
    Solving equation (8) with quantum algorithm proposed in [9].
  • (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 [2830] for solving equation (1). Using homotopy method, we construct homotopy $\nu (t,p):{\mathbb{R}}^{+}\times [0,1]\to {\mathbb{R}}^{n}$, which satisfies

Equation (4)

Assuming ν is represented as

Equation (5)

Substituting equation (5) into equation (4), then equating the terms with identical powers of p, we have the following equations:

Equation (6)

When p = 1 in equation (4), we have

Equation (7)

The difference between $\tilde{u}$ 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):

Equation (8)

where $\overrightarrow{y}=[{\overrightarrow{y}}_{0},{\overrightarrow{y}}_{1},\dots ,{\overrightarrow{y}}_{c}]$, ${\overrightarrow{y}}_{i}$ satisfies

Equation (9)

where βi represents the number of items in ${\overrightarrow{y}}_{i}$, ${\overrightarrow{y}}_{i,j}$ represents jth item of ${\overrightarrow{y}}_{i}$, it is represented as ${\overrightarrow{y}}_{i,j}={\otimes }_{k=0}^{i}{\nu }_{{a}_{i,j,k}}$, ai,j,k satisfies

Equation (10)

By equation (10), βi satisfies

Equation (11)

We set ${\overrightarrow{y}}_{i,0}={\nu }_{0}^{\otimes i+1},\enspace i=1,2,\dots ,c$, then by equation (6), yin is written as

Equation (12)

We define ${\overrightarrow{a}}_{i,j}=[{a}_{i,j,0},{a}_{i,j,1},\dots ,{a}_{i,j,i}]$, the mapping ${\overrightarrow{a}}_{i,j}{\mapsto}j$ is one-to-one mapping, so we can construct the following two operations

Equation (13)

Equation (14)

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 ${\overrightarrow{y}}_{i}$ is ni+1 βi , so the dimension of $\overrightarrow{y}$ is

Equation (15)

Next we analyze the structure of matrix A. We have

Equation (16)

where ${\nu }_{{a}_{i,j,0}}\otimes \cdots \otimes {\nu }_{{a}_{i,j,k-1}}\otimes {\nu }_{l}\otimes {\nu }_{{a}_{i,j,k}-1-l}\otimes {\nu }_{{a}_{i,j,k+1}}\otimes \cdots \otimes {\nu }_{{a}_{i,j,i}}\in {\overrightarrow{y}}_{i+1}$, so equation (8) can be written as

Equation (17)

Ai,i is ni+1 βi dimensional square matrix, which is represented as

Equation (18)

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 $\overrightarrow{y}(t)$:

Equation (19)

3.3. Quantum linear ODEs algorithm

Thirdly, equation (8) is solved with the quantum algorithm proposed in [9]. $\overrightarrow{y}(t)$ is written as

Equation (20)

We define ${T}_{k}(z){:=}{\sum }_{j=0}^{k}\frac{{z}^{j}}{j!}$. When k is large enough and the evolution time h is relatively short (for example, h ⩽ 1/||A||), we have $\overrightarrow{y}(h)\approx {T}_{k}(Ah)\overrightarrow{y}(0)$. This approximate solution can be used as the initial condition for the next approximation, repeating this procedure m steps we have the approximation of $\overrightarrow{y}(mh)$.

Next we introduce the details of the algorithm proposed in [9]. Let $m,k,p\in {\mathbb{Z}}^{+}$ and define

Equation (21)

where d := m(k + 1) + p, I is an N-dimensional unit matrix. We consider the linear system

Equation (22)

where $\vert {y}_{\text{in}}\rangle \in {\mathbb{C}}^{N},h\in {\mathbb{R}}^{+}$. 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 $\vert x\rangle ={C}_{m,k,p}{(Ah)}^{-1}\vert 0\rangle \left\vert {y}_{\text{in}}\right.\hspace{1.5pt}\rangle $, it can also be written as

Equation (23)

By equation (21), |xi,j ⟩ satisfies

Equation (24)

Then we have

Equation (25)

|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 $\overrightarrow{y}(t)={\text{e}}^{At}{y}_{\text{in}}$ at t = mh.

3.4. Measurement

Finally, we measure some qubit registers of |x⟩ and get a state epsilon-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 epsilon-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

Equation (26)

where $M={\sum }_{j=i}^{c}{\Vert}{u}_{in}{{\Vert}}^{2(i+1)}$. Given Ou defined in equation (2), |yin⟩ can be prepared by querying Ou O(c) times.

Proof. First we prepare

Equation (27)

Then we execute controlled Ou operation $C-{O}_{u}={\sum }_{i=0}^{c}\vert i,0\rangle \langle i,0\vert \otimes {O}_{u}^{\otimes i+1}$ on |ψ⟩,

Equation (28)

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 24.

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(ci), 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

Equation (29)

[c + 1]0 = [0, 1, ..., c] and in this paper, for any $i\in \mathbb{N}$, [i + 1]0 = [0, 1, ..., i]. Then we analyze upper bound of ||Ai,i+1||. We have ${A}_{0,1}{A}_{0,1}^{\text{T}}=\frac{c(c+1)}{2}{F}_{2}{F}_{2}^{\text{T}}$, then ||A0,1|| satisfies

Equation (30)

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 Ij F2Iij , 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,

Equation (31)

Combining equations (29)–(31), ||A|| satisfies

Equation (32)

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 $B(m)={\sum }_{j=0}^{m}{I}_{n}^{j}\otimes {F}_{1}\otimes {I}_{n}^{\otimes m-j}$. Oracles Om,1 and Om,2 are defined as

Equation (33)

where $\overrightarrow{j}={j}_{m}{j}_{m-1}\dots {j}_{1}{j}_{0}$, ji ∈ [n]0. ${g}_{m}(\overrightarrow{j},l)$ represents the column number of lth non-zero element in $\overrightarrow{j}$th row of B(m), ${g}_{m}(\overrightarrow{j},l)$ is also written as ${g}_{m}(\overrightarrow{j},l)={k}_{m}{k}_{m-1}\dots {k}_{0}$, 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

Equation (34)

Generally, we treat the diagonal element of F1 as a non-zero element, so the sparsity of B(m) is (m + 1)cm. ${g}_{m}(\overrightarrow{j},k)$ can be represented as

Equation (35)

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

Equation (36)

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 $B(i)={\sum }_{j=0}^{i}{I}_{n}^{j}\otimes {F}_{1}\otimes {I}_{n}^{\otimes c-i-j}$, 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 ${\sum }_{k=0}^{i}{a}_{i,j,k}$. Consider the lth non-zero bolck unit in jth row of D(i), l is represented as $l={\sum }_{k=0}^{{i}_{1}}{a}_{i,j,k}+{i}_{2}$, where ${i}_{1}\in {[i]}_{0},{i}_{2}\in \mathbb{N}$, the lth non-zero block unit is ${I}^{\otimes {i}_{1}}\otimes {F}_{2}\otimes {I}^{\otimes i-{i}_{1}}$, and the corresponding ${\overrightarrow{a}}_{i+1,{j}^{\prime }}$ is represented as

Equation (37)

j' can be obtained from ${\overrightarrow{a}}_{i+1,{j}^{\prime }}$ with Oa1. The oracle of the non-zero block unit ${I}^{\otimes {i}_{1}}\otimes {F}_{2}\otimes {I}^{\otimes i-{i}_{1}}$ 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

Equation (38)

There are some ancilla qubits to represent $\vert {\overrightarrow{a}}_{i,j}\hspace{1.5pt}\rangle $ and $\vert {\overrightarrow{a}}_{i+1,{j}^{\prime }}\hspace{1.5pt}\rangle $ in the process shown in equation (38). For simplicity, we ignore the compute and uncompute process of $\vert {\overrightarrow{a}}_{i,j}\hspace{1.5pt}\rangle $ and $\vert {\overrightarrow{a}}_{i+1,{j}^{\prime }}\hspace{1.5pt}\rangle $.

The oracle that extracts the non-zero value of Ai,i+1 can also be constructed in a similar process. For any $j\in {[{\beta }_{i}]}_{0}$, $k\in {[{\beta }_{i+1}]}_{0}$, 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 ${I}^{\otimes {i}_{1}}\otimes {F}_{2}\otimes {I}^{\otimes i-{i}_{1}}$, then we use OF22 to extract the elements of the non-zero block unit. The whole process is shown as

Equation (39)

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

Equation (40)

for t ⩾ 0, ||eAt || satisfies

Equation (41)

Proof. We consider A as a c + 1-dimensional block matrix. A is divided into

Equation (42)

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

Equation (43)

Using this formula to expand ${\text{e}}^{(B+C){t}_{0}}$ we obtain

Equation (44)

Clearly, a repetition of this process gives

Equation (45)

where

Equation (46)

and

Equation (47)

Noting that

Equation (48)

Equation (49)

and the matrix $[{\text{e}}^{B(t-{t}_{0})}C]\dots [{\text{e}}^{B({t}_{c-1}-{t}_{c})}C]$ 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,

Equation (50)

By lemma 14, equations (40) and (50),

Equation (51)

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 $h\in {\mathbb{R}}^{+}$ and satisfies ||Ah|| ⩽ 1, $c,m,k,p\in {\mathbb{Z}}^{+}$. When $\frac{(c+1){\Vert}{F}_{2}{\Vert}}{\vert \mathrm{R}\mathrm{e}({\lambda }_{1})\vert }\leqslant 1$, k ⩾ 5 and $\frac{2}{(k+1)!}m(c+1)(c+2)\leqslant 1$, the condition number κC of Cm,k,p (Ah) satisfies

Equation (52)

where e is mathematical constant.

Proof. First we analyze the upper bound of ||Cm,k,p (Ah)−1||, we have

Equation (53)

where $\vert B\rangle ={\sum }_{l=0}^{d}{b}_{l}\vert l\rangle $, |l⟩ represents an N-dimensional state. We define |bl ⟩ := bl |l⟩,

Equation (54)

For any l ∈ [d]0, we define

Equation (55)

We consider two cases: 0 ⩽ l < m(k + 1) and m(k + 1) ⩽ ld.

When 0 ⩽ l < m(k + 1), assuming l = a(k + 1) + b, 0 ⩽ a < m, 0 ⩽ bk. Then based on definition of x, we have

Equation (56)

where $\vert {x}_{i,j}^{l}\rangle =\vert {x}_{i(k+1)+j}^{l}\rangle $ and ${T}_{b,k}(Ah){:=}{\sum }_{j=b}^{k}\frac{b!{(Ah)}^{j-b}}{j!}$. By lemma 15, we have

Equation (57)

by lemma 7, ||eAh(ma−1)|| ⩽ c + 1, then we have

Equation (58)

Therefore,

Equation (59)

By equations (56) and (59), ${\Vert}{x}_{i,j}^{l}{\Vert}$ satisfies

Equation (60)

therefore,

Equation (61)

When m(k + 1) ⩽ ld, assuming l = m(k + 1) + b, 0 ⩽ bp, xi,j satisfies

Equation (62)

then

Equation (63)

From equations (61) and (63), for any |B⟩, ||Cm,k,p (Ah)−1|B⟩|| satisfies

Equation (64)

then

Equation (65)

From lemma 4 in [9], we have

Equation (66)

Therefore, by equations (66) and (65), we have ${\kappa }_{C}\leqslant 2e\sqrt{k}(m(k+1)+p)(c+2)$.

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 $\tilde{u}(t)$ 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 $\tilde{u}(t)={\sum }_{i=0}^{c}{\nu }_{i}(t)$, u(t) represents the exact solution of equation (1). When K < 1 and $c > {\mathrm{log}}_{1/K}\frac{1}{{\epsilon}(1-K)}$, $\tilde{u}(t)$ satisfies

Equation (67)

Proof.  u(t) can be represented as $u(t)={\sum }_{i=0}^{\infty }{\nu }_{i}(t)$, equation (67) is transformed into

Equation (68)

To prove equation (68), we analyze the upper bound of ||νi || defined in equation (6). ${\nu }_{0}(t)={\text{e}}^{{F}_{1}t}{u}_{\text{in}}$, we have

Equation (69)

We define ${K}_{1}=\frac{{\Vert}{u}_{\text{in}}{\Vert}{\Vert}{F}_{2}{\Vert}}{\vert \mathrm{R}\mathrm{e}({\lambda }_{1})\vert }$ and assume when ji, ||νj || satisfies

Equation (70)

Then ||νi+1(t)|| satisfies

Equation (71)

By equations (70) and (71), αi can be defined as

Equation (72)

Equation (72) is the Catalan sequence [37] and satisfies

Equation (73)

Combining equations (3) and (70)–(73), for any $i\in \mathbb{N}$, ||νi (t)|| has the upper bound

Equation (74)

Substituting equation (74) into equation (68), we have

Equation (75)

Therefore, when K < 1 and $c > {\mathrm{log}}_{1/K}\frac{1}{{\epsilon}(1-K)}$, we have ${\Vert}u(t)-\tilde{u}(t){\Vert}\leqslant {\epsilon}$.

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 ${\Vert}{T}_{k}^{j}(A){\Vert}$ 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 $h\in {\mathbb{R}}^{+}$ satisfies ||Ah|| ⩽ 1. When $\frac{2}{(k+1)!}m(c+1)(c+2)\leqslant 1$, we have

Equation (76)

Proof. The exact solution of equation (8) at t = jh is |y(jh)⟩, it is written as

Equation (77)

The solution of equation (22) |xj,0⟩ satisfies

Equation (78)

where ${T}_{k}(Ah)={\sum }_{l=0}^{k}\frac{{(Ah)}^{l}}{l!}$, the initial value satisfies |y(0)⟩ = |x0,0⟩ = |yin⟩. By lemmas 7 and 15, |||y(jh)⟩ − |xj,0⟩|| satisfies

Equation (79)

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 $h\in {\mathbb{R}}^{+}$ satisfies ||Ah|| ⩽ 1. g = maxt∈[0,mh]|||y(t)⟩||/|||y(mh)⟩||, $m,k,p\in {\mathbb{Z}}^{+}$. When (k + 1)! ⩾ 50m(c + 1) (c + 2)g, we have

Equation (80)

Proof. As introduced before, |xm,j ⟩ = |xm,0⟩ for j ∈ [p]0, we define

Equation (81)

and

Equation (82)

We see |x⟩ = |xgood⟩ + |xbad⟩ and ⟨xgood|xbad⟩ = 0, then

Equation (83)

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

Equation (84)

By the definition of g, |||y(ih)⟩|| ⩽ gq for any i ∈ [m − 1]0, then we have

Equation (85)

and

Equation (86)

For any i ∈ [m]0, |xi,j ⟩ = (Ah/j)|xi,j−1⟩, we have

Equation (87)

We have ||Ah|| ⩽ 1, therefore,

Equation (88)

Next, based on $\vert {x}_{i+1,0}\rangle =\vert {x}_{i,0}\rangle +{\sum }_{j=1}^{k}\vert {x}_{i,j}\rangle $, we have

Equation (89)

then

Equation (90)

and

Equation (91)

|||xbad⟩|| satisfies

Equation (92)

The last step of equation (92) is derived from the inequality ${\sum }_{j=1}^{k}\frac{1}{{(j!)}^{2}}\leqslant {I}_{0}(2)-1< 1.28$, where I0(2) < 2.28 a modified Bessel function of the first kind [9]. Combining equations (86) and (92), we have

Equation (93)

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 epsilon-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 $T\in {\mathbb{R}}^{+}$, ${\eta }^{\prime }=K/{\Vert}\tilde{u}(T){\Vert}$. When $K< \sqrt{2}/2$, we have

Equation (94)

Proof. We rearrange the components of $\overrightarrow{y}$,

Equation (95)

where ${\overrightarrow{y}}_{0}^{\prime }={\overrightarrow{y}}_{0}={\sum }_{j=0}^{c}{\nu }_{j}$, when i ⩾ 1, the component of ${\overrightarrow{y}}_{i}^{\prime }$ is represented as ${\nu }_{{a}_{i,0}^{\prime }}\otimes {\nu }_{{a}_{i,1}^{\prime }}\otimes \cdots \otimes {\nu }_{{a}_{i,k}^{\prime }}$, ${a}_{i,j}^{\prime }$ satisfies

Equation (96)

By equation (96), the number of elements in ${\overrightarrow{y}}_{i}^{\prime }$ is 2i − 1. By equations (74) and (96), for any $j\in {[{2}^{i}-1]}_{0}$, we have ${\Vert}{\overrightarrow{y}}_{i,j}^{\prime }{\Vert}\leqslant {K}^{i+1}$. Therefore,

Equation (97)

By equation (97) and ${\Vert}{\overrightarrow{y}}_{0}{\Vert}={\Vert}{\overrightarrow{y}}_{0}^{\prime }{\Vert}={\Vert}\tilde{u}(T){\Vert}=K/{\eta }^{\prime }$, we have

Equation (98)

Equation (99)

Equation (100)

8. Main result

In this section, we give the main result of our work.

Theorem 1. Given n-dimensional nonlinear dissipative ODEs $\frac{\mathrm{d}u}{\mathrm{d}t}={F}_{1}u+{F}_{2}{u}^{\otimes 2}$ defined in equation (1) and construct the linear ODEs $\frac{\mathrm{d}\overrightarrow{y}}{\mathrm{d}t}=A\overrightarrow{y}$ defined in equation (8). Let T > 0, g = maxt∈[0,T]|||y(t)⟩||/|||y(T)⟩||, η = ||uin||/||u(T)||, $c=\lceil {\mathrm{log}}_{1/K}\frac{4{\Vert}{u}_{\text{in}}{\Vert}}{(1-K){\epsilon}\eta }\rceil $. When $K< \sqrt{2}/2$ and $\frac{(c+1){\Vert}{F}_{2}{\Vert}}{\vert \mathrm{R}\mathrm{e}({\lambda }_{1})\vert }\leqslant 1$, there exists a quantum algorithm to produce |uout(T)⟩ which satisfies ||uout(T) − u(T)/||u(T)|||| ⩽ epsilon with Ω(1) success probability. The query complexity of the algorithm for OF1, OF2, Ou is

Equation (101)

The gate complexity of this algorithm is larger than its query complexity by a factor of

Equation (102)

Proof.  Whole process. First we show the whole process of our algorithm. We define η' = ηK/||uin|| and set

Equation (103)

and construct the N-dimensional linear ODEs defined in equation (8)

Equation (104)

We also set h = T/⌈T||A||⌉, m = p = T/h = ⌈T||A||⌉, $k=\lfloor \frac{2\enspace \mathrm{log}({\Omega})}{\mathrm{log}(\mathrm{log}({\Omega}))}\rfloor $, 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

Equation (105)

where d = m(k + 1) + p. |x⟩ can also be represented as

Equation (106)

where $\vert {\bar{x}}_{l}\rangle $ is a normalized state. Assuming the output state of quantum linear system algorithm [2] is

Equation (107)

By theorem 5 in [2], we make $\vert {\bar{x}}^{\prime }\rangle $ satisfies

Equation (108)

Then we execute measurement step discussed in section 3.4 and get a state epsilon-close to |u(T)/||u(T)||⟩ with success probability O((1 − 2K2)/(')2). We can amplify the success probability to Ω(1) with quantum amplitude amplification algorithm [38] by running quantum linear system algorithm $O(g{\eta }^{\prime }/\sqrt{1-2{K}^{2}})$ 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 $\vert \tilde{u}(T)\rangle $ as

Equation (109)

By lemma 9 and our choice of parameter c, we have

Equation (110)

Then by lemma 16 and |||u(T)⟩|| = K/η', we have

Equation (111)

Let S := {m(k + 1), m(k + 1) + 1, ..., m(k + 1) + p}. By lemma 10 and our choice of parameter k, for any lS, we have

Equation (112)

By equation (112) and lemma 16, we have

Equation (113)

By lemma 11, for any lS, we have

Equation (114)

By equations (108) and (114) and lemma 17, we have

Equation (115)

Then, combine equations (113) and (115), we have

Equation (116)

We default αl is small enough, such as αl < 0.5, then by equation (114) and $\delta ={\epsilon}\frac{\sqrt{1-2{K}^{2}}}{30\sqrt{78m}g{\eta }^{\prime }}$, we have

Equation (117)

|y(T)⟩ and $\vert {\bar{x}}_{l}^{\prime }\rangle $ are also written as

Equation (118)

and

Equation (119)

By lemma 12, we have

Equation (120)

By equations (116), (117), (120) and lemma 17, we have

Equation (121)

We notice $\vert {\bar{x}}_{l,0}^{\prime }\rangle $ is the output state of our algorithm, we have $\vert {u}_{\mathrm{o}\mathrm{u}\mathrm{t}}(T)\rangle =\vert {\bar{x}}_{l,0}^{\prime }\rangle $. Combining equations (111) and (121), we have

Equation (122)

On the other hand, caused by solution error, the success probability also changes. By lemma 18, equation (120) and ${\epsilon}\leqslant 0.1\sqrt{1-2{K}^{2}}/{\eta }^{\prime }$, we have

Equation (123)

and

Equation (124)

then

Equation (125)

Therefore, the success probability of our algorithm is

Equation (126)

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

Equation (127)

By lemma 8, the condition number κC of Cm,k,p (Ah) satisfies

Equation (128)

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

Equation (129)

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

Equation (130)

Using amplitude amplification algorithm [38], we repeat the above process $O(1/\sqrt{p})$ times and get $\vert {u}_{\mathrm{o}\mathrm{u}\mathrm{t}}(T)\rangle =\vert {\bar{x}}_{l,0}^{\prime }(T)\rangle $ which satisfies |||uout(T)⟩ − u(T)/||u(T)|||| ⩽ epsilon with Ω(1) success probability.

The query complexity of the whole process for OF1, OF2 and Ou is

Equation (131)

The gate complexity of this algorithm is larger than its query complexity by a factor of

Equation (132)

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/epsilon))). 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/epsilon, so our algorithm provides exponential improvement over the best classical algorithms or previous quantum algorithms in n or epsilon. η 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 $\overrightarrow{y}(T)$ 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 epsilon becomes O(poly(1/epsilon)). Is it possible to optimize the complexity of time-dependent quadratic nonlinear ODEs to O(poly(log(1/epsilon))) is an open question.

On the other hand, homotopy analysis method [39] and its derivatives [4042] 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 1618 are given in [9], we just list them again.

Lemma 13. Let γ ⩾ 1, mN+, when t ⩾ 0, we have

Equation (133)

Proof. We consider two cases: (1) 0 < tm − 1; (2) tm.

When 0 < tm − 1, we can find i ∈ [m − 1]0 which satisfies t ∈ (i, i + 1], then we have

Equation (134)

We define

Equation (135)

It is obvious that $g(t)\leqslant g(\frac{i}{\gamma })$ for 0 < tm − 1. Using Stirling's formula $i!\approx \sqrt{2\pi i}{(\frac{i}{e})}^{i}$, we have

Equation (136)

Therefore,

Equation (137)

When tm, we have

Equation (138)

Similar with the case 0 < tm − 1, we also have

Equation (139)

Therefore, for any t ⩾ 0, we have ${\sum }_{j=0}^{m-1}\frac{{t}^{j}}{j!}{\text{e}}^{-\gamma t}\leqslant m$.

Lemma 14. Let $\gamma ,\beta \in {\mathbb{R}}^{+}$, mN+, when t ⩾ 0 and γ/β ⩾ 1, we have

Equation (140)

Proof. We define t' = βt, γ' = γ/β, then equation (140) is written as

Equation (141)

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, mN+ and satisfy $\frac{2}{(k+1)!}m{\Delta}({\Delta}+1)\leqslant 1$, ${T}_{k}(M)={\sum }_{l=0}^{k}\frac{{(Ah)}^{l}}{l!}$. Then for any l ∈ [m]0, we have

Equation (142)

Proof. When l = 0, ${\Vert}{\text{e}}^{Ml}-{T}_{k}^{l}(M){\Vert}=0$. When l = 1,

Equation (143)

Assuming when ll', we have

Equation (144)

then by ||eMl || ⩽ Δ, we have

Equation (145)

When l = l' + 1,

Equation (146)

Therefore, for any l ∈ [m]0, we have ${\Vert}{\text{e}}^{Ml}-{T}_{k}^{l}(M){\Vert}\leqslant \frac{2}{(k+1)!}l{\Delta}({\Delta}+1)$.

Lemma 16 ([9]). Let |ψ⟩ and |φ⟩ be two vectors such that |||ψ⟩|| ⩾ α > 0 and |||ψ⟩ − |φ⟩|| ⩽ β. Then

Equation (147)

Lemma 17 ([9]). Let $\vert \psi \rangle =\alpha \vert 0\rangle \vert {\psi }_{0}\rangle +\sqrt{1-{\alpha }^{2}}\vert 1\rangle \vert {\psi }_{1}\rangle $ and $\vert \varphi \rangle =\beta \vert 0\rangle \vert {\varphi }_{0}\rangle +\sqrt{1-{\beta }^{2}}\vert 1\rangle \vert {\varphi }_{1}\rangle $, where |ψ0⟩, ψ1⟩, |φ0⟩, |φ1⟩ are unit vectors, and α, β ∈ [0, 1]. Suppose |||ψ⟩ − |φ⟩|| ⩽ δ < α. Then ${\Vert}\vert {\psi }_{0}\rangle -\vert {\varphi }_{0}\rangle {\Vert}\leqslant \frac{2\delta }{\alpha -\delta }$.

Lemma 18 ([9]). Let $\vert \psi \rangle =\alpha \vert 0\rangle \vert {\psi }_{0}\rangle +\sqrt{1-{\alpha }^{2}}\vert 1\rangle \vert {\psi }_{1}\rangle $ and $\vert \varphi \rangle =\beta \vert 0\rangle \vert {\varphi }_{0}\rangle +\sqrt{1-{\beta }^{2}}\vert 1\rangle \vert {\varphi }_{1}\rangle $, where |ψ0⟩, ψ1⟩, |φ0⟩, |φ1⟩ are unit vectors, and α, β ∈ [0, 1]. Suppose |||ψ⟩ − |φ⟩|| ⩽ δ < α. Then βαδ.

Please wait… references are loading.