This paper was converted on www.awesomepapers.org from LaTeX by an anonymous user.
Want to know more? Visit the Converter page.

Efficient quantum algorithm for
dissipative nonlinear differential equations

Jin-Peng Liu1,2,3  Herman Øie Kolden4,5  Hari K. Krovi6
Nuno F. Loureiro5  Konstantina Trivisa3,7  Andrew M. Childs1,2,8
1 Joint Center for Quantum Information and Computer Science, University of Maryland, MD 20742, USA
2 Institute for Advanced Computer Studies, University of Maryland, MD 20742, USA
3 Department of Mathematics, University of Maryland, MD 20742, USA
4 Department of Physics, Norwegian University of Science and Technology, NO-7491 Trondheim, Norway
5 Plasma Science and Fusion Center, Massachusetts Institute of Technology, MA 02139, USA
6 Raytheon BBN Technologies, MA 02138, USA
7 Institute for Physical Science and Technology, University of Maryland, MD 20742, USA
8 Department of Computer Science, University of Maryland, MD 20742, USA
Abstract

Nonlinear differential equations model diverse phenomena but are notoriously difficult to solve. While there has been extensive previous work on efficient quantum algorithms for linear differential equations, the linearity of quantum mechanics has limited analogous progress for the nonlinear case. Despite this obstacle, we develop a quantum algorithm for dissipative quadratic nn-dimensional ordinary differential equations. Assuming R<1\operatorname{R}<1, where R\operatorname{R} is a parameter characterizing the ratio of the nonlinearity and forcing to the linear dissipation, this algorithm has complexity T2qpoly(logT,logn,log1/ϵ)/ϵT^{2}q\operatorname{poly}(\log T,\log n,\log 1/\epsilon)/\epsilon, where TT is the evolution time, ϵ\epsilon is the allowed error, and qq measures decay of the solution. This is an exponential improvement over the best previous quantum algorithms, whose complexity is exponential in TT. While exponential decay precludes efficiency, driven equations can avoid this issue despite the presence of dissipation. Our algorithm uses the method of Carleman linearization, for which we give a novel convergence theorem. This method maps a system of nonlinear differential equations to an infinite-dimensional system of linear differential equations, which we discretize, truncate, and solve using the forward Euler method and the quantum linear system algorithm. We also provide a lower bound on the worst-case complexity of quantum algorithms for general quadratic differential equations, showing that the problem is intractable for R2\operatorname{R}\geq\sqrt{2}. Finally, we discuss potential applications, showing that the R<1\operatorname{R}<1 condition can be satisfied in realistic epidemiological models and giving numerical evidence that the method may describe a model of fluid dynamics even for larger values of R\operatorname{R}.

1 Introduction

Models governed by both ordinary differential equations (ODEs) and partial differential equations (PDEs) arise extensively in natural and social science, medicine, and engineering. Such equations characterize physical and biological systems that exhibit a wide variety of complex phenomena, including turbulence and chaos.

We focus here on differential equations with nonlinearities that can be expressed with quadratic polynomials. Note that polynomials of degree higher than two, and even more general nonlinearities, can be reduced to the quadratic case by introducing additional variables [35, 30]. The quadratic case also directly includes many archetypal models, such as the logistic equation in biology, the Lorenz system in atmospheric dynamics, and the Navier–Stokes equations in fluid dynamics.

Quantum algorithms offer the prospect of rapidly characterizing the solutions of high-dimensional systems of linear ODEs [7, 9, 19] and PDEs [22, 15, 43, 23, 20, 28, 40]. Such algorithms can produce a quantum state proportional to the solution of a sparse (or block-encoded) nn-dimensional system of linear differential equations in time poly(logn)\operatorname{poly}(\log n) using the quantum linear system algorithm [32].

Early work on quantum algorithms for differential equations already considered the nonlinear case [39]. It gave a quantum algorithm for ODEs that simulates polynomial nonlinearities by storing multiple copies of the solution. The complexity of this approach is polynomial in the logarithm of the dimension but exponential in the evolution time, scaling as O(1/ϵT)O(1/\epsilon^{T}) due to exponentially increasing resources used to maintain sufficiently many copies of the solution to represent the nonlinearity throughout the evolution.

Recently, heuristic quantum algorithms for nonlinear ODEs have been studied. Reference [34] explores a linearization technique known as the Koopman–von Neumann method that might be amenable to the quantum linear system algorithm. In [27], the authors provide a high-level description of how linearization can help solve nonlinear equations on a quantum computer. However, neither paper makes precise statements about concrete implementations or running times of quantum algorithms. The recent preprint [41] also describes a quantum algorithm to solve a nonlinear ODE by linearizing it using a different approach from the one taken here. However, a proof of correctness of their algorithm involving a bound on the condition number and probability of success is not given. The authors also do not describe how barriers such as those of [21] could be avoided in their approach.

While quantum mechanics is described by linear dynamics, possible nonlinear modifications of the theory have been widely studied. Generically, such modifications enable quickly solving hard computational problems (e.g., solving unstructured search among nn items in time poly(logn)\operatorname{poly}(\log n)), making nonlinear dynamics exponentially difficult to simulate in general [2, 1, 21]. Therefore, constructing efficient quantum algorithms for general classes of nonlinear dynamics has been considered largely out of reach.

In this article, we design and analyze a quantum algorithm that overcomes this limitation using Carleman linearization [16, 37, 30]. This approach embeds polynomial nonlinearities into an infinite-dimensional system of linear ODEs, and then truncates it to obtain a finite-dimensional linear approximation. The Carleman method has previously been used in the analysis of dynamical systems [49, 3, 42] and the design of control systems [13, 46, 31], but to the best of our knowledge it has not been employed in the context of quantum algorithms. We discretize the finite ODE system in time using the forward Euler method and solve the resulting linear equations with the quantum linear system algorithm [32, 18]. We control the approximation error of this approach by combining a novel convergence theorem with a bound for the global error of the Euler method. Furthermore, we provide an upper bound for the condition number of the linear system and lower bound the success probability of the final measurement. Subject to the condition R<1\operatorname{R}<1, where the quantity R\operatorname{R} (defined in Problem 1 below) characterizes the relative strength of the nonlinear and dissipative linear terms, we show that the total complexity of this quantum Carleman linearization algorithm is sT2qpoly(logT,logn,log1/ϵ)/ϵsT^{2}q\operatorname{poly}(\log T,\log n,\log 1/\epsilon)/\epsilon, where ss is the sparsity, TT is the evolution time, qq quantifies the decay of the final solution relative to the initial condition, nn is the dimension, and ϵ\epsilon is the allowed error (see Theorem 1). In the regime R<1\operatorname{R}<1, this is an exponential improvement over [39], which has complexity exponential in TT.

Note that the solution cannot decay exponentially in TT for the algorithm to be efficient, as captured by the dependence of the complexity on qq—a known limitation of quantum ODE algorithms [9]. For homogeneous ODEs with R<1R<1, the solution necessarily decays exponentially in time (see equation (4.11)), so the algorithm is not asymptotically efficient. However, even for solutions with exponential decay, we still find an improvement over the best previous result O(1/ϵT)O(1/\epsilon^{T}) [39] for sufficiently small ϵ\epsilon. Thus our algorithm might provide an advantage over classical computation for studying evolution for short times. More significantly, our algorithm can handle inhomogeneous quadratic ODEs, for which it can remain efficient in the long-time limit since the solution can remain asymptotically nonzero (for an explicit example, see the discussion just before the proof of Lemma 2), or can decay slowly (i.e., qq can be poly(T)\operatorname{poly}(T)). Inhomogeneous equations arise in many applications, including for example the discretization of PDEs with nontrivial boundary conditions.

We also provide a quantum lower bound for the worst-case complexity of simulating strongly nonlinear dynamics, showing that the algorithm’s condition R<1\operatorname{R}<1 cannot be significantly improved in general (Theorem 2). Following the approach of [2, 21], we construct a protocol for distinguishing two states of a qubit driven by a certain quadratic ODE. Provided R2\operatorname{R}\geq\sqrt{2}, this procedure distinguishes states with overlap 1ϵ1-\epsilon in time poly(log(1/ϵ))\operatorname{poly}(\log(1/\epsilon)). Since nonorthogonal quantum states are hard to distinguish, this implies a lower bound on the complexity of the quantum ODE problem.

Our quantum algorithm could potentially be applied to study models governed by quadratic ODEs arising in biology and epidemiology as well as in fluid and plasma dynamics. In particular, the celebrated Navier–Stokes equation with linear damping, which describes many physical phenomena, can be treated by our approach provided the Reynolds number is sufficiently small. We also note that while the formal validity of our arguments assumes R<1R<1, we find in one numerical experiment that our proposed approach remains valid for larger RR (see Section 6).

We emphasize that, as in related quantum algorithms for linear algebra and differential equations, instantiating our approach requires an implicit description of the problem that allows for efficient preparation of the initial state and implementation of the dynamics. Furthermore, since the output is encoded in a quantum state, readout is restricted to features that can be revealed by efficient quantum measurements. More work remains to understand how these methods might be applied, as we discuss further in Section 7.

The remainder of this paper is structured as follows. Section 2 introduces the quantum quadratic ODE problem. Section 3 presents the Carleman linearization procedure and describes its performance. Section 4 gives a detailed analysis of the quantum Carleman linearization algorithm. Section 5 establishes a quantum lower bound for simulating quadratic ODEs. Section 6 describes how our approach could be applied to several well-known ODEs and PDEs and presents numerical results for the case of the viscous Burgers equation. Finally, we conclude with a discussion of the results and some possible future directions in Section 7.

2 Quadratic ODEs

We focus on an initial value problem described by the nn-dimensional quadratic ODE

dudt=F2u2+F1u+F0(t),u(0)=uin.\frac{\mathrm{d}{u}}{\mathrm{d}{t}}=F_{2}u^{\otimes 2}+F_{1}u+F_{0}(t),\qquad u(0)=u_{\mathrm{in}}. (2.1)

Here u=[u1,,un]Tnu=[u_{1},\ldots,u_{n}]^{T}\in{\mathbb{R}}^{n}, u2=[u12,u1u2,,u1un,u2u1,,unun1,un2]Tn2u^{\otimes 2}=[u_{1}^{2},u_{1}u_{2},\ldots,u_{1}u_{n},u_{2}u_{1},\ldots,u_{n}u_{n-1},u_{n}^{2}]^{T}\in{\mathbb{R}}^{n^{2}}, each uj=uj(t)u_{j}=u_{j}(t) is a function of tt on the interval [0,T][0,T] for j[n]{1,,n}j\in[{n}]\coloneqq\{1,\ldots,n\}, F2n×n2F_{2}\in{\mathbb{R}}^{n\times n^{2}}, F1n×nF_{1}\in{\mathbb{R}}^{n\times n} are time-independent matrices, and the inhomogeneity F0(t)nF_{0}(t)\in{\mathbb{R}}^{n} is a C1C^{1} continuous function of tt. We let \|\cdot\| denote the spectral norm.

The main computational problem we consider is as follows.

Problem 1.

In the quantum quadratic ODE problem, we consider an nn-dimensional quadratic ODE as in (2.1). We assume F2F_{2}, F1F_{1}, and F0F_{0} are ss-sparse (i.e., have at most ss nonzero entries in each row and column), F1F_{1} is diagonalizable, and that the eigenvalues λj\lambda_{j} of F1F_{1} satisfy Re(λn)Re(λ1)<0\mathop{\mathrm{Re}}{(\lambda_{n})}\leq\cdots\leq\mathop{\mathrm{Re}}{(\lambda_{1})}<0. We parametrize the problem in terms of the quantity

R1|Re(λ1)|(uinF2+F0uin).\operatorname{R}\coloneqq\frac{1}{|\mathop{\mathrm{Re}}{(\lambda_{1})}|}\biggl{(}\|u_{\mathrm{in}}\|\|F_{2}\|+\frac{\|F_{0}\|}{\|u_{\mathrm{in}}\|}\biggr{)}. (2.2)

For some given T>0T>0, we assume the values Re(λ1)\mathop{\mathrm{Re}}{(\lambda_{1})}, F2\|F_{2}\|, F1\|F_{1}\|, F0(t)\|F_{0}(t)\| for each t[0,T]t\in[0,T], and F0maxt[0,T]F0(t)\|F_{0}\|\coloneqq\max_{t\in[0,T]}\|F_{0}(t)\|, F0maxt[0,T]F0(t)\|F_{0}^{\prime}\|\coloneqq\max_{t\in[0,T]}\|F^{\prime}_{0}(t)\| are known, and that we are given oracles OF2O_{F_{2}}, OF1O_{F_{1}}, and OF0O_{F_{0}} that provide the locations and values of the nonzero entries of F2F_{2}, F1F_{1}, and F0(t)F_{0}(t) for any specified tt, respectively, for any desired row or column. We are also given the value uin\|u_{\mathrm{in}}\| and an oracle OxO_{x} that maps |000n|00\ldots 0\rangle\in{\mathbb{C}}^{n} to a quantum state proportional to uinu_{\mathrm{in}}. Our goal is to produce a quantum state proportional to u(T)u(T) for some given T>0T>0 within some prescribed error tolerance ϵ>0\epsilon>0.

When F0(t)=0F_{0}(t)=0 (i.e., the ODE is homogeneous), the quantity R=uinF2|Re(λ1)|\operatorname{R}=\frac{\|u_{\mathrm{in}}\|\|F_{2}\|}{|\mathop{\mathrm{Re}}{(\lambda_{1})}|} is qualitatively similar to the Reynolds number, which characterizes the ratio of the (nonlinear) convective forces to the (linear) viscous forces within a fluid [14, 38]. More generally, R\operatorname{R} quantifies the combined strength of the nonlinearity and the inhomogeneity relative to dissipation.

Note that without loss of generality, given a quadratic ODE satisfying (2.1) with R<1\operatorname{R}<1, we can modify it by rescaling uγuu\to\gamma u with a suitable constant γ\gamma to satisfy

F2+F0<|Re(λ1)|\|F_{2}\|+\|F_{0}\|<|{\mathop{\mathrm{Re}}{(\lambda_{1})}}| (2.3)

and

uin<1,\|u_{\mathrm{in}}\|<1, (2.4)

with R\operatorname{R} left unchanged by the rescaling. We use this rescaling in our algorithm and its analysis. With this rescaling, a small R\operatorname{R} implies both small uinF2\|u_{\mathrm{in}}\|\|F_{2}\| and small |F0/uin|F_{0}\|/\|u_{\mathrm{in}}\| relative to |Re(λ1)||{\mathop{\mathrm{Re}}{(\lambda_{1})}}|.

3 Quantum Carleman linearization

As discussed in Section 1, it is challenging to directly simulate quadratic ODEs using quantum computers, and indeed the complexity of the best known quantum algorithm is exponential in the evolution time TT [39]. However, for a dissipative nonlinear ODE without a source, any quadratic nonlinear effect will only be significant for a finite time because of the dissipation. To exploit this, we can create a linear system that approximates the initial nonlinear evolution within some controllable error. After the nonlinear effects are no longer important, the linear system properly captures the almost-linear evolution from then on.

We develop such a quantum algorithm using the concept of Carleman linearization [16, 37, 30]. Carleman linearization is a method for converting a finite-dimensional system of nonlinear differential equations into an infinite-dimensional linear one. This is achieved by introducing powers of the variables into the system, allowing it to be written as an infinite sequence of coupled linear differential equations. We then truncate the system to NN equations, where the truncation level NN depends on the allowed approximation error, giving a finite linear ODE system.

Let us describe the Carleman linearization procedure in more detail. Given a system of quadratic ODEs (2.1), we apply the Carleman procedure to obtain the system of linear ODEs

dy^dt=A(t)y^+b(t),y^(0)=y^in\frac{\mathrm{d}{\hat{y}}}{\mathrm{d}{t}}=A(t)\hat{y}+b(t),\qquad\hat{y}(0)=\hat{y}_{\mathrm{in}} (3.1)

with the tri-diagonal block structure

ddt(y^1y^2y^3y^N1y^N)=(A11A21A12A22A32A23A33A43AN2N1AN1N1ANN1AN1NANN)(y^1y^2y^3y^N1y^N)+(F0(t)0000),\frac{\mathrm{d}{}}{\mathrm{d}{t}}\begin{pmatrix}\hat{y}_{1}\\ \hat{y}_{2}\\ \hat{y}_{3}\\ \vdots\\ \hat{y}_{N-1}\\ \hat{y}_{N}\\ \end{pmatrix}=\begin{pmatrix}A_{1}^{1}&A_{2}^{1}&&&&\\ A_{1}^{2}&A_{2}^{2}&A_{3}^{2}&&&\\ &A_{2}^{3}&A_{3}^{3}&A_{4}^{3}&&\\ &&\ddots&\ddots&\ddots&\\ &&&A_{N-2}^{N-1}&A_{N-1}^{N-1}&A_{N}^{N-1}\\ &&&&A_{N-1}^{N}&A_{N}^{N}\\ \end{pmatrix}\begin{pmatrix}\hat{y}_{1}\\ \hat{y}_{2}\\ \hat{y}_{3}\\ \vdots\\ \hat{y}_{N-1}\\ \hat{y}_{N}\\ \end{pmatrix}+\begin{pmatrix}F_{0}(t)\\ 0\\ 0\\ \vdots\\ 0\\ 0\\ \end{pmatrix}, (3.2)

where y^j=ujnj\hat{y}_{j}=u^{\otimes j}\in{\mathbb{R}}^{n^{j}}, y^in=[uin;uin2;;uinN]\hat{y}_{\mathrm{in}}=[u_{\mathrm{in}};u_{\mathrm{in}}^{\otimes 2};\ldots;u_{\mathrm{in}}^{\otimes N}], and Aj+1jnj×nj+1A_{j+1}^{j}\in{\mathbb{R}}^{n^{j}\times n^{j+1}}, Ajjnj×njA_{j}^{j}\in{\mathbb{R}}^{n^{j}\times n^{j}}, Aj1jnj×nj1A_{j-1}^{j}\in{\mathbb{R}}^{n^{j}\times n^{j-1}} for j[N]j\in[{N}] satisfying

Aj+1j\displaystyle A_{j+1}^{j} =F2Ij1+IF2Ij2++Ij1F2,\displaystyle=F_{2}\otimes I^{\otimes j-1}+I\otimes F_{2}\otimes I^{\otimes j-2}+\cdots+I^{\otimes j-1}\otimes F_{2}, (3.3)
Ajj\displaystyle A_{j}^{j} =F1Ij1+IF1Ij2++Ij1F1,\displaystyle=F_{1}\otimes I^{\otimes j-1}+I\otimes F_{1}\otimes I^{\otimes j-2}+\cdots+I^{\otimes j-1}\otimes F_{1}, (3.4)
Aj1j\displaystyle A_{j-1}^{j} =F0(t)Ij1+IF0(t)Ij2++Ij1F0(t).\displaystyle=F_{0}(t)\otimes I^{\otimes j-1}+I\otimes F_{0}(t)\otimes I^{\otimes j-2}+\cdots+I^{\otimes j-1}\otimes F_{0}(t). (3.5)

Note that AA is a (3Ns)(3Ns)-sparse matrix. The dimension of (3.1) is

Δn+n2++nN=nN+1nn1=O(nN).\Delta\coloneqq n+n^{2}+\cdots+n^{N}=\frac{n^{N+1}-n}{n-1}=O(n^{N}). (3.6)

To construct a system of linear equations, we next divide [0,T][0,T] into m=T/hm=T/h time steps and apply the forward Euler method on (3.1), letting

yk+1=[I+A(kh)h]yk+b(kh)y^{k+1}=[I+A(kh)h]y^{k}+b(kh) (3.7)

where ykΔy^{k}\in{\mathbb{R}}^{\Delta} approximates y^(kh)\hat{y}(kh) for each k[m+1]0{0,1,,m}k\in[{m+1}]_{0}\coloneqq\{0,1,\ldots,m\}, with y0=yiny^(0)=y^iny^{0}=y_{\mathrm{in}}\coloneqq\hat{y}(0)=\hat{y}_{\mathrm{in}}, and letting all yky^{k} be equal for k[m+p+1]0[m+1]0k\in[{m+p+1}]_{0}\setminus[{m+1}]_{0}, for some sufficiently large integer pp. (It is unclear whether another discretization could improve performance, as discussed further in Section 7.) This gives an (m+p+1)Δ×(m+p+1)Δ(m+p+1)\Delta\times(m+p+1)\Delta linear system

L|Y=|BL|Y\rangle=|B\rangle (3.8)

that encodes (3.7) and uses it to produce a numerical solution at time TT, where

L=k=0m+p|kk|Ik=1m|kk1|[I+A((k1)h)h]h=m+1m+p|kk1|IL=\sum_{k=0}^{m+p}|k\rangle\langle k|\otimes I-\sum_{k=1}^{m}|k\rangle\langle k-1|\otimes[I+A((k-1)h)h]-\sum_{h=m+1}^{m+p}|k\rangle\langle k-1|\otimes I (3.9)

and

|B=1Bm(yin|0|yin+k=1mb((k1)h)|k|b((k1)h))|B\rangle=\frac{1}{\sqrt{B_{m}}}\Bigl{(}\|y_{\mathrm{in}}\||0\rangle\otimes|y_{\mathrm{in}}\rangle+\sum_{k=1}^{m}\|b((k-1)h)\||k\rangle\otimes|b((k-1)h)\rangle\Bigr{)} (3.10)

with a normalizing factor BmB_{m}. Observe that the system (3.8) has the lower triangular structure

(I[I+A(0)h]I[I+A((m1)h)h]IIIII)(y0y1ymym+1ym+p)=(yinb(0)b((m1)h)00).\begin{pmatrix}I&&&&&&\\ -[I\!+\!A(0)h]&I&&&&&\\ &\ddots&\ddots&&&&\\ &&-[I\!+\!A((m-1)h)h]&I&&&\\ &&&-I&I&&\\ &&&&\ddots&\ddots&\\ &&&&&-I&I\\ \end{pmatrix}\begin{pmatrix}y^{0}\\ y^{1}\\ \vdots\\ y^{m}\\ y^{m+1}\\ \vdots\\ y^{m+p}\\ \end{pmatrix}=\begin{pmatrix}y_{\mathrm{in}}\\ b(0)\\ \vdots\\ b((m-1)h)\\ 0\\ \vdots\\ 0\\ \end{pmatrix}. (3.11)

In the above system, the first nn components of yky^{k} for k[m+p+1]0k\in[{m+p+1}]_{0} (i.e., y1ky_{1}^{k}) approximate the exact solution u(T)u(T), up to normalization. We apply the high-precision quantum linear system algorithm (QLSA) [18] to (3.8) and postselect on kk to produce y1k/y1ky_{1}^{k}/\|y^{k}_{1}\| for some k[m+p+1]0[m]0k\in[{m+p+1}]_{0}\setminus[{m}]_{0}. The resulting error is at most

ϵmaxk[m+p+1]0[m]0u(T)u(T)y1ky1k.\epsilon\coloneqq\max_{k\in[{m+p+1}]_{0}\setminus[{m}]_{0}}\biggl{\|}\frac{u(T)}{\|u(T)\|}-\frac{y^{k}_{1}}{\|y^{k}_{1}\|}\biggr{\|}. (3.12)

This error includes contributions from both Carleman linearization and the forward Euler method. (The QLSA also introduces error, which we bound separately. Note that we could instead apply the original QLSA [32] instead of its subsequent improvement [18], but this would slightly complicate the error analysis and might perform worse in practice.)

Now we state our main algorithmic result.

Theorem 1 (Quantum Carleman linearization algorithm).

Consider an instance of the quantum quadratic ODE problem as defined in Problem 1, with its Carleman linearization as defined in (3.1). Assume R<1\operatorname{R}<1. Let

g\displaystyle g u(T),\displaystyle\coloneqq\|u(T)\|, q\displaystyle q uinu(T).\displaystyle\coloneqq\frac{\|u_{\mathrm{in}}\|}{\|u(T)\|}. (3.13)

There exists a quantum algorithm producing a state that approximates u(T)/u(T)u(T)/\|u(T)\| with error at most ϵ1\epsilon\leq 1, succeeding with probability Ω(1)\Omega(1), with a flag indicating success, using at most

sT2q[(F2+F1+F0)2+F0](1uin)2(F2+F0)gϵpoly(log(sTF2F1F0F0(1uin)gϵ)/log(1/uin))\displaystyle\frac{sT^{2}q[(\|F_{2}\|+\|F_{1}\|+\|F_{0}\|)^{2}+\|F_{0}^{\prime}\|]}{(1-\|u_{\mathrm{in}}\|)^{2}(\|F_{2}\|+\|F_{0}\|)g\epsilon}\cdot\operatorname{poly}\biggl{(}\log\biggl{(}\frac{sT\|F_{2}\|\|F_{1}\|\|F_{0}\|\|F^{\prime}_{0}\|}{(1-\|u_{\mathrm{in}}\|)g\epsilon}\biggr{)}/\log(1/\|u_{\mathrm{in}}\|)\biggr{)} (3.14)

queries to the oracles OF2O_{F_{2}}, OF1O_{F_{1}}, OF0O_{F_{0}} and OxO_{x}. The gate complexity is larger than the query complexity by a factor of poly(log(nsTF2F1F0F0/(1uin)gϵ)/log(1/uin))\operatorname{poly}\bigl{(}\log(nsT\|F_{2}\|\|F_{1}\|\|F_{0}\|\|F^{\prime}_{0}\|/(1-\|u_{\mathrm{in}}\|)g\epsilon)/\log(1/\|u_{\mathrm{in}}\|)\bigr{)}. Furthermore, if the eigenvalues of F1F_{1} are all real, the query complexity is

sT2q[(F2+F1+F0)2+F0]gϵpoly(log(sTF2F1F0F0gϵ)/log(1/uin))\displaystyle\frac{sT^{2}q[(\|F_{2}\|+\|F_{1}\|+\|F_{0}\|)^{2}+\|F_{0}^{\prime}\|]}{g\epsilon}\cdot\operatorname{poly}\biggl{(}\log\biggl{(}\frac{sT\|F_{2}\|\|F_{1}\|\|F_{0}\|\|F^{\prime}_{0}\|}{g\epsilon}\biggr{)}/\log(1/\|u_{\mathrm{in}}\|)\biggr{)} (3.15)

and the gate complexity is larger by a factor of poly(log(nsTF2F1F0F0/gϵ)/log(1/uin))\operatorname{poly}\bigl{(}\log(nsT\|F_{2}\|\|F_{1}\|\|F_{0}\|\|F^{\prime}_{0}\|/g\epsilon)/\log(1/\|u_{\mathrm{in}}\|)\bigr{)}.

4 Algorithm analysis

In this section we establish several lemmas and use them to prove Theorem 1.

4.1 Solution error

The solution error has three contributions: the error from applying Carleman linearization to (2.1), the error in the time discretization of (3.1) by the forward Euler method, and the error from the QLSA. Since the QLSA produces a solution with error at most ϵ\epsilon with complexity poly(log(1/ϵ))\operatorname{poly}(\log(1/\epsilon)) [18], we focus on bounding the first two contributions.

4.1.1 Error from Carleman linearization

First, we provide an upper bound for the error from Carleman linearization for arbitrary evolution time TT. To the best of our knowledge, the first and only explicit bound on the error of Carleman linearization appears in [30]. However, they only consider homogeneous quadratic ODEs; and furthermore, to bound the error for arbitrary TT, they assume the logarithmic norm of F1F_{1} is negative (see Theorems 4.2 and 4.3 of [30]), which is too strong for our case. Instead, we give a novel analysis under milder conditions, providing the first convergence guarantee for general inhomogeneous quadratic ODEs.

We begin with a lemma that describes the decay of the solution of (2.1).

Lemma 1.

Consider an instance of the quadratic ODE (2.1), and assume R<1\operatorname{R}<1 as defined in (2.2). Let

r±Re(λ1)±Re(λ1)24F2F02F2.r_{\pm}\coloneqq\frac{-\mathop{\mathrm{Re}}(\lambda_{1})\pm\sqrt{\mathop{\mathrm{Re}}(\lambda_{1})^{2}-4\|F_{2}\|\|F_{0}\|}}{2\|F_{2}\|}. (4.1)

Then r±r_{\pm} are distinct real numbers with 0r<r+0\leq r_{-}<r_{+}, and the solution u(t)u(t) of (2.1) satisfies u(t)<uin<r+\|u(t)\|<\|u_{\mathrm{in}}\|<r_{+} for any t>0t>0.

Proof.

Consider the derivative of u(t)\|u(t)\|. We have

du2dt\displaystyle\frac{d\|u\|^{2}}{dt} =uF2(uu)+(uu)F2u+u(F1+F1)u+uF0(t)+F0(t)u,\displaystyle=u^{\dagger}F_{2}(u\otimes u)+(u^{\dagger}\otimes u^{\dagger})F_{2}^{\dagger}u+u^{\dagger}(F_{1}+F_{1}^{\dagger})u+u^{\dagger}F_{0}(t)+F_{0}(t)^{\dagger}u,
2F2u3+2Re(λ1)u2+2F0u.\displaystyle\leq 2\|F_{2}\|\|u\|^{3}+2\mathop{\mathrm{Re}}(\lambda_{1})\|u\|^{2}+2\|F_{0}\|\|u\|. (4.2)

If u0\|u\|\neq 0, then

dudtF2u2+Re(λ1)u+F0.\frac{d\|u\|}{dt}\leq\|F_{2}\|\|u\|^{2}+\mathop{\mathrm{Re}}(\lambda_{1})\|u\|+\|F_{0}\|. (4.3)

Letting a=F2>0a=\|F_{2}\|>0, b=Re(λ1)<0b=\mathop{\mathrm{Re}}(\lambda_{1})<0, and c=F0>0c=\|F_{0}\|>0 with a,b,c>0a,b,c>0, we consider a 11-dimensional quadratic ODE

dxdt=ax2+bx+c,x(0)=uin.\frac{\mathrm{d}{x}}{\mathrm{d}{t}}=ax^{2}+bx+c,\qquad x(0)=\|u_{\mathrm{in}}\|. (4.4)

Since R<1b>auin+cuin\operatorname{R}<1\Leftrightarrow b>a\|u_{\mathrm{in}}\|+\frac{c}{\|u_{\mathrm{in}}\|}, the discriminant satisfies

b24ac>(auin+cuin)24auincuin(auincuin)20.b^{2}-4ac>\biggl{(}a\|u_{\mathrm{in}}\|+\frac{c}{\|u_{\mathrm{in}}\|}\biggr{)}^{2}-4a\|u_{\mathrm{in}}\|\cdot\frac{c}{\|u_{\mathrm{in}}\|}\geq\biggl{(}a\|u_{\mathrm{in}}\|-\frac{c}{\|u_{\mathrm{in}}\|}\biggr{)}^{2}\geq 0. (4.5)

Thus, r±r_{\pm} defined in (4.1) are distinct real roots of ax2+bx+cax^{2}+bx+c. Since r+r+=ba>0r_{-}+r_{+}=-\frac{b}{a}>0 and rr+=ca0r_{-}r_{+}=\frac{c}{a}\geq 0, we have 0r<r+0\leq r_{-}<r_{+}. We can rewrite the ODE as

dxdt=ax2+bx+c=a(xr)(xr+),x(0)=uin.\frac{\mathrm{d}{x}}{\mathrm{d}{t}}=ax^{2}+bx+c=a(x-r_{-})(x-r_{+}),\qquad x(0)=\|u_{\mathrm{in}}\|. (4.6)

Letting y=xry=x-r_{-}, we obtain an associated homogeneous quadratic ODE

dydt=a(r+r)y+ay2=ay[y(r+r)],y(0)=uinr.\frac{\mathrm{d}{y}}{\mathrm{d}{t}}=-a(r_{+}-r_{-})y+ay^{2}=ay[y-(r_{+}-r_{-})],\qquad y(0)=\|u_{\mathrm{in}}\|-r_{-}. (4.7)

Since the homogeneous equation has the closed-form solution

y(t)=r+r1ea(r+r)t[1(r+r)/(uinr)],y(t)=\frac{r_{+}-r_{-}}{1-e^{a(r_{+}-r_{-})t}[1-(r_{+}-r_{-})/(\|u_{\mathrm{in}}\|-r_{-})]}, (4.8)

the solution of the inhomogeneous equation can be obtained as

x(t)=r+r1ea(r+r)t[1(r+r)/(uinr)]+r.x(t)=\frac{r_{+}-r_{-}}{1-e^{a(r_{+}-r_{-})t}[1-(r_{+}-r_{-})/(\|u_{\mathrm{in}}\|-r_{-})]}+r_{-}. (4.9)

Therefore we have

u(t)r+r1ea(r+r)t[1(r+r)/(uinr)]+r.\|u(t)\|\leq\frac{r_{+}-r_{-}}{1-e^{a(r_{+}-r_{-})t}[1-(r_{+}-r_{-})/(\|u_{\mathrm{in}}\|-r_{-})]}+r_{-}. (4.10)

Since R<1auin+cuin<bauin2+buin+c<0\operatorname{R}<1\Leftrightarrow a\|u_{\mathrm{in}}\|+\frac{c}{\|u_{\mathrm{in}}\|}<-b\Leftrightarrow a\|u_{\mathrm{in}}\|^{2}+b\|u_{\mathrm{in}}\|+c<0, uin\|u_{\mathrm{in}}\| is located between the two roots rr_{-} and r+r_{+}, and thus 1(r+r)/(uinr)<01-(r_{+}-r_{-})/(\|u_{\mathrm{in}}\|-r_{-})<0. This implies u(t)\|u(t)\| in (4.10) decreases from u(0)=uinu(0)=\|u_{\mathrm{in}}\|, so we have u(t)<uin<r+\|u(t)\|<\|u_{\mathrm{in}}\|<r_{+} for any t>0t>0. ∎

We remark that limtdudt=0\lim_{t\to\infty}\frac{d\|u\|}{dt}=0 since dudt<0\frac{d\|u\|}{dt}<0 and u(t)0\|u(t)\|\geq 0, so u(t)u(t) approaches to a stationary point of the right-hand side of (2.1) (called an attractor in the theory of dynamical systems).

Note that for a homogeneous equation (i.e., F0=0\|F_{0}\|=0), this shows that the dissipation inevitably leads to exponential decay. In this case we have r=0r_{-}=0, so (4.10) gives

u(t)=uinr+ear+t(r+uin)+uin,\displaystyle\|u(t)\|=\frac{\|u_{\mathrm{in}}\|r_{+}}{e^{ar_{+}t}(r_{+}-\|u_{\mathrm{in}}\|)+\|u_{\mathrm{in}}\|}, (4.11)

which decays exponentially in tt.

On the other hand, as mentioned in the introduction, the solution of a dissipative inhomogeneous quadratic ODE can remain asymptotically nonzero. Here we present an example of this. Consider a time-independent uncoupled system with dujdt=f2uj2+f1uj+f0\frac{\mathrm{d}{u_{j}}}{\mathrm{d}{t}}=f_{2}u_{j}^{2}+f_{1}u_{j}+f_{0}, j[n]j\in[{n}], with uj(0)=x0>0u_{j}(0)=x_{0}>0, f2>0f_{2}>0, f1<0f_{1}<0, f0>0f_{0}>0, and R<1\operatorname{R}<1. We see that each uj(t)u_{j}(t) decreases from x0x_{0} to x1f1f124f2f02f2>0x_{1}\coloneqq\frac{-f_{1}-\sqrt{f_{1}^{2}-4f_{2}f_{0}}}{2f_{2}}>0, with 0<x1<uj(t)<x00<x_{1}<u_{j}(t)<x_{0}. Hence, the norm of u(t)u(t) is bounded as 0<nx1<u(t)<nx00<\sqrt{n}x_{1}<\|u(t)\|<\sqrt{n}x_{0} for any t>0t>0. In general, it is hard to lower bound u(t)\|u(t)\|, but the above example shows that a nonzero inhomogeneity can prevent the norm of the solution from decreasing to zero.

We now give an upper bound on the error of Carleman linearization.

Lemma 2.

Consider an instance of the quadratic ODE (2.1), with its corresponding Carleman linearization as defined in (3.1). As in Problem 1, assume that the eigenvalues λj\lambda_{j} of F1F_{1} satisfy Re(λn)Re(λ1)<0\mathop{\mathrm{Re}}{(\lambda_{n})}\leq\cdots\leq\mathop{\mathrm{Re}}{(\lambda_{1})}<0. Assume that R\operatorname{R} defined in (2.2) satisfies R<1\operatorname{R}<1. Then for any j[N]j\in[{N}], the error ηj(t)uj(t)y^j(t)\eta_{j}(t)\coloneqq u^{\otimes j}(t)-\hat{y}_{j}(t) satisfies

ηj(t)η(t)tNF2uinN+1.\|\eta_{j}(t)\|\leq\|\eta(t)\|\leq tN\|F_{2}\|\|u_{\mathrm{in}}\|^{N+1}. (4.12)
Proof.

The exact solution u(t)u(t) of the original quadratic ODE (2.1) satisfies

ddt(uu2u3u(N1)uN)=(A11A21A12A22A32A23A33A43AN2N1AN1N1ANN1AN1NANN)(uu2u3u(N1)uN)+(F0(t)0000),\frac{\mathrm{d}{}}{\mathrm{d}{t}}\begin{pmatrix}u\\ u^{\otimes 2}\\ u^{\otimes 3}\\ \vdots\\ u^{\otimes(N-1)}\\ u^{\otimes N}\\ \vdots\\ \end{pmatrix}=\begin{pmatrix}A_{1}^{1}&A_{2}^{1}&&&&&\\ A_{1}^{2}&A_{2}^{2}&A_{3}^{2}&&&&\\ &A_{2}^{3}&A_{3}^{3}&A_{4}^{3}&&&\\ &&\ddots&\ddots&\ddots&&\\ &&&A_{N-2}^{N-1}&A_{N-1}^{N-1}&A_{N}^{N-1}&\\ &&&&A_{N-1}^{N}&A_{N}^{N}&\ddots\\ &&&&&\ddots&\ddots\\ \end{pmatrix}\begin{pmatrix}u\\ u^{\otimes 2}\\ u^{\otimes 3}\\ \vdots\\ u^{\otimes(N-1)}\\ u^{\otimes N}\\ \vdots\\ \end{pmatrix}+\begin{pmatrix}F_{0}(t)\\ 0\\ 0\\ \vdots\\ 0\\ 0\\ \vdots\\ \end{pmatrix}, (4.13)

and the approximated solution y^j(t)\hat{y}_{j}(t) satisfies (3.2). Comparing these equations, we have

dηdt=A(t)η+b^(t),η(0)=0\frac{\mathrm{d}{\eta}}{\mathrm{d}{t}}=A(t)\eta+\hat{b}(t),\qquad\eta(0)=0 (4.14)

with the tri-diagonal block structure

ddt(η1η2η3ηN1ηN)=(A11A21A12A22A32A23A33A43AN2N1AN1N1ANN1AN1NANN)(η1η2η3ηN1ηN)+(0000AN+1Nu(N+1)),\frac{\mathrm{d}{}}{\mathrm{d}{t}}\begin{pmatrix}\eta_{1}\\ \eta_{2}\\ \eta_{3}\\ \vdots\\ \eta_{N-1}\\ \eta_{N}\\ \end{pmatrix}=\begin{pmatrix}A_{1}^{1}&A_{2}^{1}&&&&\\ A_{1}^{2}&A_{2}^{2}&A_{3}^{2}&&&\\ &A_{2}^{3}&A_{3}^{3}&A_{4}^{3}&&\\ &&\ddots&\ddots&\ddots&\\ &&&A_{N-2}^{N-1}&A_{N-1}^{N-1}&A_{N}^{N-1}\\ &&&&A_{N-1}^{N}&A_{N}^{N}\\ \end{pmatrix}\begin{pmatrix}\eta_{1}\\ \eta_{2}\\ \eta_{3}\\ \vdots\\ \eta_{N-1}\\ \eta_{N}\\ \end{pmatrix}+\begin{pmatrix}0\\ 0\\ 0\\ \vdots\\ 0\\ A_{N+1}^{N}u^{\otimes(N+1)}\\ \end{pmatrix}, (4.15)

Consider the derivative of η(t)\|\eta(t)\|. We have

dη2dt=η(A(t)+A(t))η+ηb^(t)+b^(t)η.\frac{d\|\eta\|^{2}}{dt}=\eta^{\dagger}(A(t)+A^{\dagger}(t))\eta+\eta^{\dagger}\hat{b}(t)+\hat{b}(t)^{\dagger}\eta. (4.16)

For η(A(t)+A(t))η\eta^{\dagger}(A(t)+A^{\dagger}(t))\eta, we bound each term as

ηjAj+1jηj+1+ηj+1(Aj+1j)ηj\displaystyle\eta_{j}^{\dagger}A_{j+1}^{j}\eta_{j+1}+\eta_{j+1}^{\dagger}(A_{j+1}^{j})^{\dagger}\eta_{j} jF2ηj+1ηj,\displaystyle\leq j\|F_{2}\|\|\eta_{j+1}\|\|\eta_{j}\|, (4.17)
ηj[Ajj+(Ajj)]ηj\displaystyle\eta_{j}^{\dagger}[A_{j}^{j}+(A_{j}^{j})^{\dagger}]\eta_{j} 2jRe(λ1)ηj2,\displaystyle\leq 2j\mathop{\mathrm{Re}}(\lambda_{1})\|\eta_{j}\|^{2},
ηjAj1jηj1+ηj1(Aj1j)ηj\displaystyle\eta_{j}^{\dagger}A_{j-1}^{j}\eta_{j-1}+\eta_{j-1}^{\dagger}(A_{j-1}^{j})^{\dagger}\eta_{j} 2jF0ηj1ηj\displaystyle\leq 2j\|F_{0}\|\|\eta_{j-1}\|\|\eta_{j}\|

using the definitions in (3.3)–(3.5).

Define a matrix Gn×nG\in{\mathbb{R}}^{n\times n} with nonzero entries Gj1,j=jF0G_{j-1,j}=j\|F_{0}\|, Gj,j=jRe(λ1)G_{j,j}=j\mathop{\mathrm{Re}}(\lambda_{1}), and Gj+1,j=jF2G_{j+1,j}=j\|F_{2}\|. Then

η(A(t)+A(t))ηη(G+G)η.\eta^{\dagger}(A(t)+A^{\dagger}(t))\eta\leq\eta^{\dagger}(G+G^{\dagger})\eta. (4.18)

Since F2+F0<|Re(λ1)|\|F_{2}\|+\|F_{0}\|<|{\mathop{\mathrm{Re}}{(\lambda_{1})}}|, GG is strictly diagonally dominant and thus the eigenvalues νj\nu_{j} of GG satisfy Re(νn)Re(ν1)<0\mathop{\mathrm{Re}}{(\nu_{n})}\leq\cdots\leq\mathop{\mathrm{Re}}{(\nu_{1})}<0. Thus we have

η(G+G)η2Re(ν1)η2.\eta^{\dagger}(G+G^{\dagger})\eta\leq 2\mathop{\mathrm{Re}}(\nu_{1})\|\eta\|^{2}. (4.19)

For ηb^(t)+b^(t)η\eta^{\dagger}\hat{b}(t)+\hat{b}(t)^{\dagger}\eta, we have

ηb^(t)+b^(t)η2b^η2AN+1Nu(N+1)η.\eta^{\dagger}\hat{b}(t)+\hat{b}(t)^{\dagger}\eta\leq 2\|\hat{b}\|\|\eta\|\leq 2\|A_{N+1}^{N}\|\|u^{\otimes(N+1)}\|\|\eta\|. (4.20)

Since AN+1N=NF2\|A_{N+1}^{N}\|=N\|F_{2}\|, and u(N+1)=uN+1uinN+1\|u^{\otimes(N+1)}\|=\|u\|^{N+1}\leq\|u_{\mathrm{in}}\|^{N+1}, we have

ηb^(t)+b^(t)η2NF2uinN+1η.\eta^{\dagger}\hat{b}(t)+\hat{b}(t)^{\dagger}\eta\leq 2N\|F_{2}\|\|u_{\mathrm{in}}\|^{N+1}\|\eta\|. (4.21)

Using (4.18), (4.19), and (4.21) in (4.16), we find

dη2dt2Re(ν1)η2+2NF2uinN+1η,\frac{d\|\eta\|^{2}}{dt}\leq 2\mathop{\mathrm{Re}}(\nu_{1})\|\eta\|^{2}+2N\|F_{2}\|\|u_{\mathrm{in}}\|^{N+1}\|\eta\|, (4.22)

so elementary calculus gives

dηdt=12ηdη2dtRe(ν1)η+NF2uinN+1.\frac{d\|\eta\|}{dt}=\frac{1}{2\|\eta\|}\frac{\mathrm{d}\|\eta\|^{2}}{\mathrm{d}{t}}\leq\mathop{\mathrm{Re}}(\nu_{1})\|\eta\|+N\|F_{2}\|\|u_{\mathrm{in}}\|^{N+1}. (4.23)

Solving the differential inequality as an equation with η(0)=0\eta(0)=0 gives us a bound on η\|\eta\|:

η(t)0teRe(ν1)(ts)NF2uinN+1dsNF2uinN+10teRe(ν1)(ts)ds.\|\eta(t)\|\leq\int_{0}^{t}e^{\mathop{\mathrm{Re}}(\nu_{1})(t-s)}N\|F_{2}\|\|u_{\mathrm{in}}\|^{N+1}\,\mathrm{d}{s}\leq N\|F_{2}\|\|u_{\mathrm{in}}\|^{N+1}\int_{0}^{t}e^{\mathop{\mathrm{Re}}(\nu_{1})(t-s)}\mathrm{d}{s}. (4.24)

Finally, using

0teRe(ν1)(ts)ds=1eRe(ν1)t|Re(ν1)|t\int_{0}^{t}e^{\mathop{\mathrm{Re}}(\nu_{1})(t-s)}\mathrm{d}{s}=\frac{1-e^{\mathop{\mathrm{Re}}(\nu_{1})t}}{|{\mathop{\mathrm{Re}}(\nu_{1})}|}\leq t (4.25)

(where we used the inequality 1eatat1-e^{at}\leq-at with a<0a<0), (4.24) gives the bound

ηj(t)η(t)tNF2uinN+1\|\eta_{j}(t)\|\leq\|\eta(t)\|\leq tN\|F_{2}\|\|u_{\mathrm{in}}\|^{N+1} (4.26)

as claimed. ∎

Note that (4.25) can be bounded alternatively by

0teRe(ν1)(ts)ds=1eRe(ν1)t|Re(ν1)|1|Re(ν1)|,\int_{0}^{t}e^{\mathop{\mathrm{Re}}(\nu_{1})(t-s)}\mathrm{d}{s}=\frac{1-e^{\mathop{\mathrm{Re}}(\nu_{1})t}}{|{\mathop{\mathrm{Re}}(\nu_{1})}|}\leq\frac{1}{|{\mathop{\mathrm{Re}}(\nu_{1})}|}, (4.27)

and thus ηj(t)η(t)1|Re(ν1)|NF2uinN+1\|\eta_{j}(t)\|\leq\|\eta(t)\|\leq\frac{1}{|{\mathop{\mathrm{Re}}(\nu_{1})}|}N\|F_{2}\|\|u_{\mathrm{in}}\|^{N+1}. We select (4.25) because it avoids including an additional parameter Re(ν1)\mathop{\mathrm{Re}}(\nu_{1}).

We also give an improved analysis that works for homogeneous quadratic ODEs (F0(t)=0F_{0}(t)=0) under milder conditions. This analysis follows the proof in [30] closely.

Corollary 1.

Under the same setting of Lemma 2, assume F0(t)=0F_{0}(t)=0 in (2.1). Then for any j[N]j\in[{N}], the error ηj(t)uj(t)y^j(t)\eta_{j}(t)\coloneqq u^{\otimes j}(t)-\hat{y}_{j}(t) satisfies

ηj(t)uinjRN+1j.\|\eta_{j}(t)\|\leq\|u_{\mathrm{in}}\|^{j}\operatorname{R}^{N+1-j}. (4.28)

For j=1j=1, we have the tighter bound

η1(t)uinRN(1eRe(λ1)t)N.\|\eta_{1}(t)\|\leq\|u_{\mathrm{in}}\|\operatorname{R}^{N}\big{(}1-e^{\mathop{\mathrm{Re}}(\lambda_{1})t}\big{)}^{N}. (4.29)
Proof.

We again consider η\eta satisfying (4.14). Since F0(t)=0F_{0}(t)=0, (4.14) reduces to a time-independent ODE with an upper triangular block structure,

dηjdt=Ajjηj+Aj+1jηj+1,j[N1]\frac{\mathrm{d}{\eta_{j}}}{\mathrm{d}{t}}=A_{j}^{j}\eta_{j}+A_{j+1}^{j}\eta_{j+1},\quad j\in[{N-1}] (4.30)

and

dηNdt=ANNηN+AN+1Nu(N+1).\frac{\mathrm{d}{\eta_{N}}}{\mathrm{d}{t}}=A_{N}^{N}\eta_{N}+A_{N+1}^{N}u^{\otimes(N+1)}. (4.31)

We proceed by backward substitution. Since ηN(0)=0\eta_{N}(0)=0, we have

ηN(t)=0teANN(ts0)AN+1Nu(N+1)(s0)ds0.\eta_{N}(t)=\int_{0}^{t}e^{A_{N}^{N}(t-s_{0})}A_{N+1}^{N}u^{\otimes(N+1)}(s_{0})\,\mathrm{d}{s_{0}}. (4.32)

For j[N]j\in[{N}], (3.4) gives eAjjt=ejRe(λ1)t\|e^{A_{j}^{j}t}\|=e^{j\mathop{\mathrm{Re}}(\lambda_{1})t} and (3.3) gives Aj+1j=jF2\|A_{j+1}^{j}\|=j\|{F_{2}}\|. By Lemma 1, u(N+1)=uN+1uinN+1\|u^{\otimes(N+1)}\|=\|u\|^{N+1}\leq\|u_{\mathrm{in}}\|^{N+1}. We can therefore upper bound (4.32) by

ηN(t)\displaystyle\|\eta_{N}(t)\| 0teANN(ts0)AN+1Nu(N+1)(s0)ds0\displaystyle\leq\int_{0}^{t}\|e^{A_{N}^{N}(t-s_{0})}\|\cdot\|A_{N+1}^{N}u^{\otimes(N+1)}(s_{0})\|\,\mathrm{d}{s_{0}} (4.33)
NF2uinN+10teNRe(λ1)(ts0)ds0.\displaystyle\leq N\|F_{2}\|\|u_{\mathrm{in}}\|^{N+1}\int_{0}^{t}e^{N\mathop{\mathrm{Re}}(\lambda_{1})(t-s_{0})}\,\mathrm{d}{s_{0}}.

For j=N1j=N-1, (4.30) gives

dηN1dt=AN1N1ηN1+ANN1ηN.\frac{\mathrm{d}{\eta_{N-1}}}{\mathrm{d}{t}}=A_{N-1}^{N-1}\eta_{N-1}+A_{N}^{N-1}\eta_{N}. (4.34)

Again, since ηN1(0)=0\eta_{N-1}(0)=0, we have

ηN1(t)=0teAN1N1(ts1)ANN1ηN(s1)ds1\eta_{N-1}(t)=\int_{0}^{t}e^{A_{N-1}^{N-1}(t-s_{1})}A_{N}^{N-1}\eta_{N}(s_{1})\,\mathrm{d}{s_{1}} (4.35)

which has the upper bound

ηN1(t)\displaystyle\|\eta_{N-1}(t)\| 0teAN1N1(ts1)ANN1ηN(s1)ds1\displaystyle\leq\int_{0}^{t}\|e^{A_{N-1}^{N-1}(t-s_{1})}\|\cdot\|A_{N}^{N-1}\eta_{N}(s_{1})\|\,\mathrm{d}{s_{1}} (4.36)
(N1)F20te(N1)Re(λ1)(ts1)ηN(s1)ds1\displaystyle\leq(N-1)\|F_{2}\|\int_{0}^{t}e^{(N-1)\mathop{\mathrm{Re}}(\lambda_{1})(t-s_{1})}\|\eta_{N}(s_{1})\|\,\mathrm{d}{s_{1}}
N(N1)F22uinN+10te(N1)Re(λ1)(ts1)0s1eNRe(λ1)(s1s)ds0ds1,\displaystyle\leq N(N-1)\|F_{2}\|^{2}\|u_{\mathrm{in}}\|^{N+1}\int_{0}^{t}e^{(N-1)\mathop{\mathrm{Re}}(\lambda_{1})(t-s_{1})}\int_{0}^{s_{1}}e^{N\mathop{\mathrm{Re}}(\lambda_{1})(s_{1}-s)}\,\mathrm{d}{s_{0}}\,\mathrm{d}{s_{1}},

where we used (4.33) in the last step. Iterating this procedure for j=N2,,1j=N-2,\ldots,1, we find

ηj(t)\displaystyle\|\eta_{j}(t)\| N!(j1)!F2N+1juinN+10tejRe(λ1)(tsNj)0sNje(j+1)Re(λ1)(sNjsN1j)\displaystyle\leq\frac{N!}{(j-1)!}\|F_{2}\|^{N+1-j}\|u_{\mathrm{in}}\|^{N+1}\int_{0}^{t}e^{j\mathop{\mathrm{Re}}(\lambda_{1})(t-s_{N-j})}\int_{0}^{s_{N-j}}e^{(j+1)\mathop{\mathrm{Re}}(\lambda_{1})(s_{N-j}-s_{N-1-j})}\cdots (4.37)
0s2e(N1)Re(λ1)(s2s1)0s1eNRe(λ1)(s1s0)ds0ds1dsNj1dsNj\displaystyle\qquad\int_{0}^{s_{2}}e^{(N-1)\mathop{\mathrm{Re}}(\lambda_{1})(s_{2}-s_{1})}\int_{0}^{s_{1}}e^{N\mathop{\mathrm{Re}}(\lambda_{1})(s_{1}-s_{0})}\,\mathrm{d}{s_{0}}\,\mathrm{d}{s_{1}}\cdots\mathrm{d}{s_{N-j-1}}\,\mathrm{d}{s_{N-j}}
=N!(j1)!F2N+1juinN+10sN+1j0s20s1eRe(λ1)(Ns0+k=1Nj+1sk)ds0ds1dsNj.\displaystyle=\frac{N!}{(j-1)!}\|F_{2}\|^{N+1-j}\|u_{\mathrm{in}}\|^{N+1}\!\int_{0}^{s_{N+1-j}}\!\!\cdots\!\int_{0}^{s_{2}}\!\!\int_{0}^{s_{1}}\!\!e^{\mathop{\mathrm{Re}}(\lambda_{1})(-Ns_{0}+\sum_{k=1}^{N-j+1}s_{k})}\,\mathrm{d}{s_{0}}\,\mathrm{d}{s_{1}}\cdots\mathrm{d}{s_{N-j}}.

Finally, using

0sk+1e(Nk)Re(λ1)(sk+1sk)dsk=1e(Nk)Re(λ1)sk+1(Nk)|Re(λ1)|1(Nk)|Re(λ1)|\int_{0}^{s_{k+1}}e^{(N-k)\mathop{\mathrm{Re}}(\lambda_{1})(s_{k+1}-s_{k})}\mathrm{d}{s_{k}}=\frac{1-e^{(N-k)\mathop{\mathrm{Re}}(\lambda_{1})s_{k+1}}}{(N-k)|{\mathop{\mathrm{Re}}(\lambda_{1})}|}\leq\frac{1}{(N-k)|{\mathop{\mathrm{Re}}(\lambda_{1})}|} (4.38)

for k=0,,Njk=0,\ldots,N-j, (4.37) can be bounded by

ηj(t)N!(j1)!F2N+1juinN+1(j1)!N!|Re(λ1)|N+1j=uinN+1F2N+1j|Re(λ1)|N+1j=uinjRN+1j.\|\eta_{j}(t)\|\leq\frac{N!}{(j-1)!}\|F_{2}\|^{N+1-j}\|u_{\mathrm{in}}\|^{N+1}\frac{(j-1)!}{N!|{\mathop{\mathrm{Re}}(\lambda_{1})}|^{N+1-j}}=\frac{\|u_{\mathrm{in}}\|^{N+1}\|F_{2}\|^{N+1-j}}{|{\mathop{\mathrm{Re}}(\lambda_{1})}|^{N+1-j}}=\|u_{\mathrm{in}}\|^{j}\operatorname{R}^{N+1-j}. (4.39)

For j=1j=1, the bound can be further improved. By Lemma 5.2 of [30], if a0a\neq 0,

0sN0s20s1ea(Ns0+k=1Nsk)ds0ds1dsN1=(easN1)NN!aN.\int_{0}^{s_{N}}\!\cdots\int_{0}^{s_{2}}\int_{0}^{s_{1}}e^{a(-Ns_{0}+\sum_{k=1}^{N}s_{k})}\,\mathrm{d}{s_{0}}\,\mathrm{d}{s_{1}}\cdots\mathrm{d}{s_{N-1}}=\frac{(e^{as_{N}}-1)^{N}}{N!a^{N}}. (4.40)

With sN=ts_{N}=t and a=Re(λ1)a=\mathop{\mathrm{Re}}(\lambda_{1}), we find

η1(t)\displaystyle\|\eta_{1}(t)\| N!F2NuinN+10sN0s20s1eRe(λ1)(Ns0+k=1Nsk)ds0ds1dsN1\displaystyle\leq N!\|F_{2}\|^{N}\|u_{\mathrm{in}}\|^{N+1}\int_{0}^{s_{N}}\!\cdots\int_{0}^{s_{2}}\int_{0}^{s_{1}}e^{\mathop{\mathrm{Re}}(\lambda_{1})(-Ns_{0}+\sum_{k=1}^{N}s_{k})}\,\mathrm{d}{s_{0}}\,\mathrm{d}{s_{1}}\cdots\mathrm{d}{s_{N-1}} (4.41)
N!F2NuinN+1(eRe(λ1)t1)NN!Re(λ1)N\displaystyle\leq N!\|F_{2}\|^{N}\|u_{\mathrm{in}}\|^{N+1}\frac{(e^{\mathop{\mathrm{Re}}(\lambda_{1})t}-1)^{N}}{N!\mathop{\mathrm{Re}}(\lambda_{1})^{N}}
=uinRN(1eat)N,\displaystyle=\|u_{\mathrm{in}}\|\operatorname{R}^{N}\big{(}1-e^{at}\big{)}^{N},

which is tighter than the j=1j=1 case in (4.39). ∎

While Problem 1 makes some strong assumptions about the system of differential equations, they appear to be necessary for our analysis. Specifically, the conditions Re(λ1)<0\mathop{\mathrm{Re}}{(\lambda_{1})}<0 and R<1\operatorname{R}<1 are required to ensure arbitrary-time convergence.

Since the Euler method for (3.1) is unstable if Re(λ1)>0\mathop{\mathrm{Re}}{(\lambda_{1})}>0 [7, 25], we only consider the case Re(λ1)0\mathop{\mathrm{Re}}{(\lambda_{1})}\leq 0. If Re(λ1)=0\mathop{\mathrm{Re}}{(\lambda_{1})}=0, (4.40) reduces to

0sN0s20s1ea(Ns0+k=1Nsk)ds0ds1dsN1=tNN!,\int_{0}^{s_{N}}\!\cdots\int_{0}^{s_{2}}\int_{0}^{s_{1}}e^{a(-Ns_{0}+\sum_{k=1}^{N}s_{k})}\,\mathrm{d}{s_{0}}\,\mathrm{d}{s_{1}}\cdots\mathrm{d}{s_{N-1}}=\frac{t^{N}}{N!}, (4.42)

giving the error bound

η1(t)uin(uinF2t)N\|\eta_{1}(t)\|\leq\|u_{\mathrm{in}}\|(\|u_{\mathrm{in}}\|\|F_{2}\|t)^{N} (4.43)

instead of (4.41). Then the error bound can be made arbitrarily small for a finite time by increasing NN, but after t>1/uinF2t>{1}/{\|u_{\mathrm{in}}\|\|F_{2}\|}, the error bound diverges.

Furthermore, if R1\operatorname{R}\geq 1, Bernoulli’s inequality gives

uin(1NeRe(λ1)t)uin(1NeRe(λ1)t)RNuin(1eRe(λ1)t)NRN,\|u_{\mathrm{in}}\|(1-Ne^{\mathop{\mathrm{Re}}(\lambda_{1})t})\leq\|u_{\mathrm{in}}\|(1-Ne^{\mathop{\mathrm{Re}}(\lambda_{1})t})\operatorname{R}^{N}\leq\|u_{\mathrm{in}}\|(1-e^{\mathop{\mathrm{Re}}(\lambda_{1})t})^{N}\operatorname{R}^{N}, (4.44)

where the right-hand side upper bounds η1(t)\|\eta_{1}(t)\| as in (4.41). Assuming η1(t)=u(t)y^1(t)\|{\eta_{1}(t)}\|=\|{u(t)-\hat{y}_{1}(t)}\| is smaller than uin\|u_{\mathrm{in}}\|, we require

N=Ω(e|Re(λ1)|t).N=\Omega(e^{|\mathop{\mathrm{Re}}(\lambda_{1})|t}). (4.45)

In other words, to apply (4.29) for the Carleman linearization procedure, the truncation order given by Lemma 2 must grow exponentially with tt.

In fact, we prove in Section 5 that for R2\operatorname{R}\geq\sqrt{2}, no quantum algorithm (even one based on a technique other than Carleman linearization) can solve Problem 1 efficiently. It remains open to understand the complexity of the problem for 1R<21\leq\operatorname{R}<\sqrt{2}.

On the other hand, if R<1\operatorname{R}<1, both (4.28) and (4.29) decrease exponentially with NN, making the truncation efficient. We discuss the specific choice of NN in (4.130) below.

4.1.2 Error from forward Euler method

Next, we provide an upper bound for the error incurred by approximating (3.1) with the forward Euler method. This problem has been well studied for general ODEs. Given an ODE dzdt=f(z)\frac{\mathrm{d}{z}}{\mathrm{d}{t}}=f(z) on [0,T][0,T] with an inhomogenity ff that is an LL-Lipschitz continuous function of zz, the global error of the solution is upper bounded by eLTe^{LT}, although in most cases this bound overestimates the actual error [4]. To remove the exponential dependence on TT in our case, we derive a tighter bound for time discretization of (3.1) in Lemma 3 below. This lemma is potentially useful for other ODEs as well and can be straightforwardly adapted to other problems.

Lemma 3.

Consider an instance of the quantum quadratic ODE problem as defined in Problem 1, with R<1\operatorname{R}<1 as defined in (2.2). Choose a time step

hmin{1NF1,2(|Re(λ1)|F2F0)N(|Re(λ1)|2(F2+F0)2+F12)}h\leq\min\biggl{\{}\frac{1}{N\|F_{1}\|},\frac{2(|\mathop{\mathrm{Re}}(\lambda_{1})|-\|F_{2}\|-\|F_{0}\|)}{N(|\mathop{\mathrm{Re}}(\lambda_{1})|^{2}-(\|F_{2}\|+\|F_{0}\|)^{2}+\|F_{1}\|^{2})}\biggr{\}} (4.46)

in general, or

h1NF1h\leq\frac{1}{N\|F_{1}\|} (4.47)

if the eigenvalues of F1F_{1} are all real. Suppose the error from Carleman linearization η(t)\eta(t) as defined in Lemma 2 is bounded by

η(t)g4,\|\eta(t)\|\leq\frac{g}{4}, (4.48)

where gg is defined in (3.13). Then the global error from the forward Euler method (3.7) on the interval [0,T][0,T] for (3.1) satisfies

y^1(T)y1my^(T)ym3N2.5Th[(F2+F1+F0)2+F0].\|\hat{y}_{1}(T)-y^{m}_{1}\|\leq\|\hat{y}(T)-y^{m}\|\leq 3N^{2.5}Th[(\|F_{2}\|+\|F_{1}\|+\|F_{0}\|)^{2}+\|F_{0}^{\prime}\|]. (4.49)
Proof.

We define a linear system that locally approximates the initial value problem (3.1) on [kh,(k+1)h][kh,(k+1)h] for k[m]0k\in[{m}]_{0} as

zk=[I+A((k1)h)h]y^((k1)h)+b((k1)h),z^{k}=[I+A((k-1)h)h]\hat{y}((k-1)h)+b((k-1)h), (4.50)

where y^(t)\hat{y}(t) is the exact solution of (3.1). For k[m]k\in[{m}], we denote the local truncation error by

eky^(kh)zke^{k}\coloneqq\|\hat{y}(kh)-z^{k}\| (4.51)

and the global error by

gky^(kh)yk,g^{k}\coloneqq\|\hat{y}(kh)-y^{k}\|, (4.52)

where yky^{k} in (3.7) is the numerical solution. Note that gm=y^(T)ymg^{m}=\|\hat{y}(T)-y^{m}\|.

For the local truncation error, we Taylor expand y^((k1)h)\hat{y}((k-1)h) with a second-order Lagrange remainder, giving

y^(kh)=y^((k1)h)+y^((k1)h)h+y^′′(ξ)h22\hat{y}(kh)=\hat{y}((k-1)h)+\hat{y}^{\prime}((k-1)h)h+\frac{\hat{y}^{\prime\prime}(\xi)h^{2}}{2} (4.53)

for some ξ[(k1)h,kh]\xi\in[(k-1)h,kh]. Since y^((k1)h)=A((k1)h)y^((k1)h)+b((k1)h)\hat{y}^{\prime}((k-1)h)=A((k-1)h)\hat{y}((k-1)h)+b((k-1)h) by (3.1), we have

y^(kh)=[I+A((k1)h)h]y^((k1)h)+b((k1)h)+y^′′(ξ)h22=zk+y^′′(ξ)h22,\hat{y}(kh)=[I+A((k-1)h)h]\hat{y}((k-1)h)+b((k-1)h)+\frac{\hat{y}^{\prime\prime}(\xi)h^{2}}{2}=z^{k}+\frac{\hat{y}^{\prime\prime}(\xi)h^{2}}{2}, (4.54)

and thus the local error (4.51) can be bounded as

ek=y^(kh)zk=y^′′(ξ)hh22Mh22,e^{k}=\|\hat{y}(kh)-z^{k}\|=\|\hat{y}^{\prime\prime}(\xi)h\|\frac{h^{2}}{2}\leq\frac{Mh^{2}}{2}, (4.55)

where Mmaxt[0,T]y^′′(τ)M\coloneqq\max_{t\in[0,T]}\|\hat{y}^{\prime\prime}(\tau)\|.

By the triangle inequality, the global error (4.52) can therefore be bounded as

gk=y^(kh)yky^(kh)zk+zkykek+zkyk.g^{k}=\|\hat{y}(kh)-y^{k}\|\leq\|\hat{y}(kh)-z^{k}\|+\|z^{k}-y^{k}\|\leq e^{k}+\|z^{k}-y^{k}\|. (4.56)

Since yky^{k} and zkz^{k} are obtained by the same linear system with different right-hand sides, we have the upper bound

zkyk\displaystyle\|z^{k}-y^{k}\| =[I+A((k1)h)h][y^((k1)h)yk1]\displaystyle=\|[I+A((k-1)h)h][\hat{y}((k-1)h)-y^{k-1}]\| (4.57)
I+A((k1)h)hy^((k1)h)yk1\displaystyle\leq\|I+A((k-1)h)h\|\cdot\|\hat{y}((k-1)h)-y^{k-1}\|
=I+A((k1)h)hgk1.\displaystyle=\|I+A((k-1)h)h\|g^{k-1}.

In order to provide an upper bound for I+A(t)h\|I+A(t)h\| for all t[0,T]t\in[0,T], we write

I+A(t)h=H2+H1+H0(t)I+A(t)h=H_{2}+H_{1}+H_{0}(t) (4.58)

where

H2\displaystyle H_{2} =j=1N1|jj+1|Aj+1jh,\displaystyle=\sum_{j=1}^{N-1}|j\rangle\langle j+1|\otimes A_{j+1}^{j}h, (4.59)
H1\displaystyle H_{1} =I+j=1N|jj|Ajjh,\displaystyle=I+\sum_{j=1}^{N}|j\rangle\langle j|\otimes A_{j}^{j}h, (4.60)
H0(t)\displaystyle H_{0}(t) =j=2N|jj1|Aj1jh.\displaystyle=\sum_{j=2}^{N}|j\rangle\langle j-1|\otimes A_{j-1}^{j}h. (4.61)

We provide upper bounds separately for H2\|H_{2}\|, H1\|H_{1}\|, and H0maxt[0,T]H0(t)\|H_{0}\|\coloneqq\max_{t\in[0,T]}\|H_{0}(t)\|, and use the bound maxt[0,T]I+A(t)hH2+H1+H0\max_{t\in[0,T]}\|I+A(t)h\|\leq\|H_{2}\|+\|H_{1}\|+\|H_{0}\|.

The eigenvalues of AjjA_{j}^{j} consist of all jj-term sums of the eigenvalues of F1F_{1}. More precisely, they are {[j]λj}j[n]j\{\sum_{\ell\in[{j}]}\lambda_{\mathcal{I}^{j}_{\ell}}\}_{\mathcal{I}^{j}\in[{n}]^{j}} where {λ}[n]\{\lambda_{\ell}\}_{\ell\in[{n}]} are the eigenvalues of F1F_{1} and j[n]j\mathcal{I}^{j}\in[{n}]^{j} is a jj-tuple of indices. The eigenvalues of H1H_{1} are thus {1+h[j]λj}j[n]j,j[N]\{1+h\sum_{\ell\in[{j}]}\lambda_{\mathcal{I}_{\ell}^{j}}\}_{\mathcal{I}^{j}\in[{n}]^{j},j\in[{N}]}. With Jmax[n]|Im(λ)|J\coloneqq\max_{\ell\in[{n}]}|\mathop{\mathrm{Im}}(\lambda_{\ell})|, we have

|1+h[j]λj|2\displaystyle\Big{|}1+h\sum_{\ell\in[{j}]}\lambda_{\mathcal{I}^{j}_{\ell}}\Big{|}^{2} =|1+h[j]Re(λj)|2+|h[j]Im(λj)|2\displaystyle=\Big{|}1+h\sum_{\ell\in[{j}]}\mathop{\mathrm{Re}}(\lambda_{\mathcal{I}^{j}_{\ell}})\Big{|}^{2}+\Big{|}h\sum_{\ell\in[{j}]}\mathop{\mathrm{Im}}(\lambda_{\mathcal{I}^{j}_{\ell}})\Big{|}^{2} (4.62)
12Nh|Re(λ1)|+N2h2(|Re(λ1)|2+J2)\displaystyle\leq 1-2Nh|\mathop{\mathrm{Re}}(\lambda_{1})|+N^{2}h^{2}(|\mathop{\mathrm{Re}}(\lambda_{1})|^{2}+J^{2})

where we used Nh|Re(λ1)|1Nh|\mathop{\mathrm{Re}}(\lambda_{1})|\leq 1 by (4.46). Therefore

H1=maxj[N]maxj[n]j|1+h[j]λj|12Nh|Re(λ1)|+N2h2(|Re(λ1)|2+J2).\|H_{1}\|=\max_{j\in[{N}]}\max_{\mathcal{I}^{j}\in[{n}]^{j}}\Big{|}1+h\sum_{\ell\in[{j}]}\lambda_{\mathcal{I}^{j}_{\ell}}\Big{|}\leq\sqrt{1-2Nh|\mathop{\mathrm{Re}}(\lambda_{1})|+N^{2}h^{2}(|\mathop{\mathrm{Re}}(\lambda_{1})|^{2}+J^{2})}. (4.63)

We also have

H2=j=1N1|jj+1|Aj+1jhmaxj[N]Aj+1jhNF2h\|H_{2}\|=\biggl{\|}\sum_{j=1}^{N-1}|j\rangle\langle j+1|\otimes A_{j+1}^{j}h\biggr{\|}\leq\max_{j\in[{N}]}\|A_{j+1}^{j}\|h\leq N\|F_{2}\|h (4.64)

and

H0=maxt[0,T]j=1N1|jj01|Aj1jhmaxt[0,T]maxj[N]Aj1jhNmaxt[0,T]F0(t)hNF0h.\|H_{0}\|=\max_{t\in[0,T]}\biggl{\|}\sum_{j=1}^{N-1}|j\rangle\langle j01|\otimes A_{j-1}^{j}h\biggr{\|}\leq\max_{t\in[0,T]}\max_{j\in[{N}]}\|A_{j-1}^{j}\|h\leq N\max_{t\in[0,T]}\|F_{0}(t)\|h\leq N\|F_{0}\|h. (4.65)

Using the bounds (4.63) and (4.64), we aim to select the value of hh to ensure

maxt[0,T]I+A(t)hH2+H1+H01.\max_{t\in[0,T]}\|I+A(t)h\|\leq\|H_{2}\|+\|H_{1}\|+\|H_{0}\|\leq 1. (4.66)

The assumption (4.46) implies

h2(|Re(λ1)|F2F0)N(|Re(λ1)|2(F2+F0)2+J2)h\leq\frac{2(|\mathop{\mathrm{Re}}(\lambda_{1})|-\|F_{2}\|-\|F_{0}\|)}{N(|\mathop{\mathrm{Re}}(\lambda_{1})|^{2}-(\|F_{2}\|+\|F_{0}\|)^{2}+J^{2})} (4.67)

(note that the denominator is non-zero due to (2.3)). Then we have

N2h2(|Re(λ1)|2F22+J2)\displaystyle N^{2}h^{2}(|\mathop{\mathrm{Re}}(\lambda_{1})|^{2}-\|F_{2}\|^{2}+J^{2}) 2Nh(|Re(λ1)|F2F0)\displaystyle\leq 2Nh(|\mathop{\mathrm{Re}}(\lambda_{1})|-\|F_{2}\|-\|F_{0}\|) (4.68)
\displaystyle\implies 12Nh|Re(λ1)|+N2h2(|Re(λ1)|2+J2)\displaystyle 1-2Nh|\mathop{\mathrm{Re}}(\lambda_{1})|+N^{2}h^{2}(|\mathop{\mathrm{Re}}(\lambda_{1})|^{2}+J^{2}) 12N(F2+F0)h+N2(F2+F0)2h2\displaystyle\leq 1-2N(\|F_{2}\|+\|F_{0}\|)h+N^{2}(\|F_{2}\|+\|F_{0}\|)^{2}h^{2}
\displaystyle\implies 12Nh|Re(λ1)|+N2h2(|Re(λ1)|2+J2)\displaystyle\sqrt{1-2Nh|\mathop{\mathrm{Re}}(\lambda_{1})|+N^{2}h^{2}(|\mathop{\mathrm{Re}}(\lambda_{1})|^{2}+J^{2})} 1N(F2+F0)h,\displaystyle\leq 1-N(\|F_{2}\|+\|F_{0}\|)h,

so maxt[0,T]I+A(t)h1\max_{t\in[0,T]}\|I+A(t)h\|\leq 1 as claimed.

The choice (4.46) can be improved if an upper bound on JJ is known. In particular, if J=0J=0, (4.67) simplifies to

h2N(|λ1|+F2+F0),h\leq\frac{2}{N(|\lambda_{1}|+\|F_{2}\|+\|F_{0}\|)}, (4.69)

which is satisfied by (4.47) using F2+F0<|λ1|F1\|F_{2}\|+\|F_{0}\|<|\lambda_{1}|\leq\|F_{1}\|.

Using this in (4.57), we have

zkykI+A((k1)h)hgk1gk1.\|z^{k}-y^{k}\|\leq\|I+A((k-1)h)h\|g^{k-1}\leq g^{k-1}. (4.70)

Plugging (4.70) into (4.56) iteratively, we find

gkgk1+ekgk2+ek1+ekj=1kej,k[m+1]0.g^{k}\leq g^{k-1}+e^{k}\leq g^{k-2}+e^{k-1}+e^{k}\leq\cdots\leq\sum_{j=1}^{k}e^{j},\quad k\in[{m+1}]_{0}. (4.71)

Using (4.55), this shows that the global error from the forward Euler method is bounded by

y^1(kh)y1ky^(kh)yk=gkj=1kejMkh22,\|\hat{y}^{1}(kh)-y^{k}_{1}\|\leq\|\hat{y}(kh)-y^{k}\|=g^{k}\leq\sum_{j=1}^{k}e^{j}\leq\frac{Mkh^{2}}{2}, (4.72)

and when k=mk=m, mh=Tmh=T,

y^1(T)y1mgmmMh22=MTh2.\|\hat{y}^{1}(T)-y^{m}_{1}\|\leq g^{m}\leq m\frac{Mh^{2}}{2}=\frac{MTh}{2}. (4.73)

Finally, we remove the dependence on M=maxt[0,T]y^′′(τ)M=\max_{t\in[0,T]}\|\hat{y}^{\prime\prime}(\tau)\|. Since

y^′′(t)\displaystyle\hat{y}^{\prime\prime}(t) =[A(t)y^(t)+b(t)]=A(t)y^(t)+A(t)y^(t)+b(t)\displaystyle=[A(t)\hat{y}(t)+b(t)]^{\prime}=A(t)\hat{y}^{\prime}(t)+A^{\prime}(t)\hat{y}(t)+b^{\prime}(t) (4.74)
=A(t)[A(t)y^(t)+b(t)]+A(t)y^(t)+b(t),\displaystyle=A(t)[A(t)\hat{y}(t)+b(t)]+A^{\prime}(t)\hat{y}(t)+b^{\prime}(t),

we have

y^′′(t)=A(t)2y^(t)+A(t)b(t)+A(t)y^(t)+b(t).\|\hat{y}^{\prime\prime}(t)\|=\|A(t)\|^{2}\|\hat{y}(t)\|+\|A(t)\|\|b(t)\|+\|A^{\prime}(t)\|\|\hat{y}(t)\|+\|b^{\prime}(t)\|. (4.75)

Maximizing each term for t[0,T]t\in[0,T], we have

maxt[0,T]A(t)=j=1N1|jj+1|Aj+1j+j=1N|jj|Ajj+j=2N|jj1|Aj1jN(F2+F1+F0),\max_{t\in[0,T]}\|A(t)\|=\biggl{\|}\sum_{j=1}^{N-1}|j\rangle\langle j+1|\otimes A_{j+1}^{j}+\sum_{j=1}^{N}|j\rangle\langle j|\otimes A_{j}^{j}+\sum_{j=2}^{N}|j\rangle\langle j-1|\otimes A_{j-1}^{j}\biggr{\|}\leq N(\|F_{2}\|+\|F_{1}\|+\|F_{0}\|), (4.76)
maxt[0,T]A(t)=j=2N|jj1|(Aj1j)NF0(t)NF0,\max_{t\in[0,T]}\|A^{\prime}(t)\|=\biggl{\|}\sum_{j=2}^{N}|j\rangle\langle j-1|\otimes(A_{j-1}^{j})^{\prime}\biggr{\|}\leq N\|F^{\prime}_{0}(t)\|\leq N\|F^{\prime}_{0}\|, (4.77)
maxt[0,T]b(t)=maxt[0,T]F0(t)F0,\max_{t\in[0,T]}\|b(t)\|=\max_{t\in[0,T]}\|F_{0}(t)\|\leq\|F_{0}\|, (4.78)
maxt[0,T]b(t)=maxt[0,T]F0(t)F0,\max_{t\in[0,T]}\|b^{\prime}(t)\|=\max_{t\in[0,T]}\|F_{0}^{\prime}(t)\|\leq\|F_{0}^{\prime}\|, (4.79)

and using uuin<1\|u\|\leq\|u_{\mathrm{in}}\|<1, ηj(t)η(t)g/4<uin/4\|\eta_{j}(t)\|\leq\|\eta(t)\|\leq g/4<\|u_{\mathrm{in}}\|/4 by (4.48), and R<1\operatorname{R}<1, we have

y^(t)2\displaystyle\|\hat{y}(t)\|^{2} j=1Ny^j(t)2=j=1Nuj(t)ηj(t)22j=1N(uj(t)2+ηj(t)2)\displaystyle\leq\sum_{j=1}^{N}\|\hat{y}_{j}(t)\|^{2}=\sum_{j=1}^{N}\|u^{\otimes j}(t)-\eta_{j}(t)\|^{2}\leq 2\sum_{j=1}^{N}(\|u^{\otimes j}(t)\|^{2}+\|\eta_{j}(t)\|^{2}) (4.80)
2j=1N(uin2j+uin216)<2j=1N(1+116)uin2<4Nuin2<4N\displaystyle\leq 2\sum_{j=1}^{N}\biggl{(}\|u_{\mathrm{in}}\|^{2j}+\frac{\|u_{\mathrm{in}}\|^{2}}{16}\biggr{)}<2\sum_{j=1}^{N}(1+\frac{1}{16})\|u_{\mathrm{in}}\|^{2}<4N\|u_{\mathrm{in}}\|^{2}<4N

for all t[0,T]t\in[0,T]. Therefore, substituting the bounds (4.76)–(4.80) into (4.75), we find

M\displaystyle M maxt[0,T]A(t)2y^(t)+A(t)b(t)+A(t)y^(t)+b(t)\displaystyle\leq\max_{t\in[0,T]}\|A(t)\|^{2}\|\hat{y}(t)\|+\|A(t)\|\|b(t)\|+\|A^{\prime}(t)\|\|\hat{y}(t)\|+\|b^{\prime}(t)\| (4.81)
2N2.5(F2+F1+F0)2+N(F2+F1+F0)F0+2N1.5F0+F0\displaystyle\leq 2N^{2.5}(\|F_{2}\|+\|F_{1}\|+\|F_{0}\|)^{2}+N(\|F_{2}\|+\|F_{1}\|+\|F_{0}\|)\|F_{0}\|+2N^{1.5}\|F^{\prime}_{0}\|+\|F_{0}^{\prime}\|
6N2.5[(F2+F1+F0)2+F0].\displaystyle\leq 6N^{2.5}[(\|F_{2}\|+\|F_{1}\|+\|F_{0}\|)^{2}+\|F_{0}^{\prime}\|].

Thus, (4.73) gives

y^1(kh)y1m3N2.5kh2[(F2+F1+F0)2+F0],\|\hat{y}^{1}(kh)-y^{m}_{1}\|\leq 3N^{2.5}kh^{2}[(\|F_{2}\|+\|F_{1}\|+\|F_{0}\|)^{2}+\|F_{0}^{\prime}\|], (4.82)

and when k=mk=m, mh=Tmh=T,

y^1(T)y1m3N2.5Th[(F2+F1+F0)2+F0]\|\hat{y}^{1}(T)-y^{m}_{1}\|\leq 3N^{2.5}Th[(\|F_{2}\|+\|F_{1}\|+\|F_{0}\|)^{2}+\|F_{0}^{\prime}\|] (4.83)

as claimed. ∎

4.2 Condition number

Now we upper bound the condition number of the linear system.

Lemma 4.

Consider an instance of the quantum quadratic ODE problem as defined in Problem 1. Apply the forward Euler method (3.7) with time step (4.46) to the Carleman linearization (3.1). Then the condition number of the matrix LL defined in (3.8) satisfies

κ3(m+p+1).\kappa\leq 3(m+p+1). (4.84)
Proof.

We begin by upper bounding L\|L\|. We write

L=L1+L2+L3,L=L_{1}+L_{2}+L_{3}, (4.85)

where

L1\displaystyle L_{1} =k=0m+p|kk|I,\displaystyle=\sum_{k=0}^{m+p}|k\rangle\langle k|\otimes I, (4.86)
L2\displaystyle L_{2} =k=1m|kk1|[I+A((k1)h)h],\displaystyle=-\sum_{k=1}^{m}|k\rangle\langle k-1|\otimes[I+A((k-1)h)h], (4.87)
L3\displaystyle L_{3} =k=m+1m+p|kk1|I.\displaystyle=-\sum_{k=m+1}^{m+p}|k\rangle\langle k-1|\otimes I. (4.88)

Clearly L1=L3=1\|L_{1}\|=\|L_{3}\|=1. Furthermore, L2maxt[0,T]I+A(t)h1\|L_{2}\|\leq\max_{t\in[0,T]}\|I+A(t)h\|\leq 1 by (4.66), which follows from the choice of time step (4.46). Therefore,

LL1+L2+L33.\|L\|\leq\|L_{1}\|+\|L_{2}\|+\|L_{3}\|\leq 3. (4.89)

Next we upper bound

L1=sup|B1L1|B.\|L^{-1}\|=\sup_{\||B\rangle\|\leq 1}\|L^{-1}|B\rangle\|. (4.90)

We express |B|B\rangle as

|B=k=0m+pβk|k=k=0m+p|bk,|B\rangle=\sum_{k=0}^{m+p}\beta_{k}|k\rangle=\sum_{k=0}^{m+p}|b^{k}\rangle, (4.91)

where |bkβk|k|b^{k}\rangle\coloneqq\beta_{k}|k\rangle satisfies

k=0m+p|bk2=|B21.\sum_{k=0}^{m+p}\||b^{k}\rangle\|^{2}=\||B\rangle\|^{2}\leq 1. (4.92)

Given any |bk|b^{k}\rangle for k[m+p+1]0k\in[{m+p+1}]_{0}, we define

|YkL1|bk=l=0m+pγlk|l=l=0m+p|Ylk,|Y^{k}\rangle\coloneqq L^{-1}|b^{k}\rangle=\sum_{l=0}^{m+p}\gamma^{k}_{l}|l\rangle=\sum_{l=0}^{m+p}|Y^{k}_{l}\rangle, (4.93)

where |Ylkγlk|l|Y^{k}_{l}\rangle\coloneqq\gamma^{k}_{l}|l\rangle. We first upper bound |Yk=L1|bk\||Y^{k}\rangle\|=\|L^{-1}|b^{k}\rangle\|, and then use this to upper bound L1|B\|L^{-1}|B\rangle\|.

We consider two cases. First, for fixed k[m+1]0k\in[{m+1}]_{0}, we directly calculate |Ylk|Y^{k}_{l}\rangle for each l[m+p+1]0l\in[{m+p+1}]_{0} by the forward Euler method (3.7), giving

|Ylk={0,if l[k]0;|bk,if l=k;Πj=kl1[I+A(jh)h]|bk,if l[m+1]0[k+1]0;Πj=km1[I+A(jh)h]|bk,if l[m+p+1]0[m+1]0.|Y^{k}_{l}\rangle=\begin{cases}0,&\text{if }l\in[{k}]_{0};\\ |b^{k}\rangle,&\text{if }l=k;\\ \Pi_{j=k}^{l-1}[I+A(jh)h]|b^{k}\rangle,&\text{if }l\in[{m+1}]_{0}\setminus[{k+1}]_{0};\\ \Pi_{j=k}^{m-1}[I+A(jh)h]|b^{k}\rangle,&\text{if }l\in[{m+p+1}]_{0}\setminus[{m+1}]_{0}.\end{cases} (4.94)

Since maxt[0,T]I+A(t)h|1\max_{t\in[0,T]}\|I+A(t)h\||\leq 1 by (4.66), (4.93) gives

|Yk2\displaystyle\||Y^{k}\rangle\|^{2} =l=0m+p|Ylk2l=km|bk2+l=m+1m+p|bk2\displaystyle=\sum_{l=0}^{m+p}\||Y^{k}_{l}\rangle\|^{2}\leq\sum_{l=k}^{m}\||b^{k}\rangle\|^{2}+\sum_{l=m+1}^{m+p}\||b^{k}\rangle\|^{2} (4.95)
(m+p+1k)|bk2(m+p+1)|bk2.\displaystyle\leq(m+p+1-k)\||b^{k}\rangle\|^{2}\leq(m+p+1)\||b^{k}\rangle\|^{2}.

Second, for fixed k[m+p+1]0[m+1]0k\in[{m+p+1}]_{0}\setminus[{m+1}]_{0}, similarly to (4.94), we directly calculate |Ylk|Y^{k}_{l}\rangle using (3.7), giving

|Ylk={0,if l[k]0;|bk,if l[m+p+1]0[k]0.|Y^{k}_{l}\rangle=\begin{cases}0,&\text{if }l\in[{k}]_{0};\\ |b^{k}\rangle,&\text{if }l\in[{m+p+1}]_{0}\setminus[{k}]_{0}.\end{cases} (4.96)

Similarly to (4.95), we have (again using (4.93))

|Yk2=l=0m+p|Ylk2=l=km+p|bk2=(m+p+1k)|bk2(m+p+1)|bk2.\||Y^{k}\rangle\|^{2}=\sum_{l=0}^{m+p}\||Y^{k}_{l}\rangle\|^{2}=\sum_{l=k}^{m+p}\||b^{k}\rangle\|^{2}=(m+p+1-k)\||b^{k}\rangle\|^{2}\leq(m+p+1)\||b^{k}\rangle\|^{2}. (4.97)

Combining (4.95) and (4.97), for any k[m+p+1]0k\in[{m+p+1}]_{0}, we have

|Yk2=L1|bk2(m+p+1)|bk2.\||Y^{k}\rangle\|^{2}=\|L^{-1}|b^{k}\rangle\|^{2}\leq(m+p+1)\||b^{k}\rangle\|^{2}. (4.98)

By the definition of |Yk|Y^{k}\rangle in (4.93), (4.98) gives

L12=sup|B1L1|B2(m+p+1)sup|bk1L1|bk2(m+p+1)2,\|L^{-1}\|^{2}=\sup_{\||B\rangle\|\leq 1}\|L^{-1}|B\rangle\|^{2}\leq(m+p+1)\sup_{\||b^{k}\rangle\|\leq 1}\|L^{-1}|b^{k}\rangle\|^{2}\leq(m+p+1)^{2}, (4.99)

and therefore

L1(m+p+1).\|L^{-1}\|\leq(m+p+1). (4.100)

Finally, combining (4.89) with (4.100), we conclude

κ=LL13(m+p+1)\kappa=\|L\|\|L^{-1}\|\leq 3(m+p+1) (4.101)

as claimed. ∎

4.3 State preparation

We now describe a procedure for preparing the right-hand side |B|B\rangle of the linear system (3.8), whose entries are composed of |yin|y_{\mathrm{in}}\rangle and |b((k1)h)|b((k-1)h)\rangle for k[m]k\in[{m}].

The initial vector yiny_{\mathrm{in}} is a direct sum over spaces of different dimensions, which is cumbersome to prepare. Instead, we prepare an equivalent state that has a convenient tensor product structure. Specifically, we embed yiny_{\mathrm{in}} into a slightly larger space and prepare the normalized version of

zin=[uinv0N1;uin2v0N2;;uinN],z_{\mathrm{in}}=[u_{\mathrm{in}}\otimes v_{0}^{N-1};u_{\mathrm{in}}^{\otimes 2}\otimes v_{0}^{N-2};\ldots;u_{\mathrm{in}}^{\otimes N}], (4.102)

where v0v_{0} is some standard vector (for simplicity, we take v0=|0v_{0}=\ket{0}). If uinu_{\mathrm{in}} lives in a vector space of dimension nn, then zinz_{\mathrm{in}} lives in a space of dimension NnNNn^{N} while yiny_{\mathrm{in}} lives in a slightly smaller space of dimension Δ=n+n2++nN=(nN+1n)/(n1)\Delta=n+n^{2}+\dots+n^{N}=(n^{N+1}-n)/(n-1). Using standard techniques, all the operations we would otherwise apply to yiny_{\mathrm{in}} can be applied instead to zinz_{\mathrm{in}}, with the same effect.

Lemma 5.

Assume we are given the value uin\|u_{\mathrm{in}}\|, and let OxO_{x} be an oracle that maps |000n|00\ldots 0\rangle\in{\mathbb{C}}^{n} to a normalized quantum state |uin|u_{\mathrm{in}}\rangle proportional to uinu_{\mathrm{in}}. Assume we are also given the values F0(t)\|F_{0}(t)\| for each t[0,T]t\in[0,T], and let OF0O_{F_{0}} be an oracle that provides the locations and values of the nonzero entries of F0(t)F_{0}(t) for any specified tt. Then the quantum state |B|B\rangle defined in (3.10) (with yiny_{\mathrm{in}} replaced by zinz_{\mathrm{in}}) can be prepared using O(N)O(N) queries to OxO_{x} and O(m)O(m) queries to OF0O_{F_{0}}, with gate complexity larger by a poly(logN,logn)\operatorname{poly}(\log N,\log n) factor.

Proof.

We first show how to prepare the state

|zin=1Vj=1Nuinj|j|uinj|0Nj,\ket{z_{\mathrm{in}}}=\frac{1}{\sqrt{V}}\sum_{j=1}^{N}\|{u_{\mathrm{in}}}\|^{j}|j\rangle|u_{\mathrm{in}}\rangle^{\otimes j}|0\rangle^{\otimes N-j}, (4.103)

where

Vj=1Nuin2j.V\coloneqq\sum_{j=1}^{N}\|u_{\mathrm{in}}\|^{2j}. (4.104)

This state can be prepared using NN queries to the initial state oracle OxO_{x} applied in superposition to the intermediate state

|ψint1Vj=1Nuinj|j|0N.\ket{\psi_{\mathrm{int}}}\coloneqq\frac{1}{\sqrt{V}}\sum_{j=1}^{N}\|{u_{\mathrm{in}}}\|^{j}|j\rangle\otimes\ket{0}^{\otimes N}. (4.105)

To efficiently prepare |ψint\ket{\psi_{\mathrm{int}}}, notice that

|ψint=uinVj0,j1,,jk1=01=0k1uinj2|j0j1jk1|0N,\ket{\psi_{\mathrm{int}}}=\frac{\|{u_{\mathrm{in}}}\|}{\sqrt{V}}\sum_{j_{0},j_{1},\dots,j_{k-1}=0}^{1}\prod_{\ell=0}^{k-1}\|{u_{\mathrm{in}}}\|^{j_{\ell}2^{\ell}}\ket{j_{0}j_{1}\dots j_{k-1}}\otimes\ket{0}^{\otimes N}, (4.106)

where klog2Nk\coloneqq\log_{2}N (assuming for simplicity that NN is a power of 22) and jk1j1j0j_{k-1}\dots j_{1}j_{0} is the kk-bit binary expansion of j1j-1. Observe that

|ψint==0k1(1Vj=01uinj2|j)|0N\ket{\psi_{\mathrm{int}}}=\bigotimes_{\ell=0}^{k-1}\bigg{(}\frac{1}{\sqrt{V_{\ell}}}\sum_{j_{\ell}=0}^{1}\|{u_{\mathrm{in}}}\|^{j_{\ell}2^{\ell}}\ket{j_{\ell}}\bigg{)}\otimes\ket{0}^{\otimes N} (4.107)

where

V1+uin2+1.V_{\ell}\coloneqq 1+\|{u_{\mathrm{in}}}\|^{2^{\ell+1}}. (4.108)

(Notice that =0k1V=V/uin2\prod_{\ell=0}^{k-1}V_{\ell}=V/\|{u_{\mathrm{in}}}\|^{2}.) Each tensor factor in (4.107) is a qubit that can be produced in constant time. Overall, we prepare these k=log2Nk=\log_{2}N qubit states and then apply OxO_{x} NN times.

We now discuss how to prepare the state

|B=1Bm(zin|0|zin+k=1mb((k1)h)|k|b((k1)h)),|B\rangle=\frac{1}{\sqrt{B_{m}}}\Bigl{(}\|z_{\mathrm{in}}\||0\rangle\otimes|z_{\mathrm{in}}\rangle+\sum_{k=1}^{m}\|b((k-1)h)\||k\rangle\otimes|b((k-1)h)\rangle\Bigr{)}, (4.109)

in which we replace yiny_{\mathrm{in}} by zinz_{\mathrm{in}} in (3.10), and define

Bmzin2+k=1mb((k1)h)2.B_{m}\coloneqq\|{z_{\mathrm{in}}}\|^{2}+\sum_{k=1}^{m}\|b((k-1)h)\|^{2}. (4.110)

This state can be prepared using the above procedure for |0|zin|0\rangle\mapsto|z_{\mathrm{in}}\rangle and mm queries to OF0O_{F_{0}} with t=(k1)ht=(k-1)h that implement |0|b((k1)h)|0\rangle\mapsto|b((k-1)h)\rangle for k{1,,m}k\in\{1,\ldots,m\}, applied in superposition to the intermediate state

|ϕint=1Bm(zin|0|0+k=1mb((k1)h)|k|0).|\phi_{\mathrm{int}}\rangle=\frac{1}{\sqrt{B_{m}}}\Bigl{(}\|z_{\mathrm{in}}\||0\rangle\otimes|0\rangle+\sum_{k=1}^{m}\|b((k-1)h)\||k\rangle\otimes|0\rangle\Bigr{)}. (4.111)

Here the queries are applied conditionally upon the value in the first register: we prepare |zin|z_{\mathrm{in}}\rangle if the first register is |0|0\rangle and |b((k1)h)|b((k-1)h)\rangle if the first register is |k|k\rangle for k{1,,m}k\in\{1,\ldots,m\}. We can prepare |ϕint|\phi_{\mathrm{int}}\rangle (i.e., perform a unitary transform mapping |0|0|ϕint|0\rangle|0\rangle\mapsto|\phi_{\mathrm{int}}\rangle) in time complexity O(m)O(m) [48] using the known values of uin\|{u_{\mathrm{i}n}}\| and b((k1)h)\|{b((k-1)h)}\|.

Overall, we use O(N)O(N) queries to OxO_{x} and O(m)O(m) queries to OF0O_{F_{0}} to prepare |B|B\rangle. The gate complexity is larger by a poly(logN,logn)\operatorname{poly}(\log N,\log n) factor. ∎

4.4 Measurement success probability

After applying the QLSA to (3.8), we perform a measurement to extract a final state of the desired form. We now consider the probability of this measurement succeeding.

Lemma 6.

Consider an instance of the quantum quadratic ODE problem defined in Problem 1, with the QLSA applied to the linear system (3.8) using the forward Euler method (3.7) with time step (4.46). Suppose the error from Carleman linearization satisfies η(t)g4\|\eta(t)\|\leq\frac{g}{4} as in (4.48), and the global error from the forward Euler method as defined in Lemma 3 is bounded by

y^(T)ymg4,\|\hat{y}(T)-y^{m}\|\leq\frac{g}{4}, (4.112)

where gg is defined in (3.13). Then the probability of measuring a state |y1k|y^{k}_{1}\rangle for k=[m+p+1]0[m+1]0k=[{m+p+1}]_{0}\setminus[{m+1}]_{0} satisfies

Pmeasurep+19(m+p+1)Nq2,P_{\mathrm{measure}}\geq\frac{p+1}{9(m+p+1)Nq^{2}}, (4.113)

where qq is also defined in (3.13).

Proof.

The idealized quantum state produced by the QLSA applied to (3.8) has the form

|Y=k=0m+p|yk|k=k=0m+pj=1N|yjk|j|k|Y\rangle=\sum_{k=0}^{m+p}|y^{k}\rangle|k\rangle=\sum_{k=0}^{m+p}\sum_{j=1}^{N}|y_{j}^{k}\rangle|j\rangle|k\rangle (4.114)

where the states |yk|y^{k}\rangle and |yjk|y_{j}^{k}\rangle for k[m+p+1]0k\in[{m+p+1}]_{0} and j[N]j\in[{N}] are subnormalized to ensure |Y=1\||Y\rangle\|=1.

We decompose the state |Y|Y\rangle as

|Y=|Ybad+|Ygood,|Y\rangle=|Y_{\mathrm{bad}}\rangle+|Y_{\mathrm{good}}\rangle, (4.115)

where

|Ybad\displaystyle|Y_{\mathrm{bad}}\rangle k=0m1j=1N|yjk|j|k+k=mm+pj=2N|yjk|j|k,\displaystyle\coloneqq\sum_{k=0}^{m-1}\sum_{j=1}^{N}|y_{j}^{k}\rangle|j\rangle|k\rangle+\sum_{k=m}^{m+p}\sum_{j=2}^{N}|y_{j}^{k}\rangle|j\rangle|k\rangle, (4.116)
|Ygood\displaystyle|Y_{\mathrm{good}}\rangle k=mm+p|y1k|1|k.\displaystyle\coloneqq\sum_{k=m}^{m+p}|y_{1}^{k}\rangle|1\rangle|k\rangle.

Note that |y1k=|y1m|y_{1}^{k}\rangle=|y_{1}^{m}\rangle for all k{m,m+1,,m+p}k\in\{m,m+1,\ldots,m+p\}. We lower bound

Pmeasure|Ygood2|Y2=(p+1)|y1m2|Y2P_{\mathrm{measure}}\coloneqq\frac{\||Y_{\mathrm{good}}\rangle\|^{2}}{\||Y\rangle\|^{2}}=\frac{(p+1)\||y^{m}_{1}\rangle\|^{2}}{\||Y\rangle\|^{2}} (4.117)

by lower bounding the terms of the product

|y1m2|Y2=|y1m2|y102|y102|Y2.\frac{\||y^{m}_{1}\rangle\|^{2}}{\||Y\rangle\|^{2}}=\frac{\||y^{m}_{1}\rangle\|^{2}}{\||y^{0}_{1}\rangle\|^{2}}\cdot\frac{\||y^{0}_{1}\rangle\|^{2}}{\||Y\rangle\|^{2}}. (4.118)

First, according to (4.48) and (4.112), the exact solution u(T)u(T) and the approximate solution y1my^{m}_{1} defined in (3.8) satisfy

u(T)y1mu(T)y^1(T)+y^1(T)y1mη(t)+y^(T)ymg2.\|u(T)-y^{m}_{1}\|\leq\|u(T)-\hat{y}_{1}(T)\|+\|\hat{y}_{1}(T)-y^{m}_{1}\|\leq\|\eta(t)\|+\|\hat{y}(T)-y^{m}\|\leq\frac{g}{2}. (4.119)

Since y10=(yin)1=uiny^{0}_{1}=(y_{\mathrm{in}})_{1}=u_{\mathrm{in}}, using (4.119), we have

|y1m|y10=y1muinu(T)u(T)y1muin=gu(T)y1muing2uin=12q.\frac{\||y^{m}_{1}\rangle\|}{\||y^{0}_{1}\rangle\|}=\frac{\|y^{m}_{1}\|}{\|u_{\mathrm{in}}\|}\geq\frac{\|u(T)\|-\|u(T)-y^{m}_{1}\|}{\|u_{\mathrm{in}}\|}=\frac{g-\|u(T)-y^{m}_{1}\|}{\|u_{\mathrm{in}}\|}\geq\frac{g}{2\|u_{\mathrm{in}}\|}=\frac{1}{2q}. (4.120)

Second, we upper bound yk2\|y^{k}\|^{2} by

yk2=y^(kh)[y(kh)yk]22(y^(kh)2+y(kh)yk2).\displaystyle\|y^{k}\|^{2}=\|\hat{y}(kh)-[y(kh)-y^{k}]\|^{2}\leq 2(\|\hat{y}(kh)\|^{2}+\|y(kh)-y^{k}\|^{2}). (4.121)

Using y^(t)2<4Nuin2\|\hat{y}(t)\|^{2}<4N\|u_{\mathrm{in}}\|^{2} by (4.80), and y(kh)yky^(T)ymg/4<uin/4\|y(kh)-y^{k}\|\leq\|\hat{y}(T)-y^{m}\|\leq g/4<\|u_{\mathrm{in}}\|/4 by (4.112), and R<1\operatorname{R}<1, we have

yk22(4Nuin2+uin216)<9Nuin2.\displaystyle\|y^{k}\|^{2}\leq 2\biggl{(}4N\|u_{\mathrm{in}}\|^{2}+\frac{\|u_{\mathrm{in}}\|^{2}}{16}\biggr{)}<9N\|u_{\mathrm{in}}\|^{2}. (4.122)

Therefore

|y102|Y2=|y102k=0m+p|yk2uin29N(m+p+1)uin2=19N(m+p+1).\frac{\||y^{0}_{1}\rangle\|^{2}}{\||Y\rangle\|^{2}}=\frac{\||y^{0}_{1}\rangle\|^{2}}{\sum_{k=0}^{m+p}\||y^{k}\rangle\|^{2}}\geq\frac{\|u_{\mathrm{in}}\|^{2}}{9N(m+p+1)\|u_{\mathrm{in}}\|^{2}}=\frac{1}{9N(m+p+1)}. (4.123)

Finally, using (4.120) and (4.123) in (4.118) and (4.117), we have

Pmeasurep+19(m+p+1)Nq2P_{\mathrm{measure}}\geq\frac{p+1}{9(m+p+1)Nq^{2}} (4.124)

as claimed. ∎

Choosing m=pm=p, we have Pmeasure=Ω(1/Nq2)P_{\mathrm{measure}}=\Omega(1/Nq^{2}). Using amplitude amplification, O(Nq)O(\sqrt{N}q) iterations suffice to succeed with constant probability.

4.5 Proof of Theorem 1

Proof.

We first present the quantum Carleman linearization (QCL) algorithm and then analyze its complexity.

The QCL algorithm.

We start by rescaling the system to satisfy (2.3) and (2.4). Given a quadratic ODE (2.1) satisfying R<1\operatorname{R}<1 (where R\operatorname{R} is defined in (2.2)), we define a scaling factor γ>0\gamma>0, and rescale uu to

u¯γu.\overline{u}\coloneqq\gamma u. (4.125)

Replacing uu by u¯\overline{u} in (2.1), we have

du¯dt\displaystyle\frac{\mathrm{d}{\overline{u}}}{\mathrm{d}{t}} =1γF2u¯2+F1u¯+γF0(t),\displaystyle=\frac{1}{\gamma}F_{2}\overline{u}^{\otimes 2}+F_{1}\overline{u}+\gamma F_{0}(t), (4.126)
u¯(0)\displaystyle\overline{u}(0) =u¯inγuin.\displaystyle=\overline{u}_{\mathrm{in}}\coloneqq\gamma u_{\mathrm{in}}.

We let F¯21γF2\overline{F}_{2}\coloneqq\frac{1}{\gamma}F_{2}, F¯1F1\overline{F}_{1}\coloneqq F_{1}, and F¯0(t)γF0(t)\overline{F}_{0}(t)\coloneqq\gamma F_{0}(t) so that

du¯dt\displaystyle\frac{\mathrm{d}{\overline{u}}}{\mathrm{d}{t}} =F¯2u¯2+F¯1u¯+F¯0(t),\displaystyle=\overline{F}_{2}\overline{u}^{\otimes 2}+\overline{F}_{1}\overline{u}+\overline{F}_{0}(t), (4.127)
u¯(0)\displaystyle\overline{u}(0) =u¯in.\displaystyle=\overline{u}_{\mathrm{in}}.

Note that R\operatorname{R} is invariant under this rescaling, so R<1\operatorname{R}<1 still holds for the rescaled equation.

Concretely, we take111In fact, one can show that any γ(1r+,1uin)\gamma\in\bigl{(}\frac{1}{r_{+}},\frac{1}{\|u_{\mathrm{in}}\|}\bigr{)} suffices to satisfy (2.3) and (2.4).

γ=1uinr+.\gamma=\frac{1}{\sqrt{\|u_{\mathrm{in}}\|r_{+}}}. (4.128)

After rescaling, the new quadratic ODE satisfies u¯inr¯+=γ2uinr+=1\|\overline{u}_{\mathrm{in}}\|\overline{r}_{+}=\gamma^{2}\|u_{\mathrm{in}}\|r_{+}=1. Since uin<r+\|u_{\mathrm{in}}\|<r_{+} by Lemma 1, we have r¯<u¯in<1<r¯+\overline{r}_{-}<\|\overline{u}_{\mathrm{in}}\|<1<\overline{r}_{+}, so (2.4) holds. Furthermore, 11 is located between the two roots r¯\overline{r}_{-} and r¯+\overline{r}_{+}, which implies F¯212+|Re(λ¯1)|1+F¯0<0\|\overline{F}_{2}\|\cdot 1^{2}+|{\mathop{\mathrm{Re}}{(\overline{\lambda}_{1})}}|\cdot 1+\|\overline{F}_{0}\|<0 as shown in Lemma 1, so (2.3) holds for the rescaled problem.

Having performed this rescaling, we henceforth assume that (2.3) and (2.4) are satisfied. We then introduce the choice of parameters as follows. Given gg and an error bound ϵ1\epsilon\leq 1, we define

δgϵ1+ϵg2.\delta\coloneqq\frac{g\epsilon}{1+\epsilon}\leq\frac{g}{2}. (4.129)

Given uin\|u_{\mathrm{in}}\|, F2\|F_{2}\|, and Re(λ1)<0\mathop{\mathrm{Re}}(\lambda_{1})<0, we choose

N=log(2TF2/δ)log(1/uin)=log(2TF2/δ)log(r+).N=\biggl{\lceil}\frac{\log(2T\|F_{2}\|/\delta)}{\log(1/\|u_{\mathrm{in}}\|)}\biggr{\rceil}=\biggl{\lceil}\frac{\log(2T\|F_{2}\|/\delta)}{\log(r_{+})}\biggr{\rceil}. (4.130)

Since uin/δ>1\|u_{\mathrm{in}}\|/\delta>1 by (4.129) and g<uing<\|u_{\mathrm{in}}\|, Lemma 2 gives

u(T)y^1(T)η(T)TNF2uinN+1=TNF2(1r+)N+1δ2.\|u(T)-\hat{y}_{1}(T)\|\leq\|\eta(T)\|\leq TN\|F_{2}\|\|u_{\mathrm{in}}\|^{N+1}=TN\|F_{2}\|(\frac{1}{r_{+}})^{N+1}\leq\frac{\delta}{2}. (4.131)

Thus, (4.48) holds since δg/2\delta\leq g/2.

Now we discuss the choice of hh. On the one hand, hh must satisfy (4.46) to satisfy the conditions of Lemma 3 and Lemma 4. On the other hand, Lemma 3 gives the upper bound

y^1(T)y1m3N2.5Th[(F2+F1+F0)2+F0]gϵ4gϵ2(1+ϵ)=δ2.\|\hat{y}_{1}(T)-y^{m}_{1}\|\leq 3N^{2.5}Th[(\|F_{2}\|+\|F_{1}\|+\|F_{0}\|)^{2}+\|F_{0}^{\prime}\|]\leq\frac{g\epsilon}{4}\leq\frac{g\epsilon}{2(1+\epsilon)}=\frac{\delta}{2}. (4.132)

This also ensures that (4.112) holds since δg/2\delta\leq g/2. Thus, we choose

hmin{\displaystyle h\leq\min\biggl{\{} gϵ12N2.5T[(F2+F1+F0)2+F0],1NF1,\displaystyle\frac{g\epsilon}{12N^{2.5}T[(\|F_{2}\|+\|F_{1}\|+\|F_{0}\|)^{2}+\|F_{0}^{\prime}\|]},\frac{1}{N\|F_{1}\|}, (4.133)
2(|Re(λ1)|F2F0)N(|Re(λ1)|2(F2+F0)2+F12)}\displaystyle\frac{2(|\mathop{\mathrm{Re}}(\lambda_{1})|-\|F_{2}\|-\|F_{0}\|)}{N(|\mathop{\mathrm{Re}}(\lambda_{1})|^{2}-(\|F_{2}\|+\|F_{0}\|)^{2}+\|F_{1}\|^{2})}\biggr{\}}

to satisfy (4.46) and (4.132).

Combining (4.131) with (4.132), we have

u(T)y1mu(T)y^1(T)+y^1(T)y1mδ.\|u(T)-y^{m}_{1}\|\leq\|u(T)-\hat{y}_{1}(T)\|+\|\hat{y}_{1}(T)-y^{m}_{1}\|\leq\delta. (4.134)

Thus, (4.119) holds since δg/2\delta\leq g/2. Using

u(T)u(T)y1my1mu(T)y1mmin{u(T),y1m}u(T)y1mgu(T)y1m\biggl{\|}\frac{u(T)}{\|u(T)\|}-\frac{y^{m}_{1}}{\|y^{m}_{1}\|}\biggr{\|}\leq\frac{\|u(T)-y^{m}_{1}\|}{\min\{\|u(T)\|,\|y^{m}_{1}\|\}}\leq\frac{\|u(T)-y^{m}_{1}\|}{g-\|u(T)-y^{m}_{1}\|} (4.135)

and (4.134), we obtain

u(T)u(T)y1my1mδgδ=ϵ,\biggl{\|}\frac{u(T)}{\|u(T)\|}-\frac{y^{m}_{1}}{\|y^{m}_{1}\|}\biggr{\|}\leq\frac{\delta}{g-\delta}=\epsilon, (4.136)

i.e., the normalized output state is ϵ\epsilon-close to u(T)u(T)\frac{u(T)}{\|u(T)\|}.

We follow the procedure in Lemma 5 to prepare the initial state |y^in|\hat{y}_{\mathrm{in}}\rangle. We apply the QLSA [18] to the linear system (3.8) with m=p=T/hm=p=\lceil T/h\rceil, giving a solution |Y|Y\rangle. We then perform a measurement to obtain a normalized state of |yjk|y^{k}_{j}\rangle for some k[m+p+1]0k\in[{m+p+1}]_{0} and j[N]j\in[{N}]. By Lemma 6, the probability of obtaining a state |y1k|y^{k}_{1}\rangle for some k[m+p+1]0[m+1]0k\in[{m+p+1}]_{0}\setminus[{m+1}]_{0}, giving the normalized vector y1m/y1m{y^{m}_{1}}/{\|y^{m}_{1}\|}, is

Pmeasurep+19(m+p+1)Nq2118Nq2.P_{\mathrm{measure}}\geq\frac{p+1}{9(m+p+1)Nq^{2}}\geq\frac{1}{18Nq^{2}}. (4.137)

By amplitude amplification, we can achieve success probability Ω(1)\Omega(1) with O(Nq)O(\sqrt{N}q) repetitions of the above procedure.

Analysis of the complexity.

By Lemma 5, the right-hand side |B|B\rangle in (3.8) can be prepared with O(N)O(N) queries to OxO_{x} and O(m)O(m) queries to OF0O_{F_{0}}, with gate complexity larger by a poly(logN,logn)\operatorname{poly}(\log N,\log n) factor. The matrix LL in (3.8) is an (m+p+1)Δ×(m+p+1)Δ(m+p+1)\Delta\times(m+p+1)\Delta matrix with O(Ns)O(Ns) nonzero entries in any row or column. By Lemma 4 and our choice of parameters, the condition number of LL is at most

3(m+p+1)\displaystyle 3(m+p+1) (4.138)
=O(N2.5T2[(F2+F1+F0)2+F0]δ+NTF1\displaystyle=O\biggl{(}\frac{N^{2.5}T^{2}[(\|F_{2}\|+\|F_{1}\|+\|F_{0}\|)^{2}+\|F_{0}^{\prime}\|]}{\delta}+NT\|F_{1}\|
+NT[|Re(λ1)|2(F2+F0)2+F12]2(|Re(λ1)|F2F0))\displaystyle\qquad\quad+\frac{NT[|\mathop{\mathrm{Re}}(\lambda_{1})|^{2}-(\|F_{2}\|+\|F_{0}\|)^{2}+\|F_{1}\|^{2}]}{2(|\mathop{\mathrm{Re}}(\lambda_{1})|-\|F_{2}\|-\|F_{0}\|)}\biggr{)}
=O(N2.5T2[(F2+F1+F0)2+F0]gϵ+1(1uin)2NTF12F2+F0)\displaystyle=O\biggl{(}\frac{N^{2.5}T^{2}[(\|F_{2}\|+\|F_{1}\|+\|F_{0}\|)^{2}+\|F_{0}^{\prime}\|]}{g\epsilon}+\frac{1}{(1-\|u_{\mathrm{in}}\|)^{2}}\cdot\frac{NT\|F_{1}\|^{2}}{\|F_{2}\|+\|F_{0}\|}\biggr{)}
=O(N2.5T2[(F2+F1+F0)2+F0](1uin)2(F2+F0)gϵ).\displaystyle=O\biggl{(}\frac{N^{2.5}T^{2}[(\|F_{2}\|+\|F_{1}\|+\|F_{0}\|)^{2}+\|F_{0}^{\prime}\|]}{(1-\|u_{\mathrm{in}}\|)^{2}(\|F_{2}\|+\|F_{0}\|)g\epsilon}\biggr{)}.

Here we use F2+F0<|Re(λ1)|F1\|F_{2}\|+\|F_{0}\|<|\mathop{\mathrm{Re}}(\lambda_{1})|\leq\|F_{1}\| and

2\displaystyle 2 (|Re(λ1)|F2F0)>(uin+1uin2)(F2+F0)\displaystyle(|\mathop{\mathrm{Re}}(\lambda_{1})|-\|F_{2}\|-\|F_{0}\|)>(\|u_{\mathrm{in}}\|+\frac{1}{\|u_{\mathrm{in}}\|}-2)(\|F_{2}\|+\|F_{0}\|) (4.139)
=1uin(1uin)2(F2+F0)>(1uin)2(F2+F0).\displaystyle=\frac{1}{\|u_{\mathrm{in}}\|}(1-\|u_{\mathrm{in}}\|)^{2}(\|F_{2}\|+\|F_{0}\|)>(1-\|u_{\mathrm{in}}\|)^{2}(\|F_{2}\|+\|F_{0}\|).

The first inequality above is from the sum of |Re(λ1)|>F2uin+F0/uin|\mathop{\mathrm{Re}}(\lambda_{1})|>\|F_{2}\|\|u_{\mathrm{in}}\|+\|F_{0}\|/\|u_{\mathrm{in}}\| and |Re(λ1)|=F2r++F0/r+|\mathop{\mathrm{Re}}(\lambda_{1})|=\|F_{2}\|r_{+}+\|F_{0}\|/r_{+}, where r+=1/uinr_{+}=1/\|u_{\mathrm{in}}\|. Consequently, by Theorem 5 of [18], the QLSA produces the state |Y|Y\rangle with

N3.5sT2[(F2+F1+F0)2+F0](1uin)2(F2+F0)gϵpoly(logNsTF2F1F0F0(1uin)gϵ)\displaystyle\frac{N^{3.5}sT^{2}[(\|F_{2}\|+\|F_{1}\|+\|F_{0}\|)^{2}+\|F_{0}^{\prime}\|]}{(1-\|u_{\mathrm{in}}\|)^{2}(\|F_{2}\|+\|F_{0}\|)g\epsilon}\cdot\operatorname{poly}\biggl{(}\log\frac{NsT\|F_{2}\|\|F_{1}\|\|F_{0}\|\|F^{\prime}_{0}\|}{(1-\|u_{\mathrm{in}}\|)g\epsilon}\biggr{)} (4.140)
=sT2[(F2+F1+F0)2+F0](1uin)2(F2+F0)gϵpoly(logsTF2F1F0F0(1uin)gϵ/log(1/uin))\displaystyle\quad=\frac{sT^{2}[(\|F_{2}\|+\|F_{1}\|+\|F_{0}\|)^{2}+\|F_{0}^{\prime}\|]}{(1-\|u_{\mathrm{in}}\|)^{2}(\|F_{2}\|+\|F_{0}\|)g\epsilon}\cdot\operatorname{poly}\biggl{(}\log\frac{sT\|F_{2}\|\|F_{1}\|\|F_{0}\|\|F^{\prime}_{0}\|}{(1-\|u_{\mathrm{in}}\|)g\epsilon}/\log(1/\|u_{\mathrm{in}}\|)\biggr{)}

queries to the oracles OF2O_{F_{2}}, OF1O_{F_{1}}, OF0O_{F_{0}}, and OxO_{x}. Using O(Nq)O(\sqrt{N}q) steps of amplitude amplification to achieve success probability Ω(1)\Omega(1), the overall query complexity of our algorithm is

N4sT2q[(F2+F1+F0)2+F0](1uin)2(F2+F0)gϵpoly(logNsTF2F1F0F0(1uin)gϵ)\displaystyle\frac{N^{4}sT^{2}q[(\|F_{2}\|+\|F_{1}\|+\|F_{0}\|)^{2}+\|F_{0}^{\prime}\|]}{(1-\|u_{\mathrm{in}}\|)^{2}(\|F_{2}\|+\|F_{0}\|)g\epsilon}\cdot\operatorname{poly}\biggl{(}\log\frac{NsT\|F_{2}\|\|F_{1}\|\|F_{0}\|\|F^{\prime}_{0}\|}{(1-\|u_{\mathrm{in}}\|)g\epsilon}\biggr{)} (4.141)
=sT2q[(F2+F1+F0)2+F0](1uin)2(F2+F0)gϵpoly(logsTF2F1F0F0(1uin)gϵ/log(1/uin))\displaystyle\quad=\frac{sT^{2}q[(\|F_{2}\|+\|F_{1}\|+\|F_{0}\|)^{2}+\|F_{0}^{\prime}\|]}{(1-\|u_{\mathrm{in}}\|)^{2}(\|F_{2}\|+\|F_{0}\|)g\epsilon}\cdot\operatorname{poly}\biggl{(}\log\frac{sT\|F_{2}\|\|F_{1}\|\|F_{0}\|\|F^{\prime}_{0}\|}{(1-\|u_{\mathrm{in}}\|)g\epsilon}/\log(1/\|u_{\mathrm{in}}\|)\biggr{)}

and the gate complexity exceeds this by a factor of poly(log(nsTF2F1F0F0/(1R)gϵ)/log(1/uin))\operatorname{poly}\bigl{(}\log(nsT\|F_{2}\|\|F_{1}\|\|F_{0}\|\|F^{\prime}_{0}\|/(1-\operatorname{R})g\epsilon)/\allowbreak\log(1/\|u_{\mathrm{in}}\|)\bigr{)}.

If the eigenvalues λj\lambda_{j} of F1F_{1} are all real, by (4.47), the condition number of LL is at most

3(m+p+1)\displaystyle 3(m+p+1) =O(N2.5T2[(F2+F1+F0)2+F0]δ+NTF1)\displaystyle=O\biggl{(}\frac{N^{2.5}T^{2}[(\|F_{2}\|+\|F_{1}\|+\|F_{0}\|)^{2}+\|F_{0}^{\prime}\|]}{\delta}+NT\|F_{1}\|\biggr{)} (4.142)
=O(N2.5T2[(F2+F1+F0)2+F0]gϵ).\displaystyle=O\biggl{(}\frac{N^{2.5}T^{2}[(\|F_{2}\|+\|F_{1}\|+\|F_{0}\|)^{2}+\|F_{0}^{\prime}\|]}{g\epsilon}\biggr{)}.

Similarly, the QLSA produces the state |Y|Y\rangle with

sT2[(F2+F1+F0)2+F0]gϵpoly(logsTF2F1F0F0gϵ/log(1/uin))\displaystyle\frac{sT^{2}[(\|F_{2}\|+\|F_{1}\|+\|F_{0}\|)^{2}+\|F_{0}^{\prime}\|]}{g\epsilon}\cdot\operatorname{poly}\biggl{(}\log\frac{sT\|F_{2}\|\|F_{1}\|\|F_{0}\|\|F^{\prime}_{0}\|}{g\epsilon}/\log(1/\|u_{\mathrm{in}}\|)\biggr{)} (4.143)

queries to the oracles OF2O_{F_{2}}, OF1O_{F_{1}}, OF0O_{F_{0}}, and OxO_{x}. Using amplitude amplification to achieve success probability Ω(1)\Omega(1), the overall query complexity of the algorithm is

sT2q[(F2+F1+F0)2+F0]gϵpoly(logsTF2F1F0F0gϵ/log(1/uin))\displaystyle\frac{sT^{2}q[(\|F_{2}\|+\|F_{1}\|+\|F_{0}\|)^{2}+\|F_{0}^{\prime}\|]}{g\epsilon}\cdot\operatorname{poly}\biggl{(}\log\frac{sT\|F_{2}\|\|F_{1}\|\|F_{0}\|\|F^{\prime}_{0}\|}{g\epsilon}/\log(1/\|u_{\mathrm{in}}\|)\biggr{)} (4.144)

and the gate complexity is larger by a factor of poly(log(nsTF2F1F0F0/gϵ)/log(1/uin))\operatorname{poly}\bigl{(}\log(nsT\|F_{2}\|\|F_{1}\|\|F_{0}\|\|F^{\prime}_{0}\|/g\epsilon)/\log(1/\|u_{\mathrm{in}}\|)\bigr{)} as claimed. ∎

5 Lower bound

In this section, we establish a limitation on the ability of quantum computers to solve the quadratic ODE problem when the nonlinearity is sufficiently strong. We quantify the strength of the nonlinearity in terms of the quantity R\operatorname{R} defined in (2.2). Whereas there is an efficient quantum algorithm for R<1\operatorname{R}<1 (as shown in Theorem 1), we show here that the problem is intractable for R2\operatorname{R}\geq\sqrt{2}.

Theorem 2.

Assume R2\operatorname{R}\geq\sqrt{2}. Then there is an instance of the quantum quadratic ODE problem defined in Problem 1 such that any quantum algorithm for producing a quantum state approximating u(T)/u(T)u(T)/\|u(T)\| with bounded error must have worst-case time complexity exponential in TT.

We establish this result by showing how the nonlinear dynamics can be used to distinguish nonorthogonal quantum states, a task that requires many copies of the given state. Note that since our algorithm only approximates the quantum state corresponding to the solution, we must lower bound the query complexity of approximating the solution of a quadratic ODE.

5.1 Hardness of state discrimination

Previous work on the computational power of nonlinear quantum mechanics shows that the ability to distinguish non-orthogonal states can be applied to solve unstructured search (and other hard computational problems) [2, 1, 21]. Here we show a similar limitation using an information-theoretic argument.

Lemma 7.

Let |ψ,|ϕ|\psi\rangle,|\phi\rangle be states of a qubit with |ψ|ϕ|=1ϵ|\langle\psi|\phi\rangle|=1-\epsilon. Suppose we are either given a black box that prepares |ψ|\psi\rangle or a black box that prepares |ϕ|\phi\rangle. Then any bounded-error protocol for determining whether the state is |ψ|\psi\rangle or |ϕ|\phi\rangle must use Ω(1/ϵ)\Omega(1/\epsilon) queries.

Proof.

Using the black box kk times, we prepare states with overlap (1ϵ)k(1-\epsilon)^{k}. By the well-known relationship between fidelity and trace distance, these states have trace distance at most 1(1ϵ)2k2kϵ\sqrt{1-(1-\epsilon)^{2k}}\leq\sqrt{2k\epsilon}. Therefore, by the Helstrom bound (which states that the advantage over random guessing for the best measurement to distinguish two quantum states is given by their trace distance [33]), we need k=Ω(1/ϵ)k=\Omega(1/\epsilon) to distinguish the states with bounded error. ∎

5.2 State discrimination with nonlinear dynamics

Lemma 7 can be used to establish limitations on the ability of quantum computers to simulate nonlinear dynamics, since nonlinear dynamics can be used to distinguish nonorthogonal states. Whereas previous work considers models of nonlinear quantum dynamics (such as the Weinberg model [2, 1] and the Gross-Pitaevskii equation [21]), here we aim to show the difficulty of efficiently simulating more general nonlinear ODEs—in particular, quadratic ODEs with dissipation—using quantum algorithms.

Lemma 8.

There exists an instance of the quantum quadratic ODE problem as defined in Problem 1 with R2\operatorname{R}\geq\sqrt{2}, and two states of a qubit with overlap 1ϵ1-\epsilon (for 0<ϵ<13/100<\epsilon<1-3/\sqrt{10}) as possible initial conditions, such that the two final states after evolution time T=O(log(1/ϵ))T=O(\log(1/\epsilon)) have an overlap no larger than 3/103/\sqrt{10}.

Proof.

Consider a 22-dimensional system of the form

du1dt\displaystyle\frac{\mathrm{d}{u_{1}}}{\mathrm{d}{t}} =u1+ru12,\displaystyle=-u_{1}+ru_{1}^{2}, (5.1)
du2dt\displaystyle\frac{\mathrm{d}{u_{2}}}{\mathrm{d}{t}} =u2+ru22,\displaystyle=-u_{2}+ru_{2}^{2},

for some r>0r>0, with an initial condition u(0)=[u1(0);u2(0)]=uinu(0)=[u_{1}(0);u_{2}(0)]=u_{\mathrm{in}} satisfying uin=1\|u_{\mathrm{in}}\|=1. According to the definition of R\operatorname{R} in (2.2), we have R=r\operatorname{R}=r, so henceforth we write this parameter as R\operatorname{R}. The analytic solution of (5.1) is

u1(t)\displaystyle u_{1}(t) =1Ret(R1/u1(0)),\displaystyle=\frac{1}{\operatorname{R}-e^{t}(\operatorname{R}-1/u_{1}(0))}, (5.2)
u2(t)\displaystyle u_{2}(t) =1Ret(R1/u2(0)).\displaystyle=\frac{1}{\operatorname{R}-e^{t}(\operatorname{R}-1/u_{2}(0))}.

When u2(0)>1/Ru_{2}(0)>1/\operatorname{R}, u2(t)u_{2}(t) is finite within the domain

0t<tlog(RR1/u2(0));0\leq t<t^{\ast}\coloneqq\log\biggl{(}\frac{\operatorname{R}}{\operatorname{R}-1/u_{2}(0)}\biggr{)}; (5.3)

when u2(0)=1/Ru_{2}(0)=1/\operatorname{R}, we have u2(t)=1/Ru_{2}(t)=1/\operatorname{R} for all tt; and when u2(0)<1/Ru_{2}(0)<1/\operatorname{R}, u2(t)u_{2}(t) goes to 0 as tt\to\infty. The behavior of u1(t)u_{1}(t) depends similarly on u1(0)u_{1}(0).

Without loss of generality, we assume u1(0)u2(0)u_{1}(0)\leq u_{2}(0). For u2(0)u1(0)>1/Ru_{2}(0)\geq u_{1}(0)>1/\operatorname{R}, both u1(t)u_{1}(t) and u2(t)u_{2}(t) are finite within the domain (5.3), which we consider as the domain of u(t)u(t).

Now we consider 1-qubit states that provide inputs to (5.1). Given a sufficiently small ϵ>0\epsilon>0, we first define θ(0,π/4)\theta\in(0,\pi/4) by

2sin2θ2=ϵ.2\sin^{2}\frac{\theta}{2}=\epsilon. (5.4)

We then construct two 1-qubit states with overlap 1ϵ1-\epsilon, namely

|ϕ(0)=12(|0+|1)|\phi(0)\rangle=\frac{1}{\sqrt{2}}(|0\rangle+|1\rangle) (5.5)

and

|ψ(0)=cos(θ+π4)|0+sin(θ+π4)|1.|\psi(0)\rangle=\cos\Bigl{(}\theta+\frac{\pi}{4}\Bigr{)}|0\rangle+\sin\Bigl{(}\theta+\frac{\pi}{4}\Bigr{)}|1\rangle. (5.6)

Then the overlap between the two initial states is

ϕ(0)|ψ(0)=cosθ=1ϵ.\langle\phi(0)|\psi(0)\rangle=\cos\theta=1-\epsilon. (5.7)

The initial overlap (5.7) is larger than the target overlap 3/103/\sqrt{10} in Lemma 8 provided ϵ<13/10\epsilon<1-3/\sqrt{10}. For simplicity, we denote

v0cos(θ+π4),\displaystyle v_{0}\coloneqq\cos\Bigl{(}\theta+\frac{\pi}{4}\Bigr{)}, (5.8)
w0sin(θ+π4),\displaystyle w_{0}\coloneqq\sin\Bigl{(}\theta+\frac{\pi}{4}\Bigr{)},

and let v(t)v(t) and w(t)w(t) denote solutions of (5.1) with initial conditions v(0)=v0v(0)=v_{0} and w(0)=w0w(0)=w_{0}, respectively. Since w0>1/Rw_{0}>1/\operatorname{R}, we see that w(t)w(t) increases with tt, satisfying

1R12<w0<w(t),\frac{1}{\operatorname{R}}\leq\frac{1}{\sqrt{2}}<w_{0}<w(t), (5.9)

and

v(t)<w(t)v(t)<w(t) (5.10)

for any time 0<t<t0<t<t^{\ast}, whatever the behavior of v(t)v(t).

We now study the outputs of our problem. For the state |ϕ(0)|\phi(0)\rangle, the initial condition for (5.1) is [1/2;1/2][1/\sqrt{2};1/\sqrt{2}]. Thus, the output for any t0t\geq 0 is

|ϕ(t)=12(|0+|1).|\phi(t)\rangle=\frac{1}{\sqrt{2}}(|0\rangle+|1\rangle). (5.11)

For the state |ψ(0)|\psi(0)\rangle, the initial condition for (5.1) is [v0;w0][v_{0};w_{0}]. We now discuss how to select a terminal time TT to give a useful output state |ψ(T)|\psi(T)\rangle. For simplicity, we denote the ratio of w(t)w(t) and v(t)v(t) by

K(t)w(t)v(t).K(t)\coloneqq\frac{w(t)}{v(t)}. (5.12)

Noticing that w(t)w(t) goes to infinity as tt approaches tt^{\ast}, while v(t)v(t) remains finite within (5.3), there exists a terminal time TT such that222More concretely, we take vmax=max{v0,v(t)}v_{\text{max}}=\max\{v_{0},v(t^{\ast})\} that upper bounds v(t)v(t) on the domain [0,t)[0,t^{\ast}), in which v(t)v(t^{\ast}) is a finite value since v0<w0v_{0}<w_{0}. Then there exists a terminal time TT such that w(T)=2vmaxw(T)=2v_{\text{max}}, and hence K(T)=w(T)/v(T)2K(T)=w(T)/v(T)\geq 2.

K(T)2.K(T)\geq 2. (5.13)

The normalized output state at this time TT is

|ψ(T)=1K(T)2+1(|0+K(T)|1).|\psi(T)\rangle=\frac{1}{\sqrt{K(T)^{2}+1}}(|0\rangle+K(T)|1\rangle). (5.14)

Combining (5.11) with (5.14), the overlap of |ϕ(T)|\phi(T)\rangle and |ψ(T)|\psi(T)\rangle is

ϕ(T)|ψ(T)=K(T)+12K(T)2+2310\langle\phi(T)|\psi(T)\rangle=\frac{K(T)+1}{\sqrt{2K(T)^{2}+2}}\leq\frac{3}{\sqrt{10}} (5.15)

using (5.13).

Finally, we estimate the evolution time TT, which is implicitly defined by (5.13). We can upper bound its value by tt^{\ast}. According to (5.3), we have

T<t=log(RR1w0)<log(221w0)T<t^{\ast}=\log\biggl{(}\frac{\operatorname{R}}{\operatorname{R}-\frac{1}{w_{0}}}\biggr{)}<\log\biggl{(}\frac{\sqrt{2}}{\sqrt{2}-\frac{1}{w_{0}}}\biggr{)} (5.16)

since the function log(x/(xc))\log(x/(x-c)) decreases monotonically with xx for x>c>0x>c>0. Using (5.7) to rewrite this expression in terms of ϵ\epsilon, we have

T<t<log(221sin(θ+π4))=log(1+12ϵϵ2ϵ),T<t^{\ast}<\log\Biggl{(}\frac{\sqrt{2}}{\sqrt{2}-\frac{1}{\sin(\theta+\frac{\pi}{4})}}\Biggr{)}=\log\biggl{(}1+\frac{1}{\sqrt{2\epsilon-\epsilon^{2}}-\epsilon}\biggr{)}, (5.17)

which scales like 12log(1/2ϵ)\frac{1}{2}\log(1/2\epsilon) as ϵ0\epsilon\to 0. Therefore T=O(log(1/ϵ))T=O(\log({1}/{\epsilon})) as claimed. ∎

5.3 Proof of Theorem 2

We now establish our main lower bound result.

Proof.

As introduced in the proof of Lemma 8, consider the quadratic ODE (5.1); the two initial states of a qubit |ϕ(0)|\phi(0)\rangle and |ψ(0)|\psi(0)\rangle defined in (5.5) and (5.6), respectively; and the terminal time TT defined in (5.13).

Suppose we have a quantum algorithm that, given a black box to prepare a state that is either |ϕ(0)|\phi(0)\rangle or |ψ(0)|\psi(0)\rangle, can produce quantum states |ϕ(T)|\phi^{\prime}(T)\rangle or |ψ(T)|\psi^{\prime}(T)\rangle that are within distance δ\delta of |ϕ(T)|\phi(T)\rangle and |ψ(T)|\psi(T)\rangle, respectively. Since by Lemma 8, |ϕ(T)|\phi(T)\rangle and |ψ(T)|\psi(T)\rangle have constant overlap, the overlap between |ϕ(T)|\phi^{\prime}(T)\rangle and |ψ(T)|\psi^{\prime}(T)\rangle is also constant for sufficiently small δ\delta. More precisely, we have

ϕ(T)|ψ(T)310\langle\phi(T)|\psi(T)\rangle\leq\frac{3}{\sqrt{10}} (5.18)

by (5.15), which implies

|ϕ(T)|ψ(T)2(1310)>0.32.\||\phi(T)\rangle-\ket{\psi(T)}\|\geq\sqrt{2\biggl{(}1-\frac{3}{\sqrt{10}}\biggr{)}}>0.32. (5.19)

We also have

|ϕ(T)|ϕ(T)δ,\|\ket{\phi(T)}-\ket{\phi^{\prime}(T)}\|\leq\delta, (5.20)

and similarly for ψ(T)\psi(T). These three inequalities give us

|ϕ(T)|ψ(T)\displaystyle\|\ket{\phi^{\prime}(T)}-\ket{\psi^{\prime}(T)}\| =(|ϕ(T)|ψ(T))(|ϕ(T)|ϕ(T))(|ψ(T)|ψ(T))\displaystyle=\|(\ket{\phi(T)}-\ket{\psi(T))}-(\ket{\phi(T)}-\ket{\phi^{\prime}(T))}-(\ket{\psi^{\prime}(T)}-\ket{\psi(T))}\|
(|ϕ(T)|ψ(T))(|ϕ(T)|ϕ(T))(|ψ(T)|ψ(T))\displaystyle\geq\|(\ket{\phi(T)}-\ket{\psi(T))}\|-\|(\ket{\phi(T)}-\ket{\phi^{\prime}(T))}\|-\|(\ket{\psi^{\prime}(T)}-\ket{\psi(T))}\|
>0.322δ,\displaystyle>0.32-2\delta, (5.21)

which is at least a constant for (say) δ<0.15\delta<0.15.

Lemma 7 therefore shows that preparing the states |ϕ(T)|\phi^{\prime}(T)\rangle and |ψ(T)|\psi^{\prime}(T)\rangle requires time Ω(1/ϵ)\Omega(1/\epsilon), as these states can be used to distinguish the two possibilities with bounded error. By Lemma 8, this time is 2Ω(T)2^{\Omega(T)}. This shows that we need at least exponential simulation time to approximate the solution of arbitrary quadratic ODEs to within sufficiently small bounded error when R2\operatorname{R}\geq\sqrt{2}. ∎

Note that exponential time is achievable since our QCL algorithm can solve the problem by taking NN to be exponential in TT, where NN is the truncation level of Carleman linearization. (The algorithm of Leyton and Osborne also solves quadratic differential equations with complexity exponential in TT, but requires the additional assumptions that the quadratic polynomial is measure-preserving and Lipschitz continuous [39].)

6 Applications

Due to the assumptions of our analysis, our quantum Carleman linearization algorithm can only be applied to problems with certain properties. First, there are two requirements to guarantee convergence of the inhomogeneous Carleman linearization: the system must have linear dissipation, manifested by Re(λ1)<0\mathop{\mathrm{Re}}(\lambda_{1})<0; and the dissipation must be sufficiently stronger than both the nonlinear and the forcing terms, so that R<1\operatorname{R}<1. Dissipation typically leads to an exponentially decaying solution, but for the dependency on gg and qq in (4.141) to allow an efficient algorithm, the solution cannot exponentially approach zero.

However, this issue does not arise if the forcing term F0F_{0} resists the exponential decay towards zero, instead causing the solution to decay towards some non-zero (possibly time-dependent) state. The norm of the state that is exponentially approached can possibly decay towards zero, but this decay itself must happen slower than exponentially for the algorithm to be efficient.333Also note that the QCL algorithm might provide an advantage over classical computation for homogeneous equations in cases where only evolution for a short time is of interest.

We now investigate possible applications that satisfy these conditions. First we present an application governed by ordinary differential equations, and then we present possible applications in partial differential equations.

Several physical systems can be represented in terms of quadratic ODEs. Examples include models of interacting populations of predators and prey [51], dynamics of chemical reactions [44, 17], and the spread of an epidemic [11]. We now give an example of the latter, based on the epidemiological model used in [52] to describe the early spread of the COVID-19 virus.

The so-called SEIR model divides a population of PP individuals into four components: susceptible (PSP_{S}), exposed (PEP_{E}), infected (PIP_{I}), and recovered (PRP_{R}). We denote the rate of transmission from an infected to a susceptible person by rtrar_{\text{tra}}, the typical time until an exposed person becomes infectious by the latent time TlatT_{\text{lat}}, and the typical time an infectious person can infect others by the infectious time TinfT_{\text{inf}}. Furthermore we assume that there is a flux Λ\Lambda of individuals constantly refreshing the population. This flux corresponds to susceptible individuals moving into, and individuals of all components moving out of, the population, in such a way that the total population remains constant.

To ensure that there is sufficiently strong linear decay to guarantee Carleman convergence, we also add a vaccination term to the PSP_{S} component. We choose an approach similar to that of [53], but denote the vaccination rate, which is approximately equal to the fraction of susceptible individuals vaccinated each day, by rvacr_{\text{vac}}. The model is then

dPSdt\displaystyle\frac{\mathrm{d}P_{S}}{\mathrm{d}t} =ΛPSPrvacPS+ΛrtraPSPIP\displaystyle=-\Lambda\frac{P_{S}}{P}-r_{\text{vac}}P_{S}+\Lambda-r_{\text{tra}}P_{S}\frac{P_{I}}{P} (6.1)
dPEdt\displaystyle\frac{\mathrm{d}P_{E}}{\mathrm{d}t} =ΛPEPPETlat+rtraPSPIP\displaystyle=-\Lambda\frac{P_{E}}{P}-\frac{P_{E}}{T_{\text{lat}}}+r_{\text{tra}}P_{S}\frac{P_{I}}{P} (6.2)
dPIdt\displaystyle\frac{\mathrm{d}P_{I}}{\mathrm{d}t} =ΛPIP+PETlatPITinf\displaystyle=-\Lambda\frac{P_{I}}{P}+\frac{P_{E}}{T_{\text{lat}}}-\frac{P_{I}}{T_{\text{inf}}} (6.3)
dPRdt\displaystyle\frac{\mathrm{d}P_{R}}{\mathrm{d}t} =ΛPRP+rvacPS+PITinf.\displaystyle=-\Lambda\frac{P_{R}}{P}+r_{\text{vac}}P_{S}+\frac{P_{I}}{T_{\text{inf}}}. (6.4)

The sum of equations (6.1)–(6.4) shows that P=PS+PE+PI+PRP=P_{S}+P_{E}+P_{I}+P_{R} is a constant. Hence we do not need to include the equation for PRP_{R} in our analysis, which is crucial since the PRP_{R} component would have introduced positive eigenvalues. The maangces corresponding to (2.1) are then

F0\displaystyle F_{0} =(Λ00),F1=(ΛPrvac000ΛP1Tlat001TlatΛP1Tinf),\displaystyle=\begin{pmatrix}\Lambda\\ 0\\ 0\\ \end{pmatrix},\quad F_{1}=\begin{pmatrix}-\frac{\Lambda}{P}-r_{\text{vac}}&0&0\\ 0&-\frac{\Lambda}{P}-\frac{1}{T_{\text{lat}}}&0\\ 0&\frac{1}{T_{\text{lat}}}&-\frac{\Lambda}{P}-\frac{1}{T_{\text{inf}}}\\ \end{pmatrix}, (6.5)
F2\displaystyle F_{2} =(00rtraP00000000rtraP000000000000000).\displaystyle=\begin{pmatrix}0&0&-\frac{r_{\text{tra}}}{P}&0&0&0&0&0&0\\ 0&0&\frac{r_{\text{tra}}}{P}&0&0&0&0&0&0\\ 0&0&0&0&0&0&0&0&0\\ \end{pmatrix}. (6.6)

Since F1F_{1} is a triangular matrix, its eigenvalues are located on its diagonal, so Re(λ1)=Λ/Pmin{rvac,1/Tlat,1/Tinf}\mathop{\mathrm{Re}}(\lambda_{1})=-\Lambda/P-\min\mathopen{}\mathclose{{}\left\{r_{\text{vac}},1/T_{\text{lat}},1/T_{\text{inf}}}\right\}. Furthermore we can bound P/3uinPP/\sqrt{3}\leq\|u_{\text{in}}\|\leq P, F0=Λ\|F_{0}\|=\Lambda, and F2=2rtra/P\|F_{2}\|=\sqrt{2}r_{\text{tra}}/P, so

R\displaystyle\operatorname{R} 2rtra+3Λ/Pmin{rvac,1/Tlat,1/Tinf}+Λ/P.\displaystyle\leq\frac{\sqrt{2}r_{\text{tra}}+\sqrt{3}\Lambda/P}{\min\mathopen{}\mathclose{{}\left\{r_{\text{vac}},1/T_{\text{lat}},1/T_{\text{inf}}}\right\}+\Lambda/P}. (6.7)

We see that the condition for guaranteed convergence of Carleman linearization is 2rtra<min{rvac,1/Tlat,1/Tinf}(31)\sqrt{2}r_{\text{tra}}<\min\mathopen{}\mathclose{{}\left\{r_{\text{vac}},1/T_{\text{lat}},1/T_{\text{inf}}}\right\}-(\sqrt{3}-1). Essentially, the Carleman method only converges if the (nonlinear) transmission is sufficiently slower than the (linear) decay.

To assess how restrictive this assumption is, we consider the SEIR parameters used in [52]. Note that they also included separate components for asymptomatic and hospitalized persons, but to simplify the analysis we include both of these components in the PIP_{I} component. In their work, they considered a city with approximately P=107P=10^{7} inhabitants. In a specific period, they estimated a travel flux444Since we require that u(t)u(t) does not approach 0 exponentially, we can assume that the travel flux is some non-zero, but small, value, e.g., Λ=1\Lambda=1 individual per day. of Λ0\Lambda\approx 0 individuals per day, latent time Tlat=5.2T_{\text{lat}}=5.2 days, infectious time Tinf=2.3T_{\text{inf}}=2.3 days, and transmission rate rtra0.13 days1r_{\text{tra}}\approx 0.13\text{ days}^{-1}. We let the initial condition be dominated by the susceptible component so that uinP\|u_{\text{in}}\|\approx P, and we assume555This example arguably corresponds to quite rapid vaccination, and is chosen here such that R\operatorname{R} remains smaller than one, as required to formally guarantee convergence of the Carleman method. However, as shown in the upcoming example of the Burgers equation, larger values of R\operatorname{R} might still allow for convergence in practice, suggesting that our algorithm might handle lower values of the vaccination rate. that rvac>1/Tlat0.19 days1r_{\text{vac}}>1/T_{\text{lat}}\approx 0.19\text{ days}^{-1}. With the stated parameters, a direct calculation gives R=0.956\operatorname{R}=0.956, showing that the assumptions of our algorithm can correspond to some real-world problems that are only moderately nonlinear.

While the example discussed above has only a constant number of variables, this example can be generalized to a high-dimensional system of ODEs that models the early spread over a large number of cities with interaction, similar to what is done in [10] and [45].

Other examples of high-dimensional ODEs arise from the discretization of certain PDEs. Consider, for example, equations for 𝐮(𝐫,t)\mathbf{u}(\mathbf{r},t) of the type

t𝐮+(𝐮)𝐮+β𝐮=ν2𝐮+𝐟.\partial_{t}\mathbf{u}+(\mathbf{u}\cdot\nabla)\mathbf{u}+\beta\mathbf{u}=\nu\nabla^{2}\mathbf{u}+\mathbf{f}. (6.8)

with the forcing term 𝐟\mathbf{f} being a function of both space and time. This equation can be cast in the form of (2.1) by using standard discretizations of space and time. Equations of the form (6.8) can represent Navier–Stokes-type equations, which are ubiquitous in fluid mechanics [38], and related models such as those studied in [36, 47, 50] to describe the formation of large-scale structure in the universe. Similar equations also appear in models of magnetohydrodynamics (e.g., [26]), or the motion of free particles that stick to each other upon collision [12]. In the inviscid case, ν=0\nu=0, the resulting Euler-type equations with linear damping are also of interest, both for modeling micromechanical devices [5] and for their intimate connection with viscous models [24].

Refer to caption
Figure 1: Integration of the forced viscous Burgers equation using Carleman linearization on a classical computer (source code available at https://github.com/hermankolden/CarlemanBurgers). The viscosity is set so that the Reynolds number Re=U0L0/ν=20\mathop{\mathrm{Re}}=U_{0}L_{0}/\nu=20. The parameters nx=16n_{x}=16 and nt=4000n_{t}=4000 are the number of spatial and temporal discretization intervals, respectively. The corresponding Carleman convergence parameter is R=43.59\operatorname{R}=43.59. Top: Initial condition and solution plotted at a third of the nonlinear time 13Tnl=L03U0\frac{1}{3}T_{\mathrm{nl}}=\frac{L_{0}}{3U_{0}}. Bottom: l2l_{2} norm of the absolute error between the Carleman solutions at various truncation levels NN (left), and the convergence of the corresponding time-maximum error (right).

As a specific example, consider the one-dimensional forced viscous Burgers equation

tu+uxu=νx2u+f,\partial_{t}u+u\partial_{x}u=\nu\partial_{x}^{2}u+f, (6.9)

which is the one-dimensional case of equation (6.8) with β=0\beta=0. Equation (6.9) is often used as a simple model of convective flow [14]. For concreteness, let the initial condition be u(x,0)=U0sin(2πx/L0)u(x,0)=U_{0}\sin(2\pi x/L_{0}) on the domain x[L0/2,L0/2]x\in[-L_{0}/2,L_{0}/2], and use Dirichlet boundary conditions u(L0/2,0)=u(L0/2,0)=0u(-L_{0}/2,0)\allowbreak=u(L_{0}/2,0)=0. We force this equation using a localized off-center Gaussian with a sinusoidal time dependence,666Note that this forcing does not satisfy the general conditions for efficient implementation of our algorithm since it is not sparse. However, we expect that the algorithm can still be implemented efficiently for a structured non-sparse forcing term such as in this example. given by f(x,t)=U0exp((xL0/4)22(L0/32)2)cos(2πt)f(x,t)=U_{0}\exp\mathopen{}\mathclose{{}\left(-\frac{(x-L_{0}/4)^{2}}{2(L_{0}/32)^{2}}}\right)\cos(2\pi t). To solve this equation using the Carleman method, we discretize the spatial domain into nxn_{x} points and use central differences for the derivatives to get

tui=νui+12ui+ui1Δx2ui+12ui124Δx+fi\partial_{t}u_{i}=\nu\frac{u_{i+1}-2u_{i}+u_{i-1}}{\Delta x^{2}}-\frac{u^{2}_{i+1}-u^{2}_{i-1}}{4\Delta x}+f_{i} (6.10)

with Δx=L0/(nx1)\Delta x=L_{0}/(n_{x}-1). This equation is of the form (2.1) and can thus generate the Carleman system (3.2). The resulting linear ODE can then be integrated using the forward Euler method, as shown in Figure 1. In this example, the viscosity ν\nu is defined such that the Reynolds number ReU0L0/ν=20\mathop{\mathrm{Re}}\coloneqq U_{0}L_{0}/\nu=20, and nx=16n_{x}=16 spatial discretization points were sufficient to resolve the solution. The figure compares the Carleman solution with the solution obtained via direct integration of (6.10) with the forward Euler method (i.e., without Carleman linearization). By inserting the matrices F0F_{0}, F1F_{1}, and F2F_{2} corresponding to equation (6.10) into the definition of R\operatorname{R} (2.2), we find that Re(λ1)\mathop{\mathrm{Re}}(\lambda_{1}) is indeed negative as required, given Dirichlet boundary conditions, but the parameters used in this example result in R44\operatorname{R}\approx 44. Even though this does not satisfy the requirement R<1\operatorname{R}<1 of the QCL algorithm, we see from the absolute error plot in Figure 1 that the maximum absolute error over time decreases exponentially as the truncation level NN is incremented (in this example, the maximum Carleman truncation level considered is N=4N=4). Surprisingly, this suggests that in this example, the error of the classical Carleman method converges exponentially with NN, even though R>1\operatorname{R}>1.

7 Discussion

In this paper we have presented a quantum Carleman linearization (QCL) algorithm for a class of quadratic nonlinear differential equations. Compared to the previous approach of [39], our algorithm improves the complexity from an exponential dependence on TT to a nearly quadratic dependence, under the condition R<1\operatorname{R}<1 as defined in (2.2). Qualitatively, this means that the system must be dissipative and that the nonlinear and inhomogeneous effects must be small relative to the linear effects. We have also provided numerical results suggesting the classical Carleman method may work on certain PDEs that do not strictly satisfy the assumption R<1\operatorname{R}<1. Furthermore, we established a lower bound showing that for general quadratic differential equations with R2\operatorname{R}\geq\sqrt{2}, quantum algorithms must have worst-case complexity exponential in TT. We also discussed several potential applications arising in biology and fluid and plasma dynamics.

It is natural to ask whether the result of Theorem 1 can be achieved with a classical algorithm, i.e., whether the assumption R<1\operatorname{R}<1 makes differential equations classically tractable. Clearly a naive integration of the truncated Carleman system (3.2) is not efficient on a classical computer since the system size is Θ(nN)\Theta(n^{N}). But furthermore, it is unlikely that any classical algorithm for this problem can run in time polylogarithmic in nn. If we consider Problem 1 with dissipation that is small compared to the total evolution time, but let the nonlinearity and forcing be even smaller such that R<1\operatorname{R}<1, then in the asymptotic limit we have a linear differential equation with no dissipation. Hence any classical algorithm that could solve Problem 1 could also solve non-dissipative linear differential equations, which is a BQP-hard problem even when the dynamics are unitary [29]. In other words, an efficient classical algorithm for this problem would imply efficient classical algorithms for any problem that can be solved efficiently by a quantum computer, which is considered unlikely.

Our upper and lower bounds leave a gap in the range 1R<21\leq\operatorname{R}<\sqrt{2}, for which we do not know the complexity of the quantum quadratic ODE problem. We hope that future work will close this gap and determine for which R\operatorname{R} the problem can be solved efficiently by quantum computers in the worst case.

Furthermore, the complexity of our algorithm has nearly quadratic dependence on TT, namely T2poly(logT)T^{2}\operatorname{poly}(\log T). It is unknown whether the complexity for quadratic ODEs must be at least linear or quadratic in TT. Note that sublinear complexity is impossible in general because of the no-fast-forwarding theorem [8]. However, it should be possible to fast-forward the dynamics in special cases, and it would be interesting to understand the extent to which dissipation enables this.

The complexity of our algorithm depends on the parameter qq defined in Theorem 1, which characterizes the decay of the final solution relative to the initial condition. This restricts the utility of our result, since we must have a suitable initial condition and terminal time such that the final state is not exponentially smaller than the initial state. However, it is unlikely that such a dependence can be significantly improved, since renormalization of the state can be used to implement postselection, which would imply the unlikely consequence BQP=PP\mathrm{BQP}=\mathrm{PP} (see Section 8 of [9] for further discussion). As discussed in the introduction, the solution of a homogeneous dissipative equation necessarily decays exponentially in time, so our method is not asymptotically efficient. However, for inhomogeneous equations the final state need not be exponentially smaller than the initial state even in a long-time simulation, suggesting that our algorithm could be especially suitable for models with forcing terms.

It is possible that variations of the Carleman linearization procedure could increase the accuracy of the result. For instance, instead of using just tensor powers of uu as auxiliary variables, one could use other nonlinear functions. Several previous papers on Carleman linearization have suggested using multidimensional orthogonal polynomials [6, 30]. They also discuss approximating higher-order terms with lower-order ones in (3.2) instead of simply dropping them, possibly improving accuracy. Such changes would however alter the structure of the resulting linear ODE, which could affect the quantum implementation.

The quantum part of the algorithm might also be improved. In this paper we limit ourselves to the first-order Euler method to discretize the linearized ODEs in time. This is crucial for the analysis in Lemma 3, which states the global error increases at most linearly with TT. To establish this result for the Euler method, it suffices to choose the time step (4.46) to ensure I+Ah1\|I+Ah\|\leq 1, and then estimate the growth of global error by (4.73). However, it is unclear how to give a similar bound for higher-order numerical schemes. If this obstacle could be overcome, the error dependence of the complexity might be improved.

It is also natural to ask whether our approach can be improved by taking features of particular systems into account. Since the Carleman method has only received limited attention and has generally been used for purposes other than numerical integration, it seems likely that such improvements are possible. In fact, the numerical results discussed in Section 6 (see in particular Figure 1) suggest that the condition R<1\operatorname{R}<1 is not a strict requirement for the viscous Burgers equation, since we observe convergence even though R44\operatorname{R}\approx 44. This suggests that some property of equation (6.9) makes it more amenable to Carleman linearization than our current analysis predicts. We leave a detailed investigation of this for future work.

A related question is whether our algorithm can efficiently simulate systems exhibiting dynamical chaos. The condition R<1\operatorname{R}<1 might preclude chaos, but we do not have a proof of this. More generally, the presence or absence of chaos might provide a more fine-grained picture of the algorithm’s efficiency.

When contemplating applications, it should be emphasized that our approach produces a state vector that encodes the solution without specifying how information is to be extracted from that state. Simply producing a state vector is not enough for an end-to-end application since the full quantum state cannot be read out efficiently. In some cases in may be possible to extract useful information by sampling a simple observable, whereas in other cases, more sophisticated postprocessing may be required to infer a desired property of the solution. Our method does not address this issue, but can be considered as a subroutine whose output will be parsed by subsequent quantum algorithms. We hope that future work will address this issue and develop end-to-end applications of these methods.

Finally, the algorithm presented in this paper might be extended to solve related mathematical problems on quantum computers. Obvious candidates include initial value problems with time-dependent coefficients and boundary value problems. Carleman methods for such problems are explored in [37], but it is not obvious how to implement those methods in a quantum algorithm. It is also possible that suitable formulations of problems in nonlinear optimization or control could be solvable using related techniques.

Acknowledgments

We thank Paola Cappellaro for valuable discussions and comments. JPL thanks Aaron Ostrander for inspiring discussions. HØK thanks Bernhard Paus Græsdal for introducing him to the Carleman method. HKK and NFL thank Seth Lloyd for preliminary discussions on nonlinear equations and the quantum linear systems algorithm. We also think Dong An and anonymous referees for pointing out the exponential decay of solutions to dissipative homogeneous equations. AMC and JPL did part of this work while visiting the Simons Institute for the Theory of Computing in Berkeley and gratefully acknowledge its hospitality.

AMC and JPL acknowledge support from the Department of Energy, Office of Science, Office of Advanced Scientific Computing Research, Quantum Algorithms Teams and Accelerated Research in Quantum Computing programs, and from the National Science Foundation (CCF-1813814). HØK, HKK, and NFL were partially funded by award no. DE-SC0020264 from the Department of Energy.

References

  • [1] Scott Aaronson, NP-complete problems and physical reality, ACM SIGACT News 36 (2005), no. 1, 30–52, arXiv:quant-ph/0502072.
  • [2] Daniel S. Abrams and Seth Lloyd, Nonlinear quantum mechanics implies polynomial-time solution for NP-complete and #P problems, Physical Review Letters 81 (1998), no. 18, 3992, arXiv:quant-ph/9801041.
  • [3] Roberto F. S. Andrade, Carleman embedding and Lyapunov exponents, Journal of Mathematical Physics 23 (1982), no. 12, 2271–2275.
  • [4] Kendall E. Atkinson, An introduction to numerical analysis, John Wiley & Sons, 2008.
  • [5] Min-Hang Bao, Micro mechanical transducers: pressure sensors, accelerometers and gyroscopes, Elsevier, 2000.
  • [6] Richard Bellman and John M. Richardson, On some questions arising in the approximate solution of nonlinear differential equations, Quarterly of Applied Mathematics 20 (1963), 333–339.
  • [7] Dominic W. Berry, High-order quantum algorithm for solving linear differential equations, Journal of Physics A: Mathematical and Theoretical 47 (2014), no. 10, 105301, arXiv:1010.2745.
  • [8] Dominic W. Berry, Graeme Ahokas, Richard Cleve, and Barry C. Sanders, Efficient quantum algorithms for simulating sparse Hamiltonians, Communications in Mathematical Physics 270 (2007), 359–371, arXiv:quant-ph/0508139.
  • [9] Dominic W. Berry, Andrew M. Childs, Aaron Ostrander, and Guoming Wang, Quantum algorithm for linear differential equations with exponentially improved dependence on precision, Communications in Mathematical Physics 356 (2017), no. 3, 1057–1081, arXiv:1701.03684.
  • [10] Derdei Bichara, Yun Kang, Carlos Castillo-Chávez, Richard Horan, and Charles Perrings, SIS and SIR epidemic models under virtual dispersal, 03 2015.
  • [11] Fred Brauer and Carlos Castillo-Chavez, Mathematical models in population biology and epidemiology, vol. 2, Springer, 2012.
  • [12] Yann Brenier and Emmanuel Grenier, Sticky particles and scalar conservation laws, SIAM Journal on Numerical Analysis 35 (1998), no. 6, 2317–2328.
  • [13] Roger Brockett, The early days of geometric nonlinear control, Automatica 50 (2014), no. 9, 2203–2224.
  • [14] Johannes M. Burgers, A mathematical model illustrating the theory of turbulence, Advances in Applied Mechanics, vol. 1, Elsevier, 1948, pp. 171–199.
  • [15] Yudong Cao, Anargyros Papageorgiou, Iasonas Petras, Joseph Traub, and Sabre Kais, Quantum algorithm and circuit design solving the Poisson equation, New Journal of Physics 15 (2013), no. 1, 013021, arXiv:1207.2485.
  • [16] Torsten Carleman, Application de la théorie des équations intégrales linéaires aux systèmes d’équations différentielles non linéaires, Acta Mathematica 59 (1932), no. 1, 63–87.
  • [17] Alessandro Ceccato, Paolo Nicolini, and Diego Frezzato, Recasting the mass-action rate equations of open chemical reaction networks into a universal quadratic format, Journal of Mathematical Chemistry 57 (2019), 1001–1018.
  • [18] Andrew M. Childs, Robin Kothari, and Rolando D. Somma, Quantum algorithm for systems of linear equations with exponentially improved dependence on precision, SIAM Journal on Computing 46 (2017), no. 6, 1920–1950, arXiv:1511.02306.
  • [19] Andrew M. Childs and Jin-Peng Liu, Quantum spectral methods for differential equations, Communications in Mathematical Physics 375 (2020), 1427–1457, arXiv:1901.00961.
  • [20] Andrew M. Childs, Jin-Peng Liu, and Aaron Ostrander, High-precision quantum algorithms for partial differential equations, 2020, arXiv:2002.07868.
  • [21] Andrew M. Childs and Joshua Young, Optimal state discrimination and unstructured search in nonlinear quantum mechanics, Physical Review A 93 (2016), no. 2, 022314, arXiv:1507.06334.
  • [22] B. David Clader, Bryan C. Jacobs, and Chad R. Sprouse, Preconditioned quantum linear system algorithm, Physical Review Letters 110 (2013), no. 25, 250504, arXiv:1301.2340.
  • [23] Pedro C. S. Costa, Stephen Jordan, and Aaron Ostrander, Quantum algorithm for simulating the wave equation, Physical Review A 99 (2019), no. 1, 012323, arXiv:1711.05394.
  • [24] Constantine M. Dafermos, Hyperbolic conservation laws in continuum physics, vol. 3, Springer, 2005.
  • [25] Germund G. Dahlquist, A special stability problem for linear multistep methods, BIT Numerical Mathematics 3 (1963), no. 1, 27–43.
  • [26] P. A. Davidson, An introduction to magnetohydrodynamics, Cambridge Texts in Applied Mathematics, Cambridge University Press, 2001.
  • [27] Ilya Y. Dodin and Edward A. Startsev, On applications of quantum computing to plasma simulations, 2020, arXiv:2005.14369.
  • [28] Alexander Engel, Graeme Smith, and Scott E. Parker, Quantum algorithm for the Vlasov equation, Physical Review A 100 (2019), no. 6, 062315, arXiv:1907.09418.
  • [29] Richard P. Feynman, Quantum mechanical computers, Optics News 11 (1985), 11–20.
  • [30] Marcelo Forets and Amaury Pouly, Explicit error bounds for Carleman linearization, 2017, arXiv:1711.02552.
  • [31] Alfredo Germani, Costanzo Manes, and Pasquale Palumbo, Filtering of differential nonlinear systems via a Carleman approximation approach, Proceedings of the 44th IEEE Conference on Decision and Control, pp. 5917–5922, 2005.
  • [32] Aram W. Harrow, Avinatan Hassidim, and Seth Lloyd, Quantum algorithm for linear systems of equations, Physical Review Letters 103 (2009), no. 15, 150502, arXiv:0811.3171.
  • [33] Carl W. Helstrom, Quantum detection and estimation theory, Journal of Statistical Physics 1 (1969), 231–252.
  • [34] Ilon Joseph, Koopman-von Neumann approach to quantum simulation of nonlinear classical dynamics, 2020, arXiv:2003.09980.
  • [35] Edward H. Kerner, Universal formats for nonlinear ordinary differential systems, Journal of Mathematical Physics 22 (1981), no. 7, 1366–1371.
  • [36] Lev Kofman, Dmitri Pogosian, and Sergei Shandarin, Structure of the universe in the two-dimensional model of adhesion, Monthly Notices of the Royal Astronomical Society 242 (1990), no. 2, 200–208.
  • [37] Krzysztof Kowalski and Willi-Hans Steeb, Nonlinear dynamical systems and Carleman linearization, World Scientific, 1991.
  • [38] Pierre Gilles Lemarié-Rieusset, The Navier-Stokes problem in the 21st century, CRC Press, 2018.
  • [39] Sarah K. Leyton and Tobias J. Osborne, A quantum algorithm to solve nonlinear differential equations, 2008, arXiv:0812.4423.
  • [40] Noah Linden, Ashley Montanaro, and Changpeng Shao, Quantum vs. classical algorithms for solving the heat equation, arXiv:2004.06516.
  • [41] Seth Lloyd, Giacomo De Palma, Can Gokler, Bobak Kiani, Zi-Wen Liu, Milad Marvian, Felix Tennie, and Tim Palmer, Quantum algorithm for nonlinear differential equations, 2020, arXiv:2011.06571.
  • [42] Gerasimos Lyberatos and Christos A. Tsiligiannis, A linear algebraic method for analysing Hopf bifurcation of chemical reaction systems, Chemical Engineering Science 42 (1987), no. 5, 1242–1244.
  • [43] Ashley Montanaro and Sam Pallister, Quantum algorithms and the finite element method, Physical Review A 93 (2016), no. 3, 032324, arXiv:1512.05903.
  • [44] Elliott W. Montroll, On coupled rate equations with quadratic nonlinearities, Proceedings of the National Academy of Sciences 69 (1972), no. 9, 2532–2536.
  • [45] Rany Qurratu Aini, Deden Aldila, and Kiki Sugeng, Basic reproduction number of a multi-patch SVI model represented as a star graph topology, 10 2018, p. 020237.
  • [46] Andreas Rauh, Johanna Minisini, and Harald Aschemann, Carleman linearization for control and for state and disturbance estimation of nonlinear dynamical processes, IFAC Proceedings Volumes 42 (2009), no. 13, 455–460.
  • [47] Sergei F. Shandarin and Yakov B. Zeldovich, The large-scale structure of the universe: turbulence, intermittency, structures in a self-gravitating medium, Reviews of Modern Physics 61 (1989), no. 2, 185–220.
  • [48] Vivek V. Shende, Stephen S. Bullock, and Igor L. Markov, Synthesis of quantum-logic circuits, IEEE Transactions on Computer-Aided Design of Integrated Circuits and Systems 25 (2006), no. 6, 1000–1010, arXiv:quant-ph/0406176.
  • [49] Willi-Hans Steeb and F. Wilhelm, Non-linear autonomous systems of differential equations and Carleman linearization procedure, Journal of Mathematical Analysis and Applications 77 (1980), no. 2, 601–611.
  • [50] Massimo Vergassola, Bérengère Dubrulle, Uriel Frisch, and Alain Noullez, Burgers’ equation, devil’s staircases and the mass distribution for large-scale structures, Astronomy and Astrophysics 289 (1994), 325–356.
  • [51] Paul Waltman, Competition models in population biology, SIAM, 1983.
  • [52] Chaolong Wang, Li Liu, Xingjie Hao, Huan Guo, Qi Wang, Jiao Huang, Na He, Hongjie Yu, Xihong Lin, An Pan, Sheng Wei, and Tangchun Wu, Evolving epidemiology and impact of non-pharmaceutical interventions on the outbreak of coronavirus disease 2019 in Wuhan, China, Journal of the American Medical Association 323 (2020), no. 19, 1915–1923.
  • [53] Gul Zaman, Yong Han Kang, and Il Hyo Jung, Stability analysis and optimal vaccination of an SIR epidemic model, Biosystems 93 (2008), no. 3, 240–249.