Skip to main content

Quantum Spectral Methods for Differential Equations

Abstract

Recently developed quantum algorithms address computational challenges in numerical analysis by performing linear algebra in Hilbert space. Such algorithms can produce a quantum state proportional to the solution of a d-dimensional system of linear equations or linear differential equations with complexity \({{\,\mathrm{poly}\,}}(\log d)\). While several of these algorithms approximate the solution to within \(\epsilon \) with complexity \({{\,\mathrm{poly}\,}}(\log (1/\epsilon ))\), no such algorithm was previously known for differential equations with time-dependent coefficients. Here we develop a quantum algorithm for linear ordinary differential equations based on so-called spectral methods, an alternative to finite difference methods that approximates the solution globally. Using this approach, we give a quantum algorithm for time-dependent initial and boundary value problems with complexity \({{\,\mathrm{poly}\,}}(\log d, \log (1/\epsilon ))\).

This is a preview of subscription content, access via your institution.

References

  1. Ambainis, A.: Variable time amplitude amplification and quantum algorithms for linear algebra problems. In: Proceedings of the 29th Symposium on Theoretical Aspects of Computer Science, pp. 636–647 (2012). arXiv:1010.4458

  2. Apostol, T.M.: Calculus, vol. II. Wiley, Hoboken (1969)

    MATH  Google Scholar 

  3. Arrazola, J.M., Kalajdzievski, T., Weedbrook, C., Lloyd, S.: Quantum algorithm for non-homogeneous linear partial differential equations. arXiv:1809.02622

  4. Babolian, E., Hosseini, M.M.: A modified spectral method for numerical solution of ordinary differential equations with non-analytic solution. Appl. Math. Comput. 132(2), 341–351 (2002)

    MathSciNet  MATH  Google Scholar 

  5. Berry, D.W.: High-order quantum algorithm for solving linear differential equations. J. Phys. A 47(10), 105301 (2014). arXiv:1010.2745

  6. Berry, D.W., Ahokas, G., Cleve, R., Sanders, B.C.: Efficient quantum algorithms for simulating sparse Hamiltonians. Commun. Math. Phys. 270(2), 359–371 (2007). arXiv:quant-ph/0508139

  7. Berry, D.W., Childs, A.M., Cleve, R., Kothari, R., Somma, R.D.: Exponential improvement in precision for simulating sparse Hamiltonians. In: Proceedings of the 46th Annual ACM Symposium on Theory of Computing, pp. 283–292 (2014). arXiv:1312.1414

  8. Berry, D.W., Childs, A.M., Cleve, R., Kothari, R., Somma, R.D.: Simulating Hamiltonian dynamics with a truncated Taylor series. Phys. Rev. Lett. 114(9), 090502 (2015). arXiv:1412.4687

  9. Berry, D.W., Childs, A.M., Kothari, R.: Hamiltonian simulation with nearly optimal dependence on all parameters. In: Proceedings of the 56th Annual IEEE Symposium on Foundations of Computer Science, pp. 792–809 (2015). arXiv:1501.01715

  10. Berry, D.W., Childs, A.M., Ostrander, A., Wang, G.: Quantum algorithm for linear differential equations with exponentially improved dependence on precision. Commun. Math. Phys. 356(3), 1057–1081 (2017). arXiv:1701.03684

  11. Berry, D.W., Novo, L.: Corrected quantum walk for optimal Hamiltonian simulation. Quantum Inf. Comput. 16(15–16), 1295 (2016). arXiv:1606.03443

  12. Bird, R.B.: Transport phenomena. Appl. Mech. Rev. 55(1), R1–R4 (2002)

    ADS  Article  Google Scholar 

  13. Brassard, G., Hoyer, P., Mosca, M., Tapp, A.: Quantum amplitude amplification and estimation. Contemp. Math. 305, 53–74 (2002). arXiv:quant-ph/0005055

  14. Childs, A.M.: On the relationship between continuous- and discrete-time quantum walk. Commun. Math. Phys. 294(2), 581–603 (2010). arXiv:0810.0312

  15. Childs, A.M., Kothari, R., Somma, R.D.: Quantum linear systems algorithm with exponentially improved dependence on precision. SIAM J. Comput. 46, 1920–1950 (2017). arXiv:1511.02306

  16. Clader, D.B., Jacobs, B.C., Sprouse, C.R.: Preconditioned quantum linear system algorithm. Phys. Rev. Lett. 110.25, 250504 (2013). arXiv:1301.2340

  17. Costa, P., Jordan, S., Ostrander, A.: Quantum algorithm for simulating the wave equation. arXiv:1711.05394

  18. Gheorghiu, C.-I.: Spectral Methods for Differential Problems. Casa Cartii de Stiinta Publishing House, Cluj-Napoca (2007)

    MATH  Google Scholar 

  19. Harris, S.: An Introduction to the Theory of the Boltzmann Equation. Courier Corporation, Dover (2004)

    Google Scholar 

  20. Harrow, A.W., Hassidim, A., Lloyd, S.: Quantum algorithm for linear systems of equations. Phys. Rev. Lett. 103(15), 150502 (2009). arXiv:0811.3171

  21. Hosseini, M.M.: A modified pseudospectral method for numerical solution of ordinary differential equations systems. Appl. Math. Comput. 176(2), 470–475 (2006)

    MathSciNet  MATH  Google Scholar 

  22. Jackson, J.D.: Classical Electrodynamics. Wiley, Hoboken (2012)

    MATH  Google Scholar 

  23. Kahaner, D., Moler, C., Nash, S.: Numerical Methods and Software. Prentice Hall, Upper Saddle River (1989)

    MATH  Google Scholar 

  24. Kim, S., Karrila, S.J.: Microhydrodynamics: Principles and Selected Applications. Courier Corporation, Chelmsford (2013)

    Google Scholar 

  25. Kress, R.: Numerical Analysis. Springer, Berlin (1998)

    Book  Google Scholar 

  26. Leyton, S.K., Osborne, T.J.: A quantum algorithm to solve nonlinear differential equations. arXiv:0812.4423

  27. Low, G.H., Chuang, I.L.: Hamiltonian simulation by qubitization. arXiv:1610.06546

  28. Low, G.H., Chuang, I.L.: Optimal Hamiltonian simulation by quantum signal processing. Phys. Rev. Lett. 118(9), 010501 (2017). arXiv:1606.02685

  29. Novo, L., Berry, D.W.: Improved Hamiltonian simulation via a truncated Taylor series and corrections. Quantum Inf. Comput. 17, 0623 (2017). arXiv:1611.10033

  30. Poulin, D., Qarry, A., Somma, R.D., Verstraete, F.: Quantum simulation of time-dependent Hamiltonians and the convenient illusion of Hilbert space. Phys. Rev. Lett. 106, 170501 (2011). arXiv:1102.1360

  31. Shen, J., Tang, T., Wang, L.-L.: Spectral Methods: Algorithms, Analysis and Applications. Springer, Berlin (2011)

    Book  Google Scholar 

  32. Shende, V.V., Bullock, S.S., Markov, I.L.: Synthesis of quantum-logic circuits. IEEE Trans. Comput.-Aided Des. Integr. Circuits Syst. 25(6), 1000–1010 (2006). arXiv:quant-ph/0406176

  33. Thambynayagam, R.K.M.: The Diffusion Handbook: Applied Solutions for Engineers. McGraw-Hill Professional, Pennsylvania (2011)

    Google Scholar 

  34. Thidé, B.: Electromagnetic Field Theory. Upsilon Books, Uppsala (2004)

    Google Scholar 

Download references

Acknowledgements

We thank Stephen Jordan and Aaron Ostrander for valuable discussions of quantum algorithms for time-dependent linear differential equations. This work was supported in part by the Army Research Office (MURI award W911NF-16-1-0349), the Canadian Institute for Advanced Research, the National Science Foundation (Grants 1526380 and 1813814), and the U.S. Department of Energy, Office of Science, Office of Advanced Scientific Computing Research, Quantum Algorithms Teams and Quantum Testbed Pathfinder programs (Grant No. DE-SC0019040).

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Jin-Peng Liu.

Additional information

Publisher's Note

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

Communicated by M. M. Wolf

Appendices

A Chebyshev Polynomials

This appendix defines the Chebyshev polynomials and presents some of their properties that are useful for our analysis.

For any \(k \in {\mathbb {N}}\), the Chebyshev polynomial of the first kind can be defined as the function

$$\begin{aligned} T_k(x)=\cos (k\arccos x),\quad x\in [-1,1]. \end{aligned}$$
(A.1)

It can be shown that this is a polynomial of degree k in x. For example, we have

$$\begin{aligned} T_0(x)&=1,&T_1(x)&=x,&T_2(x)&=2x^2-1,&T_3(x)&=4x^3-3x,&T_4(x)&=8x^4-8x^2+1. \end{aligned}$$
(A.2)

Using the trigonometric addition formula \(\cos (k+1)\theta +\cos (k-1)\theta =2\cos \theta \cos k\theta \), we have the recurrence

$$\begin{aligned} T_{k+1}(x)=2xT_k(x)-T_{k-1}(x) \end{aligned}$$
(A.3)

(which also provides an alternative definition of the Chebyshev polynomials, starting from the initial conditions \(T_0(x)=1\) and \(T_1(x)=x\)). We also have the bounds

$$\begin{aligned} \begin{aligned} |T_k(x)|&\le 1 \text { for } |x|\le 1,&T_k(\pm 1)&=(\pm 1)^k. \end{aligned} \end{aligned}$$
(A.4)

Chebyshev polynomials are orthogonal polynomials on \([-1,1]\) with the weight function \(w(x):=(1-x^2)^{-1/2}\). More concretely, defining an inner product on \(L_w^2(-1,1)\) by

$$\begin{aligned} (f,g)_w&:=\int _{-1}^1 f(x)g(x)\frac{\mathrm {d}{x}}{\sqrt{1-x^2}}, \end{aligned}$$
(A.5)

we have

$$\begin{aligned} (T_m,T_n)_w&=\int _0^{\pi }\cos m\theta \cos n\theta \, \mathrm {d}{\theta } \end{aligned}$$
(A.6)
$$\begin{aligned}&=\frac{\pi }{2}\sigma _n\delta _{m,n} \end{aligned}$$
(A.7)

where

$$\begin{aligned} \sigma _n:= {\left\{ \begin{array}{ll} 2 &{} n=0\\ 1 &{} n\ge 1. \end{array}\right. } \end{aligned}$$
(A.8)

It is well known from the approximation theorem of Weierstrass that \(\{T_k(x) : k \in {\mathbb {N}}\}\) is complete on the space \(L_w^2(-1,1)\). In other words, we have the following:

Lemma 7

Any function \(u\in L_w^2(-1,1)\) can be expanded by a unique Chebyshev series as

$$\begin{aligned} u(x)=\sum _{k=0}^{\infty }{\hat{c}}_kT_k(x) \end{aligned}$$
(A.9)

where the coefficients are

$$\begin{aligned} {\hat{c}}_k=\frac{2}{\pi }(u,T_k)_w. \end{aligned}$$
(A.10)

For any \(N \in {\mathbb {N}}\), we introduce the orthogonal projection \(P_N :L_w^2(-1,1)\rightarrow \mathbb {P}_N\) (where \(\mathbb {P}_N\) denotes the set of polynomials of degree at most N) by

$$\begin{aligned} P_N u(x)=\sum _{k=0}^N{\hat{c}}_kT_k(x). \end{aligned}$$
(A.11)

By the completeness of the Chebyshev polynomials, we have

$$\begin{aligned} (P_Nu(x),v(x))_w=(u(x),v(x))_w\quad \forall \, v\in \mathbb {P}_N \end{aligned}$$
(A.12)

and

$$\begin{aligned} \Vert P_Nu(x)-u(x)\Vert _w\rightarrow 0,\quad N\rightarrow \infty . \end{aligned}$$
(A.13)

Finally, we compute the Chebyshev series of \(u'(x)\) in terms of the Chebyshev series of u(x). Since \(T_k(x)=\cos k\theta \) where \(\theta =\arccos x\), we have

$$\begin{aligned} T'_k(x)=\frac{k\sin k\theta }{\sin \theta }. \end{aligned}$$
(A.14)

Since

$$\begin{aligned} 2\cos k\theta =\frac{\sin (k+1)\theta }{\sin \theta }-\frac{\sin (k-1)\theta }{\sin \theta }, \end{aligned}$$
(A.15)

we obtain

$$\begin{aligned} 2T_k(x)=\frac{T'_{k+1}(x)}{k+1}-\frac{T'_{k-1}(x)}{k-1},\quad k\ge 2 \end{aligned}$$
(A.16)

and

$$\begin{aligned} T_1(x)=\frac{T'_2(x)}{4}. \end{aligned}$$
(A.17)

Since \(P_N u(x) \in \mathbb {P}_N\), the derivative of this projection should be in \(\mathbb {P}_{N-1}\). Indeed, we have

$$\begin{aligned} \begin{aligned} u'(x)&=\sum _{k=0}^{N-1}{\hat{c}}'_kT_k(x) \\&=\frac{1}{2}\sum _{k=1}^{N-1}{\hat{c}}'_k\frac{T'_{k+1}(x)}{k+1} -\frac{1}{2}\sum _{k=2}^{N-1}{\hat{c}}'_k\frac{T'_{k-1}(x)}{k-1} +{\hat{c}}'_0T_0(x)\\&=\sum _{k=2}^{N-2}({\hat{c}}'_{k-1}-{\hat{c}}'_{k+1}) \frac{T'_k(x)}{2k}-\frac{1}{2}{\hat{c}}'_{2}T'_1(x) +\frac{1}{2}{\hat{c}}'_{N-2}\frac{T'_{N-1}(x)}{N-1} +\frac{1}{2}{\hat{c}}'_{N-1}\frac{T'_n(x)}{N}+{\hat{c}}'_0T_0(x)\\&=\sum _{k=1}^N{\hat{c}}_kT'_k(x). \end{aligned} \end{aligned}$$
(A.18)

Comparing the coefficients of both sides, we find

$$\begin{aligned} \begin{aligned} \sigma _k{\hat{c}}'_k&={\hat{c}}'_{k+2}+2(k+1){\hat{c}}_{k+1},\quad k\in [{N}]_0\\ {\hat{c}}'_N&=0 \\ {\hat{c}}'_{N+1}&=0 \end{aligned} \end{aligned}$$
(A.19)

where \(\sigma _k\) is defined in (A.8).

Since \({\hat{c}}'_k=0\) for \(k\ge N\), we can calculate \({\hat{c}}'_{N-1}\) from \({\hat{c}}_N\) and then successively calculate \({\hat{c}}'_{N-2},\ldots ,{\hat{c}}'_1,{\hat{c}}'_0\). This recurrence gives

$$\begin{aligned} {\hat{c}}'_k=\frac{2}{\sigma _k}\sum _{\begin{array}{c} j=k+1 \\ j+k \text { odd} \end{array}}^Nj{\hat{c}}_j,\quad k\in [{N}]_0. \end{aligned}$$
(A.20)

Since \({\hat{c}}'_k\) only depends on \({\hat{c}}_j\) for \(j>k\), the transformation matrix \(D_N\) between the values \({\hat{c}}'_k\) and \({\hat{c}}_k\) for \(k \in [{N+1}]_0\) is an upper triangular matrix with all zero diagonal elements, namely

$$\begin{aligned}{}[D_N]_{kj}= {\left\{ \begin{array}{ll} \frac{2j}{\sigma _k} &{}j>k,~j+k \text { odd} \\ 0 &{} \text {otherwise}. \end{array}\right. } \end{aligned}$$
(A.21)

B An Example of the Quantum Spectral Method

Section 3 defines a linear system that implements the quantum spectral method for solving a system of d time-dependent differential equations. Here we present a simple example of this system for the case \(d=1\), namely

$$\begin{aligned} \frac{\mathrm {d}{x}}{\mathrm {d}{t}}=A(t)x(t)+f(t) \end{aligned}$$
(B.1)

where \(x(t),A(t),f(t)\in {\mathbb {C}}\), \(t\in [0,T]\), and we have the initial condition

$$\begin{aligned} x(0)=\gamma \in {\mathbb {C}}. \end{aligned}$$
(B.2)

In particular, we choose \(m=3\), \(n=2\), and \(p=1\) in the specification of the linear system. We divide [0, T] into \(m=3\) intervals \([0,\Gamma _1],[\Gamma _1,\Gamma _2],[\Gamma _2,T]\) with \(\Gamma _0=0, \Gamma _m=T\), and map each one onto \([-1,1]\) with the linear mapping \(K_h\) satisfying \(K_h(\Gamma _h)=1\) and \(K_h(\Gamma _{h+1})=-1\). Then we take the finite Chebyshev series of x(t) with \(n=2\) into the differential equation with interpolating nodes \(\{t_l=\cos \frac{l\pi }{n} : l \in [{2}]\} = \{0,-1\}\) to obtain a linear system. Finally, we repeat the final state \(p=1\) time to increase the success probability.

With these choices, the linear system has the form

$$\begin{aligned} L= \begin{pmatrix} L_1+L_2(A_0) &{} &{} &{} &{} \\ L_3 &{} L_1+L_2(A_1) &{} &{} &{} \\ &{} L_3 &{} L_1+L_2(A_2) &{} &{} \\ &{} &{} L_3 &{} L_4 &{} \\ &{} &{} &{} L_5 &{} L_4 \\ \end{pmatrix} \end{aligned}$$
(B.3)

with

$$\begin{aligned} L_1&=|0\rangle \langle 0|P_n+\sum _{l=1}^n|l\rangle \langle l|P_nD_n= \begin{pmatrix} 1 &{} 1 &{} 1 \\ 0 &{} 1 &{} 0 \\ 0 &{} 1 &{} -4 \\ \end{pmatrix} \end{aligned}$$
(B.4)
$$\begin{aligned} L_2(A_h)&=-\sum _{l=1}^nA_h(t_l)\otimes |l\rangle \langle l|P_n=- \begin{pmatrix} 0 &{} 0 &{} 0 \\ A_h(0) &{} 0 &{} -A_h(0) \\ A_h(-1) &{} -A_h(-1) &{} A_h(-1) \\ \end{pmatrix} \end{aligned}$$
(B.5)
$$\begin{aligned} L_3&=\sum _{i=0}^{d}\sum _{k=0}^n(-1)^k|i0\rangle \langle ik|= \begin{pmatrix} 1 &{} -1 &{} 1 \\ 0 &{} 0 &{} 0 \\ 0 &{} 0 &{} 0 \\ \end{pmatrix} \end{aligned}$$
(B.6)
$$\begin{aligned} L_4&=-\sum _{i=0}^{d}\sum _{l=1}^n|il\rangle \langle il-1|+\sum _{i=0}^{d}\sum _{l=0}^n|il\rangle \langle il|= \begin{pmatrix} 1 &{} 0 &{} 0 \\ -1 &{} 1 &{} 0 \\ 0 &{} -1 &{} 1 \\ \end{pmatrix} \end{aligned}$$
(B.7)
$$\begin{aligned} L_5&=-\sum _{i=0}^{d}|i0\rangle \langle in|= \begin{pmatrix} 0 &{} 0 &{} -1 \\ 0 &{} 0 &{} 0 \\ 0 &{} 0 &{} 0 \\ \end{pmatrix}. \end{aligned}$$
(B.8)

The vector \(|X\rangle \) has the form

$$\begin{aligned} |X\rangle = \begin{pmatrix} c_0(\Gamma _1) \\ c_1(\Gamma _1) \\ c_2(\Gamma _1) \\ c_0(\Gamma _2) \\ c_1(\Gamma _2) \\ c_2(\Gamma _2) \\ c_0(\Gamma _3) \\ c_1(\Gamma _3) \\ c_2(\Gamma _3) \\ x \\ x \\ x \\ x \\ x \\ x \\ \end{pmatrix} \end{aligned}$$
(B.9)

where \(c_l(\Gamma _{h+1})\) are the Chebyshev series coefficients of \(x(\Gamma _{h+1})\) and x is the final state \(x(\Gamma _m)=x(-1)\).

Finally, the vector \(|B\rangle \) has the form

$$\begin{aligned} |B\rangle = \begin{pmatrix} \gamma \\ f_0(0) \\ f_0(-1) \\ 0 \\ f_1(0) \\ f_1(-1) \\ 0 \\ f_2(0) \\ f_2(-1) \\ 0 \\ 0 \\ 0 \\ 0 \\ 0 \\ 0 \\ \end{pmatrix} \end{aligned}$$
(B.10)

where \(\gamma \) comes from the initial condition and \(f_{h}(\cos \frac{l\pi }{n})\) is the value of \(f_h\) at the interpolation point \(t_l=\cos \frac{l\pi }{n} \in \{0,-1\}\).

Rights and permissions

Reprints and Permissions

About this article

Verify currency and authenticity via CrossMark

Cite this article

Childs, A.M., Liu, JP. Quantum Spectral Methods for Differential Equations. Commun. Math. Phys. 375, 1427–1457 (2020). https://doi.org/10.1007/s00220-020-03699-z

Download citation

  • Received:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s00220-020-03699-z