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

Solving Fractional Differential Equations on a Quantum Computer:
A Variational Approach

Fong Yew Leong Institute of High Performance Computing (IHPC), Agency for Science, Technology and Research (A*STAR), 1 Fusionopolis Way, #16-16 Connexis, Singapore 138632, Singapore 0000-0002-0064-0118 Dax Enshan Koh Institute of High Performance Computing (IHPC), Agency for Science, Technology and Research (A*STAR), 1 Fusionopolis Way, #16-16 Connexis, Singapore 138632, Singapore Science, Mathematics and Technology Cluster, Singapore University of Technology and Design, 8 Somapah Road, Singapore 487372, Singapore 0000-0002-8968-591X Jian Feng Kong Institute of High Performance Computing (IHPC), Agency for Science, Technology and Research (A*STAR), 1 Fusionopolis Way, #16-16 Connexis, Singapore 138632, Singapore 0000-0001-5980-4140 Siong Thye Goh Institute of High Performance Computing (IHPC), Agency for Science, Technology and Research (A*STAR), 1 Fusionopolis Way, #16-16 Connexis, Singapore 138632, Singapore Singapore Management University, 81 Victoria Street, 188065, Singapore 0000-0001-7563-0961 Jun Yong Khoo Institute of High Performance Computing (IHPC), Agency for Science, Technology and Research (A*STAR), 1 Fusionopolis Way, #16-16 Connexis, Singapore 138632, Singapore 0000-0003-0908-3343 Wei-Bin Ewe Institute of High Performance Computing (IHPC), Agency for Science, Technology and Research (A*STAR), 1 Fusionopolis Way, #16-16 Connexis, Singapore 138632, Singapore 0000-0002-4600-0634 Hongying Li Institute of High Performance Computing (IHPC), Agency for Science, Technology and Research (A*STAR), 1 Fusionopolis Way, #16-16 Connexis, Singapore 138632, Singapore 0000-0003-4736-295X Jayne Thompson Institute of High Performance Computing (IHPC), Agency for Science, Technology and Research (A*STAR), 1 Fusionopolis Way, #16-16 Connexis, Singapore 138632, Singapore Dario Poletti Science, Mathematics and Technology Cluster and Engineering Product Development Pillar, Singapore University of Technology and Design, 8 Somapah Road, 487372 Singapore Centre for Quantum Technologies, National University of Singapore 117543, Singapore MajuLab, CNRS-UNS-NUS-NTU International Joint Research Unit, UMI 3654, Singapore
Abstract

We introduce an efficient variational hybrid quantum-classical algorithm designed for solving Caputo time-fractional partial differential equations. Our method employs an iterable cost function incorporating a linear combination of overlap history states. The proposed algorithm is not only efficient in time complexity, but has lower memory costs compared to classical methods. Our results indicate that solution fidelity is insensitive to the fractional index and that gradient evaluation cost scales economically with the number of time steps. As a proof of concept, we apply our algorithm to solve a range of fractional partial differential equations commonly encountered in engineering applications, such as the sub-diffusion equation, the non-linear Burgers’ equation and a coupled diffusive epidemic model. We assess quantum hardware performance under realistic noise conditions, further validating the practical utility of our algorithm.

1 Introduction

Differential equations play an important role in the modeling of many practical engineering problems. Fractional differential equations, which are generalizations of differential equations to arbitrary non-integer order, involve fractional derivatives such as dαdxα\frac{d^{\alpha}}{dx^{\alpha}}, where α\alpha is a non-integer real number. These models have been shown to be capable of modeling more complex processes that exhibit memory effects or non-local behavior. For example, fractional differential equations have found applications in fractional advection-dispersion equations [1] and viscoelastic flow problems [2]. Fractional-order derivatives in time have also been used to model cancer tumor growth, by numerically fitting the fractional order [3].

Here, we consider numerical solutions to time-fractional diffusive differential equations of order α\alpha, which derive from non-Markovian continuous-time random walks [4]. Finite difference methods are effective and simple to implement for time-fractional problems [5], where implicit methods are preferred to explicit methods for numerical stability [6]. However, the time-fractional derivative creates a global dependence problem [7], where previous solutions are accessed from memory, rendering storage expensive for spatially large problems.

Quantum computers can offer new tools for efficiently solving differential equations. In particular, variational quantum algorithms (VQAs) have emerged as a leading strategy in the noisy intermediate-scale quantum (NISQ) era [8, 9], featuring low-depth parameterized quantum circuits, alongside classical optimizers used to minimize a cost function. These VQAs yield quantum states that encode approximate solutions to partial differential equations. They have been successfully applied to both linear [10, 11, 12] and nonlinear differential equations [13, 14] in a diverse range of fields, including electromagnetics [15], collodial transport [16], fluid dynamics [17, 18, 19], and finance [20].

In this paper, we propose and implement a variational quantum optimization scheme for solving time-fractional diffusive partial differential equations in space and time, either implicitly or semi-implicitly, using simple quantum overlap measurements for the time integral term. We show that our approach is not only efficient in time complexity, but can also yield memory cost advantages in handling the global dependence problem. The rest of the paper is organized as follows. In Section 2, we introduce the time-fractional diffusion equation and present our variational quantum optimization scheme for numerical integration. In Section 3, we discuss the details of the implementation and evaluate time and memory complexities of our scheme. In Section 4, we present numerical experiments, including time-fractional Burgers’ equation for hydrodynamics (Section 4.2), and fractional diffusive epidemic model (Section 4.3). Lastly, we trial our algorithm on noise model simulators and hardware in Section 5, and conclude with discussions in Section 6.

2 Fractional diffusion equations

We consider the fractional diffusion equation [21, 6] in space xx and time tt,

Dtαu(t,x)=xxu(t,x),\displaystyle D_{t}^{\alpha}u(t,x)=\partial_{xx}u(t,x), (1)

where DtαD_{t}^{\alpha} is the Caputo fractional derivative of the α\alpha-th order with respect to tt, defined as

Dαu(t,x)tα=1Γ(nα)0tnu(s,x)snds(ts)αn+1,n1<α<n,\displaystyle\frac{D^{\alpha}u(t,x)}{\partial{t^{\alpha}}}=\frac{1}{\Gamma(n-\alpha)}\int^{t}_{0}\frac{\partial^{n}{u(s,x)}}{\partial s^{n}}\frac{ds}{(t-s)^{\alpha-n+1}},\quad n-1<\alpha<n, (2)

where Γ\Gamma denotes the Gamma function and n=αn=\lceil\alpha\rceil\in\mathbb{N} is the ceiling of α\alpha.

2.1 Difference scheme

We set up a space-time rectangular domain with spatial extent LL and temporal duration TT, dividing it into a regularly spaced grid with integer size N×MN\times M. The spatial grid points are defined as xi=ihx_{i}=ih where h=L/Nh=L/N and i=1,2,,Ni=1,2,\dots,N, and the temporal grid points as tk=kτt_{k}=k\tau where τ=T/M\tau=T/M and k=1,2,,Mk=1,2,\dots,M.

The first-order finite difference of the Caputo derivative of order (0<α1)(0<\alpha\leq 1) is approximated by [5, 22]

Dtαu(tk,xn)gα,τj=1kwj(α)(unkj+1unkj),\displaystyle D_{t}^{\alpha}u(t_{k},x_{n})\simeq g_{\alpha,\tau}\sum_{j=1}^{k}w_{j}^{(\alpha)}(u_{n}^{k-j+1}-u_{n}^{k-j}), (3)

where unku(tk,xn)u_{n}^{k}\equiv u(t_{k},x_{n}), gα,τ:=τα/Γ(2α)g_{\alpha,\tau}:=\tau^{-\alpha}/\Gamma(2-\alpha) and wj(α):=j1α(j1)1αw_{j}^{(\alpha)}:=j^{1-\alpha}-(j-1)^{1-\alpha}. Rearranging Eq. 3 yields a discrete sum of terms unju_{n}^{j} as

Dtαu(tk,xn)gα,τ[unkwkun0+j=1k1(wj+1wj)unkj],\displaystyle D_{t}^{\alpha}u(t_{k},x_{n})\simeq g_{\alpha,\tau}\left[u_{n}^{k}-w_{k}u_{n}^{0}+\sum_{j=1}^{k-1}\left(w_{j+1}-w_{j}\right)u_{n}^{k-j}\right], (4)

where w1=1w_{1}=1 by definition.

The finite difference of the spatial derivative is approximated by

xxu(tk,xn)un+1k2unk+un1kh2.\displaystyle\partial_{xx}u(t_{k},x_{n})\simeq\frac{u_{n+1}^{k}-2u_{n}^{k}+u_{n-1}^{k}}{h^{2}}. (5)

Together, the difference scheme for the fractional diffusion equation can be iterated in time as

(1aδ)unk=wkun0j=1k1(wj+1wj)unkj,\displaystyle\left(1-a\delta\right)u_{n}^{k}=w_{k}u_{n}^{0}-\sum_{j=1}^{k-1}\left(w_{j+1}-w_{j}\right)u_{n}^{k-j}, (6)

where a=gα,τ1h2a=g_{\alpha,\tau}^{-1}h^{-2} and δun:=un+12un+un1\delta u_{n}:=u_{n+1}-2u_{n}+u_{n-1}. In a more compact matrix form, this reads

A𝐮k=wk𝐮0j=1k1Δwj𝐮kj,\displaystyle A\mathbf{u}^{k}=w_{k}\mathbf{u}^{0}-\sum_{j=1}^{k-1}\Delta w_{j}\mathbf{u}^{k-j}, (7)

where 𝐮k:=u(tk,x)\mathbf{u}^{k}:=u(t_{k},x), Δwj:=wj+1wj\Delta w_{j}:=w_{j+1}-w_{j}, and AA is an N×NN\times N symmetric tridiagonal matrix with b=1+2ab=1+2a on the main diagonal, a-a on the adjacent off-diagonals, and terms in the corners of the matrix that are specified by the boundary conditions. More precisely, the matrix AA is given by

A=[ca0daba000aba000abad0ac]N×N,\displaystyle A=\begin{bmatrix}c&-a&0&&&\cdots&&d\\ -a&b&-a&0&&\cdots&&0\\ 0&-a&b&-a&&\cdots&&0\\ \vdots&&&\ddots&&&&\vdots\\ 0&&\cdots&&0&-a&b&-a\\ d&&\cdots&&&0&-a&c\end{bmatrix}\in\mathbb{R}^{N\times N}, (8)

where (c,d)=(b,a)(c,d)=(b,-a) for periodic boundary condition, (c,d)=(b,0)(c,d)=(b,0) for Dirichlet boundary condition and (c,d)=(1+a,0)(c,d)=(1+a,0) for Neumann boundary condition. The right-hand side of Eq. 7 carries the history of solutions up to k1k-1.

2.2 Variational quantum optimization

Using Dirac notation, we rewrite the iterative fractional diffusion equation as

A|u~k=|f~k1,\displaystyle A|\tilde{u}^{k}\rangle=|\tilde{f}^{k-1}\rangle, (9)

where we approximate the unnormalized quantum state |u~k|\tilde{u}^{k}\rangle at time kk by an ansatz or trial state formed by a set of parameterized unitaries RR and unparameterized entangling unitaries WW as,

|u~k:=rk|uk=rki=1lWli+1R(𝜽li+1k)|0,\displaystyle|\tilde{u}^{k}\rangle:=r^{k}|u^{k}\rangle=r^{k}\prod_{i=1}^{l}W_{l-i+1}R(\boldsymbol{\theta}_{l-i+1}^{k})|0\rangle, (10)

where rkr^{k} is the norm of the unnormalized state |u~k|\tilde{u}^{k}\rangle, 𝜽\boldsymbol{\theta} is a set of gate parameters and ll is the number of layers in the ansatz. The unnormalized source state |f~k1|\tilde{f}^{k-1}\rangle is a linear combination of history states in [0,k1][0,k-1].

Following [11], we define a cost function based on potential energy at time kk,

𝒞k(rk,𝜽k)=12(rk)2uk|A|uk12rk(uk|f~k1+f~k1|uk),\displaystyle\mathcal{C}^{k}(r^{k},\boldsymbol{\theta}^{k})=\frac{1}{2}(r^{k})^{2}\langle u^{k}|A|u^{k}\rangle-\frac{1}{2}r^{k}\left(\langle u^{k}|\tilde{f}^{k-1}\rangle+\langle\tilde{f}^{k-1}|u^{k}\rangle\right), (11)

where

|f~k1=wkr0|u0j=1k1Δwjrkj|ukj.\displaystyle|\tilde{f}^{k-1}\rangle=w_{k}r^{0}|u^{0}\rangle-\sum_{j=1}^{k-1}\Delta w_{j}r^{k-j}|u^{k-j}\rangle. (12)

With that, uk|f~k1\langle u^{k}|\tilde{f}^{k-1}\rangle expands into a list of kk measurable overlap terms uk|u[0,k1]\langle u^{k}|u^{[0,k-1]}\rangle [23].

Introducing |f,u:=21/2(|0|f+|1|u)|f,u\rangle:=2^{-1/2}(|0\rangle|f\rangle+|1\rangle|u\rangle), we have

𝒞k(rk,𝜽k)=12(rk)2uk|A|ukrk(wkr0uk,u0j=1k1Δwjrkjuk,ukj).\displaystyle\mathcal{C}^{k}(r^{k},\boldsymbol{\theta}^{k})=\frac{1}{2}(r^{k})^{2}\langle u^{k}|A|u^{k}\rangle-r^{k}\left(w_{k}r^{0}\langle u^{k},u^{0}\rangle-\sum_{j=1}^{k-1}\Delta w_{j}r^{k-j}\langle u^{k},u^{k-j}\rangle\right). (13)

Here, f,u:=f,u|X𝕀n|f,u\langle f,u\rangle:=\langle f,u|X\otimes\mathbb{I}^{\otimes n}|f,u\rangle is used as a notation shorthand, where X=|10|+|01|X=|1\rangle\langle 0|+|0\rangle\langle 1| is the Pauli-X matrix and 𝕀:=𝕀0+𝕀1=|00|+|11|\mathbb{I}:=\mathbb{I}_{0}+\mathbb{I}_{1}=|0\rangle\langle 0|+|1\rangle\langle 1| is the 2×22\times 2 identity matrix. Also, n=log2Nn=\log_{2}N denotes the number of qubits representing NN spatial grid points.

Taking the derivative of 𝒞k\mathcal{C}^{k} with respect to rkr^{k}, the optimal norm

rk=uk,f~k1uk|A|uk\displaystyle r^{k}=\frac{\langle u^{k},\tilde{f}^{k-1}\rangle}{\langle u^{k}|A|u^{k}\rangle} (14)

can be eliminated from the cost function

𝒞k(rk,𝜽k)=12(uk,f~k1)2uk|A|uk,\displaystyle\mathcal{C}^{k}(r^{k},\boldsymbol{\theta}^{k})=-\frac{1}{2}\frac{\left({\langle u^{k},\tilde{f}^{k-1}\rangle}\right)^{2}}{\langle u^{k}|A|u^{k}\rangle}, (15)

which can be measured using quantum circuits (Fig. 12a,b) and optimized classically as

argmin𝜽k𝒞k(rk,𝜽k),\displaystyle\underset{\boldsymbol{\theta}^{k}}{\arg\min}\ \mathcal{C}^{k}\left(r^{k},\boldsymbol{\theta}^{k}\right), (16)

via either gradient-based (evaluate 𝜽k𝒞k\partial_{\boldsymbol{\theta}^{k}}\mathcal{C}^{k}) or gradient-free methods. A schematic of the proposed variational quantum algorithm is shown in Fig. 1.

Refer to caption
Figure 1: Schematic diagram of variational quantum algorithm for time-fractional differential equations. The initial solution, encoded by the vector 𝜽0\boldsymbol{\theta}^{0} containing nlnl optimized parameters and the norm r0r^{0}, is stored in classical memory. Subsequent iterations add 𝜽k\boldsymbol{\theta}^{k} and rkr^{k} to the growing pool of classically stored parameters 𝜽[0,k1]\boldsymbol{\theta}^{[0,k-1]} and norms r[0,k1]r^{[0,k-1]}, until the final time-step MM is reached. Solutions can be read out selectively via tomography using up to 𝒪(n2n)\mathcal{O}(n2^{n}) measurements on specific 𝜽k\boldsymbol{\theta}^{k} parameterized ansatz corresponding to time kk. Sampling complexity can be reduced using partial tomography or shadow tomography techniques.

3 Implementation

3.1 Hamiltonian decomposition

The Hamiltonian matrix AA (Eq. 8) can be decomposed into

A=b𝕀na{𝕀n1XH1+𝒮[𝕀n1XH2𝕀0n1XH3+𝕀0n1𝕀H4]𝒮}.\displaystyle A=b\mathbb{I}^{\otimes n}-a\left\{\underbrace{\mathbb{I}^{\otimes n-1}\otimes X}_{H_{1}}+\mathcal{S}^{\dagger}\big{[}\underbrace{\mathbb{I}^{\otimes n-1}\otimes X}_{H_{2}}-\underbrace{\mathbb{I}_{0}^{\otimes n-1}\otimes X}_{H_{3}}+\underbrace{\mathbb{I}_{0}^{\otimes n-1}\otimes\mathbb{I}}_{H_{4}}\big{]}\mathcal{S}\right\}. (17)

Since expectation values of the identity operator 𝕀\mathbb{I} are equal to 1, i.e. ϕ|𝕀n|ϕ=ϕ|𝕀n|ϕ=1\langle\phi|\mathbb{I}^{\otimes n}|\phi\rangle=\langle\phi^{\prime}|\mathbb{I}^{\otimes n}|\phi^{\prime}\rangle=1 [11], evaluating the expectation value of AA requires only the evaluation of expectation values of the simple terms (H12H_{1-2} for periodic boundary condition, H13H_{1-3} Dirichlet boundary condition and H14H_{1-4} for Neumann boundary condition). The operator 𝒮\mathcal{S} denotes the n-qubit cyclic shift operator,

𝒮=i=02n1|(i+1)mod 2ni|,\displaystyle\mathcal{S}=\sum^{2^{n}-1}_{i=0}|(i+1)\ \text{mod}\ 2^{n}\rangle\langle i|, (18)

which can be implemented using relative-phase Toffoli gates, Toffoli gates, a cnot gate and an X gate [24].

3.2 Ansatz initialization

For problems that admit only real solutions, it is preferable to use a real-amplitude ansatz, represented by Eq. 10 formed by ll repeating blocks, each consisting of a parameterized RR layer with one RY(θ)R_{Y}(\theta) gate on each qubit, followed by unparameterized WW layer with a cnot gate between consecutive qubits [25]:

|uk=i=l1[a=n11CaXa+1j=1nRY(θi,j)]|0,\displaystyle|u^{k}\rangle=\prod_{i=l}^{1}\left[\prod_{a=n-1}^{1}C_{a}X_{a+1}\bigotimes_{j=1}^{n}R_{Y}(\theta_{i,j})\right]|0\rangle, (19)

where we have employed the product notation with an initial index greater than the stopping index to signify that the terms in the product are arranged in decreasing index order [26]. In addition, we consider a real-amplitude ansatz with circular entanglement, such that

|uk=i=l1[CnX0a=n11CaXa+1j=1nRY(θi,j)]|0,n>2,\displaystyle|u^{k}\rangle=\prod_{i=l}^{1}\left[C_{n}X_{0}\prod_{a=n-1}^{1}C_{a}X_{a+1}\bigotimes_{j=1}^{n}R_{Y}(\theta_{i,j})\right]|0\rangle,\quad n>2, (20)

which has been shown to be efficient for solving partial differential equations [16]. See Fig. 11 for circuit diagrams of the ansaetze.

To solve Eq. 9, we prepare the initial ansatz state |u~0=r0|u(𝜽0)|\tilde{u}^{0}\rangle=r^{0}|u(\boldsymbol{\theta}^{0})\rangle using classical optimization on parameters 𝜽=(θi,j)(i,j){1,,l}×{1,,n}\boldsymbol{\theta}=\left(\theta_{i,j}\right)_{(i,j)\in\{1,\ldots,l\}\times\{1,\ldots,n\}} such that

𝜽0argmin𝜽0u^0|u(𝜽0),\displaystyle\boldsymbol{\theta}^{0}\in\underset{\boldsymbol{\theta}^{0}}{\arg\min}\left\|\langle\hat{u}^{0}|u(\boldsymbol{\theta}^{0})\rangle\right\|, (21)

where |u^0𝐮0/𝐮0|\hat{u}^{0}\rangle\equiv\mathbf{u}^{0}/\left\|\mathbf{u}^{0}\right\| is the normalized initial classical solution vector and r0=𝐮0r^{0}=\left\|\mathbf{u}^{0}\right\| is the initial norm.

3.3 Gradient estimation

The gradient of the cost function Eq. 15 can be estimated on quantum computers using the parameter shift rule. Following [11], here we write down the partial derivative of the cost function with respect to parameter θi,jk\theta^{k}_{i,j} indexed by (i,j)[1,nl](i,j)\in[1,nl] at kk, as

𝒞kθik=12(uk,f~k1uk|A|uk)[wkr0ukθik,u0j=1k1Δwjrkjukθik,ukj]+12(uk,f~k1uk|A|uk)2ukθik,ukA,\displaystyle\begin{split}\frac{\partial\mathcal{C}^{k}}{\partial{\theta}_{i}^{k}}=-\frac{1}{2}\left(\frac{\langle u^{k},\tilde{f}^{k-1}\rangle}{\langle u^{k}|A|u^{k}\rangle}\right)\left[w_{k}r^{0}\left\langle\frac{\partial u^{k}}{\partial\theta_{i}^{k}},u^{0}\right\rangle-\sum_{j=1}^{k-1}\Delta w_{j}r^{k-j}\left\langle\frac{\partial u^{k}}{\partial\theta_{i}^{k}},u^{k-j}\right\rangle\right]\\ +\frac{1}{2}\left(\frac{\langle u^{k},\tilde{f}^{k-1}\rangle}{\langle u^{k}|A|u^{k}\rangle}\right)^{2}\left\langle\frac{\partial u^{k}}{\partial\theta_{i}^{k}},u^{k}\right\rangle_{A},\end{split} (22)

where f,uA:=f,u|XA|f,u\langle f,u\rangle_{A}:=\langle f,u|X\otimes A|f,u\rangle is used as a notational shorthand. The parametric shift is implemented by a π\pi rotation on the ii-th RYR_{Y} gate as

ukθik=uk(θi%ni/n+π),\displaystyle\frac{\partial u^{k}}{\partial\theta_{i}^{k}}=u^{k}\left(\theta^{\lfloor i/n\rfloor}_{i\%n}+\pi\right), (23)

where i%ni\%n is the remainder r{0,1,,n1}r\in\{0,1,\ldots,n-1\} obtained when ii is divided by nn and i/n\lfloor i/n\rfloor is the integer part of i/ni/n. Thus, for each index ii at time kk, gradient estimation requires at least kk overlap measurements.

3.4 Time complexity and memory scaling

Time complexity. — Here we briefly estimate the time complexity of the algorithm based on the number of time steps, quantum circuits, gates and shots required, neglecting classical overheads such as parameter update, iteration, functional evaluation and initial encoding.

For a number of time steps MM, the overall time complexity is

𝒯MNitNg[Ml+(l+n2)ϵ2],\displaystyle\mathcal{T}\approx MN_{\mathrm{it}}N_{g}\left[\frac{Ml+(l+n^{2})}{\epsilon^{2}}\right], (24)

where nn is the number of qubits, ll is the number of ansatz layers, NitN_{\mathrm{it}} is the mean number of iterations required per time step and NgN_{g} is the mean number of evaluations required for gradient estimation per iteration. Specifically, the terms in square brackets are the gate complexities for the fractional derivative MlMl based on M/2M/2 overlap circuits containing 2l2l parametric gates in depth and for the Hamiltonian (l+n2)(l+n^{2}) based on 𝒪(1)\mathcal{O}(1) circuits (242-4 Eq. 17) containing ll parametric gates in depth for the ansatz and 𝒪(n2)\mathcal{O}(n^{2}) non-parametric gates for the shift operator. Each circuit is sampled repeatedly for 𝒪(ϵ2)\mathcal{O}(\epsilon^{-2}) shots per measurement, where ϵ\epsilon is the desired precision. We remark that with quantum amplitude estimation [27], the number of shots required may be quadratically reduced from 𝒪(ϵ2)\mathcal{O}(\epsilon^{-2}) to 𝒪(ϵ1)\mathcal{O}(\epsilon^{-1}). This decrease, however, entails increased circuit depth, as exemplified by the Ω(ϵ1)\Omega(\epsilon^{-1}) circuit depths utilized in [27, 28, 29]. Given these challenges in reducing circuit depth in quantum amplitude estimation and its extensions [30, 31, 32, 33], we do not consider this approach in the present study, deferring it for future exploration.

For nln\sim l, the gradient-based optimizer Ng𝒪(nl)N_{g}\sim\mathcal{O}(nl) yields an overall time complexity

𝒯𝒪(max{NitM2nl2ϵ2,NitMn3lϵ2}),\displaystyle\mathcal{T}\sim\mathcal{O}\left(\max\left\{\frac{N_{\mathrm{it}}M^{2}nl^{2}}{\epsilon^{2}},\frac{N_{\mathrm{it}}Mn^{3}l}{\epsilon^{2}}\right\}\right), (25)

scaling as 𝒪(M2)\mathcal{O}(M^{2}) for overlap circuits, or 𝒪(M)\mathcal{O}(M) for shift operators, the latter scaling applicable to the non-fractional diffusion/heat equation (α=1\alpha=1, [11]). Using simultaneous perturbation stochastic approximation (SPSA) [34], only two circuit executions are required per gradient evaluation Ng𝒪(1)N_{g}\sim\mathcal{O}(1), independent of the number of parameters, similar to gradient-free optimization.

The present algorithm is efficient in time complexity with respect to number of spatial grid points N(=2n)N(=2^{n}) [11, 35], neglecting initial encoding costs. Quantum advantage with respect to time TT may be achievable in higher dimensions (Remark 2 [35], Remark 3 [36]).

Memory scaling. — To solve the Caputo derivative Eq. 4, a classical algorithm assesses 𝒪(kN)\mathcal{O}(kN) parameters from memory at time kk, compared to 𝒪(knl)\mathcal{O}(knl) parameters for variational quantum algorithm Eq. 12. Assuming nln\sim l, the memory cost of the Caputo sums scales sub-exponentially as 𝒪(klogN)\mathcal{O}(k\log N) (Fig. 1), demonstrating efficient algorithmic space complexity.

4 Numerical experiments

The circuits are implemented in the quantum software framework Pennylane [37] using noiseless statevector emulation on lightning qubit backend. Parametric updates are performed using the limited-memory Broyden-Fletcher-Goldfarb-Shanno boxed (L-BFGS-B) optimizer with relative tolerance of 10610^{-6} and gradient tolerance of 10610^{-6}. The L-BFGS-B optimizer evaluates gradients using finite difference without explicit gradient inputs from Eq. 22. Initial encoding Eq. 21 is performed using SciPy’s minimize function with an initial null parameter set as (0,,0)(0,\dots,0).

4.1 Sub-diffusion equation

We solve for time-fractional (0<α1)(0<\alpha\leq 1) sub-diffusion equation Eq. 1 as an initial value problem with initial condition u(0,x)=x(1x)u(0,x)=x(1-x) and Dirichlet boundary condition u(t,0)=u(t,1)=0u(t,0)=u(t,1)=0 [6].

Figure 2 shows that the variational quantum solutions agree with classical sub-diffusion solutions in 32×3232\times 32 space-time domain with qubit-layer count (n,l)=(5,4)(n,l)=(5,4), for (a) α=1\alpha=1 and (b) α=0.5\alpha=0.5. Figure 3 shows that low fractional-order solutions tend to diffuse faster for short times, but slow down for long times, both characteristics of sub-diffusive behavior.

Refer to caption
Figure 2: Variational quantum solutions to time-fractional diffusion equation in N×M=32×32N\times M=32\times 32 space-time domain with qubit-layer count (n,l)=(5,4)(n,l)=(5,4), for (a) α=1\alpha=1 and (b) α=0.5\alpha=0.5. Initial and boundary conditions are u(0,x)=x(1x)u(0,x)=x(1-x) and u(t,0)=u(t,1)=0u(t,0)=u(t,1)=0. Colorbar denotes relative deviation from classical finite difference solution on the same domain.
Refer to caption
Figure 3: Variational quantum solutions (as Fig. 2) plotted on (a) αx\alpha-x at t=0.5t=0.5, and (b) tαt-\alpha at x=0.5x=0.5. Colorbar denotes relative deviation from classical finite difference solution on the same domain.

The trace error at time kk

ϵtrk=1u^k|u(𝜽k)2,\displaystyle\epsilon_{\mathrm{tr}}^{k}=\sqrt{1-\left\|\langle\hat{u}^{k}|u(\boldsymbol{\theta}^{k})\rangle\right\|^{2}}, (26)

can be averaged over the number of time steps MM for 0<α10<\alpha\leq 1, where |u^k𝐮k/𝐮k|\hat{u}^{k}\rangle\equiv\mathbf{u}^{k}/\left\|\mathbf{u}^{k}\right\| is the normalized classical solution vector at time kk.

4.1.1 Trace error and optimization

Figure 4a compares the results between the linear real-amplitude hardware-efficient ansatz Eq. 19 and the circular ansatz Eq. 20, suggesting an improved solution fidelity for the circular ansatz over the linear ansatz (n>4n>4). According to unitary dependence theory [38], the effect of an additional circular entangling cnot gate (CnX0C_{n}X_{0}) on a single layer ansatz (l=1l=1) is to transform the unitary dependence of the first qubit from q1:{RY(θ1)}q_{1}:\{R_{Y}(\theta_{1})\} to q1:{RY(θ2)RY(θn)}q_{1}:\{R_{Y}(\theta_{2})\sim R_{Y}(\theta_{n})\}, which effectively increases the connectivity of q1q_{1} by n2n-2 qubits. This may improve the performance of an ansatz for certain problems [38].

Figure 4b shows that the number of function evaluations k=1MNevalk\sum_{k=1}^{M}N_{eval}^{k}, required by the L-BFGS-B gradient-free optimizer scales sub-linearly with the number of time steps 𝒪(M0.6)\mathcal{O}(M^{0.6}) in time t=[0,0.5]t=[0,0.5]. The overhead costs for classical gradient estimation remains economical up to M=26M=2^{6}.

Refer to caption
Figure 4: (a) Time-averaged trace error ϵtr\epsilon_{\mathrm{tr}} plots for linear positive-amplitude hardware-efficient ansatz Eq. 19 (dotted lines) vs. circular ansatz Eq. 20 (continuous lines), for 0<α10<\alpha\leq 1. Error bars denote standard deviation. (b) Number of function evaluations k=1MNevalk\sum_{k=1}^{M}N_{eval}^{k} required by L-BFGS-B gradient-free optimizer for α=0.5\alpha=0.5 (dashed lines) and α=1\alpha=1 (continuous lines), scales with number of time steps MM to a fractional power of 0.60.6 in time t=[0,0.5]t=[0,0.5]. Indicated (n,l)(n,l) pairs are selected based on the minimum number of layers ll required to encode |u(𝜽0)|u(\boldsymbol{\theta}^{0})\rangle for n{3,4,5}n\in\{3,4,5\}.

Figure 5 shows that increasing the number of parameters nlnl does not improve the time-averaged trace error ϵtr\epsilon_{\mathrm{tr}}, but instead increases the number of function evaluations which scales as 𝒪(nl)\mathcal{O}(nl). The linear scaling suggests that the problem of vanishing gradients due to excessive parameterization, commonly known as barren plateaus [39], may be mitigated by short time-steps, such that the initial solution at each time step is closer to the optimal solution.

Refer to caption
Figure 5: (a) Time-averaged trace error ϵtr\epsilon_{\mathrm{tr}} is insensitive to over-parameterization, shown here for α=0.5\alpha=0.5 (dashed lines) and α=1\alpha=1 (continuous lines). Error bars denote standard deviation. (b) Number of function evaluations k=1MNevalk\sum_{k=1}^{M}N_{eval}^{k} scales linearly with number of parameters nlnl.

4.2 Time-fractional Burgers’ equation

The fractional Burgers’ equation [40, 41] has found applications in shallow water waves and waves in bubbly liquids [42]. We consider the following 1D time-fractional Burgers’ equation [43] as an extension to the time-fractional diffusion equation Eq. 1,

Dtαu(t,x)=νxxu(t,x)u(t,x)xu(t,x),0<α1,\displaystyle D_{t}^{\alpha}u(t,x)=\nu\partial_{xx}u(t,x)-u(t,x)\partial_{x}u(t,x),\quad 0<\alpha\leq 1, (27)

where DtαD_{t}^{\alpha} is the Caputo fractional derivative of the α\alpha-th order, as previously defined, and ν\nu is the fluid kinematic viscosity. Readers interested in quantum computing algorithms for non-fractional Burgers’ equation (α=1\alpha=1) are referred to [44, 45, 13].

4.2.1 Semi-implicit scheme

Using explicit source terms, we apply central difference on the non-linear advection term, such that

(1aδ)unk=wkun0j=1k1Δwjunkjb(un+1k1un1k1)unk1,\displaystyle\left(1-a\delta\right)u_{n}^{k}=w_{k}u_{n}^{0}-\sum_{j=1}^{k-1}\Delta w_{j}u_{n}^{k-j}-b\left(u_{n+1}^{k-1}-u_{n-1}^{k-1}\right)u_{n}^{k-1}, (28)

where a=ν/(gα,τh2)a=\nu/(g_{\alpha,\tau}h^{2}) and b=1/(2gα,τh)b=1/(2g_{\alpha,\tau}h). In Dirac notation, the time-fractional Burgers’ equation can be iterated as Eq. 9

A|u~k=|f~k1b(Λ~+k1Λ~k1)|u~k1,\displaystyle A|\tilde{u}^{k}\rangle=|\tilde{f}^{k-1}\rangle-b\left(\tilde{\Lambda}_{+}^{k-1}-\tilde{\Lambda}_{-}^{k-1}\right)|\tilde{u}^{k-1}\rangle, (29)

where Λ~:=diag(u)\tilde{\Lambda}:=\mathrm{diag}(u) is a diagonal matrix with uu along its diagonal, and the subscript ±\pm denotes either incremental or decremental shift in each eigenstate under periodic boundary conditions, i.e. |2n=|0|2^{n}\rangle=|0\rangle.

With that, the cost function for Burgers’ equation is

𝒞k(rk,𝜽k)=12[uk,f~k1b(uk,Λ~+k1u~k1uk,Λ~k1u~k1)]2uk|A|uk,\displaystyle\mathcal{C}^{k}(r^{k},\boldsymbol{\theta}^{k})=-\frac{1}{2}\frac{\left[\langle u^{k},\tilde{f}^{k-1}\rangle-b\left(\langle u^{k},\tilde{\Lambda}_{+}^{k-1}\tilde{u}^{k-1}\rangle-\langle u^{k},\tilde{\Lambda}_{-}^{k-1}\tilde{u}^{k-1}\rangle\right)\right]^{2}}{\langle u^{k}|A|u^{k}\rangle}, (30)

which includes two non-linear terms uk,Λ~±k1u~k1\langle u^{k},\tilde{\Lambda}_{\pm}^{k-1}\tilde{u}^{k-1}\rangle evaluated using redundant copies of k1k-1 quantum states [13, 14] on quantum circuit (Fig. 12c).

4.2.2 Test case

We test a 1D bi-directional flow using time-fractional Burgers’ equation Eq. 27 with initial condition u(0,x)=sin(2πx)u(0,x)=\sin(2\pi x) and Dirichlet boundary condition u(0,x)=x(1x)u(0,x)=x(1-x) and u(t,0)=u(t,1)=0u(t,0)=u(t,1)=0.

Fig. 6(a,c,e) show time series solutions in 32×3232\times 32 space-time domain of size (L,T)=(1,1)(L,T)=(1,1) with qubit-layer count (n,l)=(5,5)(n,l)=(5,5) for fractional order α={1,0.8,0.6}\alpha=\{1,0.8,0.6\} and kinematic viscosity ν=0.02\nu=0.02. The Reynolds number is Re2ucL/ν=100Re\equiv 2u_{c}L/\nu=100, where the characteristic velocity uc=1u_{c}=1. In the inviscid case, an initial sine-wave profile tends towards an N-wave shock solution. As with Fig. 3, reducing fractional order leads to fast decay at short times and slow convergence at long times [46], shown here for α{1,0.8,0.6}\alpha\in\{1,0.8,0.6\}. Insets show the relative deviations from classical finite difference solution are less than 2%, without any clear dependence on α\alpha.

For semi-implicit time-fractional Burgers’ equation, the Courant number Cucτα/hC\sim u_{c}\tau^{\alpha}/h depends on the fractional index α\alpha. To verify the dependence of numerical stability on tαt^{\alpha}, the number of time steps MM is quadrupled from 32 to 128 in the time series solutions Fig. 6(b,d,f). By inspection, time-fractional solutions are sensitive to time-step τ\tau. Specifically, for α=0.6\alpha=0.6, convergence in solution accuracy requires MNM\gg N (see Fig. 6f inset).

Refer to caption
Figure 6: Time-series solutions of 1D Burgers’ equation plotted in time intervals of 1/321/32 in (a,c,e) N×M=32×32N\times M=32\times 32 and (b,d,f) N×M=32×128N\times M=32\times 128 space-time domain of size (L,T)=(1,1)(L,T)=(1,1) for qubit-layer count (n,l)=(5,5)(n,l)=(5,5), kinematic viscosity ν=0.02\nu=0.02 (Re=100Re=100), and fractional order α\alpha (a,b) 1, (c,d) 0.8, and (e,f) 0.6. Insets (a,c,e) show time-averaged relative deviation from classical finite difference solution on the same domain and insets (b,d,f) show relative norm convergence with MM at times t{1/32,1/16}t\in\{1/32,1/16\}. Initial and boundary conditions are u(0,x)=sin(2πx)u(0,x)=\sin{(2\pi x)} and u(t,0)=u(t,1)=0u(t,0)=u(t,1)=0.

4.2.3 Trace error and optimization

Figure 7a shows for ν0.04\nu\gtrsim 0.04, the maximum trace error maxϵtr\max\epsilon_{\mathrm{tr}} for normal Burgers’ equation (α=1\alpha=1) is significantly greater than for the time-fractional Burgers’ equation (α<1\alpha<1), the latter which converges to steady state solutions faster (Fig. 6). Figure 7b shows the required number of function evaluations Neval\sum N_{\mathrm{eval}} scales with both ν\nu and α\alpha, due to the difficulty of convergence towards unstable solutions driven by the explicit advection term.

Together, these results suggest a trade-off between solution fidelity and gradient evaluation costs, depending on fractional index α\alpha and diffusion parameter ν\nu.

Refer to caption
Figure 7: α\alpha-ν\nu contour plots of (a) maximum trace error maxϵtr\max\epsilon_{\mathrm{tr}} and (b) number of function evaluations Neval\sum N_{\mathrm{eval}} for variational quantum solutions of 1D Burgers’ equation (same as Fig. 6).

4.3 Fractional diffusive epidemic model

A natural extension to the nonlinear differential equations involves exploring coupled systems of differential equations, as exemplified by the susceptible-exposed-infectious-recovered (SEIR) epidemic model [44]. Fractional-order epidemic models have garnered significant attention in the wake of the COVID-19 pandemic [47, 48, 49]. These models include spatio-temporal models that account for geographical spread of the disease [50, 51, 52]. A minimal representation of a fractional diffusive SEIR model is given by [53, Eq. (24)–(29)]:

Dtα1S\displaystyle D_{t}^{\alpha_{1}}S =ν1xxSβISμS+Π,\displaystyle=\nu_{1}\partial_{xx}S-\beta IS-\mu S+\Pi, (31)
Dtα2E\displaystyle D_{t}^{\alpha_{2}}E =ν2xxE+βIS(σ+μ)E,\displaystyle=\nu_{2}\partial_{xx}E+\beta IS-(\sigma+\mu)E, (32)
Dtα3I\displaystyle D_{t}^{\alpha_{3}}I =ν3xxI+σE(ρ+μ)I,\displaystyle=\nu_{3}\partial_{xx}I+\sigma E-(\rho+\mu)I, (33)
Dtα4R\displaystyle D_{t}^{\alpha_{4}}R =ν4xxR+ρIμR,\displaystyle=\nu_{4}\partial_{xx}R+\rho I-\mu R, (34)

which partitions a population into four distinct cohorts: susceptible individuals SS, exposed individuals EE, infectious individuals II, and those who have recovered RR, without accounting for vaccination and quarantine. The symbols αi\alpha_{i} and νi\nu_{i}, where i{1,2,3,4}i\in\{1,2,3,4\}, are the fractional order and the diffusion coefficient corresponding to each respective {S,E,I,R}\{S,E,I,R\} cohort in that order, Π\Pi is the population influx rate, β\beta is the infective rate, μ\mu is the death rate, σ\sigma is the progression rate and ρ\rho is the recovery rate.

4.3.1 Coupled semi-implicit scheme

The coupled system of Eqs. 31, 32, 33 and 34 is discretized via finite difference and expressed in the following iterative form with common time-step τ\tau,

(βIk1+μ+gα1,τν1h2δ)Sk\displaystyle\left(\beta I^{k-1}+\mu+g_{\alpha_{1},\tau}-\frac{\nu_{1}}{h^{2}}\delta\right)S^{k} =gα1,τfα1(S[0,k1])+Π,\displaystyle=g_{\alpha_{1},\tau}f_{\alpha_{1}}\left(S^{[0,k-1]}\right)+\Pi, (35)
(σ+μ+gα2,τν2h2δ)Ek\displaystyle\left(\sigma+\mu+g_{\alpha_{2},\tau}-\frac{\nu_{2}}{h^{2}}\delta\right)E^{k} =gα2,τfα2(E[0,k1])+βIk1Sk1,\displaystyle=g_{\alpha_{2},\tau}f_{\alpha_{2}}\left(E^{[0,k-1]}\right)+\beta I^{k-1}S^{k-1}, (36)
(ρ+μ+gα3,τν3h2δ)Ik\displaystyle\left(\rho+\mu+g_{\alpha_{3},\tau}-\frac{\nu_{3}}{h^{2}}\delta\right)I^{k} =gα3,τfα3(I[0,k1])+σEk1,\displaystyle=g_{\alpha_{3},\tau}f_{\alpha_{3}}\left(I^{[0,k-1]}\right)+\sigma E^{k-1}, (37)
(μ+gα4,τν4h2δ)Rk\displaystyle\left(\mu+g_{\alpha_{4},\tau}-\frac{\nu_{4}}{h^{2}}\delta\right)R^{k} =gα4,τfα4(R[0,k1])+ρIk1,\displaystyle=g_{\alpha_{4},\tau}f_{\alpha_{4}}\left(R^{[0,k-1]}\right)+\rho I^{k-1}, (38)

where the operator fα(u[0,k1])=wk[α]u0j=1k1Δwj[α]ukjf_{\alpha}\left(u^{[0,k-1]}\right)=w_{k}^{[\alpha]}u^{0}-\sum_{j=1}^{k-1}\Delta w_{j}^{[\alpha]}u^{k-j}. Since the βIS\beta IS term is strictly positive, it can be iterated as βIk1Sk\beta I^{k-1}S^{k} (Eq. 35). With only an 𝒪(1)\mathcal{O}(1) number of cohorts, the coupled system of equations can be solved using a separate cost function for each cohort at time kk, i.e.

𝒞Sk\displaystyle\mathcal{C}^{k}_{S} =(rSk)22(Sk|AS|Sk+βSk|Λ~Ik1|Sk)rSk(gα1,τSk,f~S,α1k1+ΠSk,+~n),\displaystyle=\frac{(r^{k}_{S})^{2}}{2}\left(\langle S^{k}|A_{S}|S^{k}\rangle+\beta\langle S^{k}|\tilde{\Lambda}^{k-1}_{I}|S^{k}\rangle\right)-r^{k}_{S}\left(g_{\alpha_{1},\tau}\langle S^{k},\tilde{f}_{S,\alpha_{1}}^{k-1}\rangle+\Pi\langle S^{k},\tilde{+}^{n}\rangle\right), (39)
𝒞Ek\displaystyle\mathcal{C}^{k}_{E} =(rEk)22Ek|AE|EkrEk(gα2,τEk,f~E,α2k1+βEk,Λ~Ik1S~k1),\displaystyle=\frac{(r^{k}_{E})^{2}}{2}\langle E^{k}|A_{E}|E^{k}\rangle-r^{k}_{E}\left(g_{\alpha_{2},\tau}\langle E^{k},\tilde{f}_{E,\alpha_{2}}^{k-1}\rangle+\beta\langle E^{k},\tilde{\Lambda}^{k-1}_{I}\tilde{S}^{k-1}\rangle\right), (40)
𝒞Ik\displaystyle\mathcal{C}^{k}_{I} =(rIk)22Ik|AI|IkrIk(gα3,τIk,f~I,α3k1+σIk,E~k1),\displaystyle=\frac{(r^{k}_{I})^{2}}{2}\langle I^{k}|A_{I}|I^{k}\rangle-r^{k}_{I}\left(g_{\alpha_{3},\tau}\langle I^{k},\tilde{f}_{I,\alpha_{3}}^{k-1}\rangle+\sigma\langle I^{k},\tilde{E}^{k-1}\rangle\right), (41)
𝒞Rk\displaystyle\mathcal{C}^{k}_{R} =(rRk)22Rk|AR|RkrRk(gα4,τRk,f~R,α4k1+ρRk,I~k1),\displaystyle=\frac{(r^{k}_{R})^{2}}{2}\langle R^{k}|A_{R}|R^{k}\rangle-r^{k}_{R}\left(g_{\alpha_{4},\tau}\langle R^{k},\tilde{f}_{R,\alpha_{4}}^{k-1}\rangle+\rho\langle R^{k},\tilde{I}^{k-1}\rangle\right), (42)

where |+~n2n|+n|\tilde{+}^{n}\rangle\equiv\sqrt{2^{n}}|+\rangle^{\otimes n} is the (unnormalized) equal superposition over all computational basis states, and each subscript label 𝕊{S,E,I,R}\mathbb{S}\in\{S,E,I,R\} corresponds to the indicated cohort. The Hamiltonian matrices N×N\in\mathbb{R}^{N\times N} are AS=(μ+gα1,τ)ν1/h2A_{S}=(\mu+g_{\alpha_{1},\tau})\mathcal{I}-\nu_{1}/h^{2}\mathcal{L}, AE=(σ+μ+gα2,τ)ν2/h2A_{E}=(\sigma+\mu+g_{\alpha_{2},\tau})\mathcal{I}-\nu_{2}/h^{2}\mathcal{L}, AI=(ρ+μ+gα3,τ)ν3/h2A_{I}=(\rho+\mu+g_{\alpha_{3},\tau})\mathcal{I}-\nu_{3}/h^{2}\mathcal{L} and AR=(μ+gα4,τ)ν4/h2A_{R}=(\mu+g_{\alpha_{4},\tau})\mathcal{I}-\nu_{4}/h^{2}\mathcal{L}, where \mathcal{L} is a symmetric tridiagonal matrix with 2-2 along its main diagonal and 11 along the adjacent off-diagonals, and =𝕀n\mathcal{I}=\mathbb{I}^{\otimes n} is an nn-qubit identity matrix. Terms such as S(𝜽k)|ΛIk1|S(𝜽k)\langle S(\boldsymbol{\theta}^{k})|\Lambda^{k-1}_{I}|S(\boldsymbol{\theta}^{k})\rangle can be measured using the circuit shown in Fig. 12d.

4.3.2 Basic reproduction number

The spread of a transmissible disease is governed by an important quantity known as the basic reproduction number [54],

=βσΠμ(μ+σ)(μ+ρ),\displaystyle\mathcal{R}=\frac{\beta\sigma\Pi}{\mu(\mu+\sigma)(\mu+\rho)}, (43)

which is defined, in epidemiological terms, as the average number of secondary cases produced by one infected individual in a susceptible population. Depending on the value of \mathcal{R}, the number of infectious individuals may increase resulting in an epidemic (>1\mathcal{R}>1), or decrease resulting in the disease dying out (<1\mathcal{R}<1).

4.3.3 Test case

Consider a set of 2n2^{n} spatially connected populations, each with a small infected cohort and a much larger susceptible cohort. Following [55], we assume the following set of SEIR parameters: Π=750\Pi=750 [53], μ=0.03325\mu=0.03325, β=5.1×106\beta=5.1\times 10^{-6}, σ=0.17\sigma=0.17, and ρ=0.1109\rho=0.1109, leading to 0.66\mathcal{R}\approx 0.66. Individuals are assumed to move around within a region [0,1][0,1] according to Fick’s law, with diffusion coefficents ν1=ν2=103\nu_{1}=\nu_{2}=10^{-3} and ν3=ν4=5×104\nu_{3}=\nu_{4}=5\times 10^{-4}. Initial cohort sizes are S(0,x)=22,500S(0,x)=22,500 (Π/μ\sim\Pi/\mu for near-steady populations [55]), I(0,x)=20e2xI(0,x)=20e^{-2x} (for spatial dependence [53]) and E(0,x)=R(0,x)=1E(0,x)=R(0,x)=1. Neumann boundary conditions are applied, i.e. x𝕊(t,0)=x𝕊(t,L)=0\partial_{x}\mathbb{S}(t,0)=\partial_{x}\mathbb{S}(t,L)=0, where 𝕊{S,E,I,R}\mathbb{S}\in\{S,E,I,R\}.

In a 16×3216\times 32 domain of size (L,T)=(1,100)(L,T)=(1,100) with (n,l)=(4,5)(n,l)=(4,5), Fig. 8 verifies that <1\mathcal{R}<1 results in a monotonic decrease (a,c,e) in the infectious cohort II, whereas >1\mathcal{R}>1 results in an increase (b,d,f) in II before eventual decrease at long times (not shown). A decrease in the fractional index α\alpha flattens the spatiotemporal profile of II, in such a way that II decreases more slowly for <1\mathcal{R}<1, and increases more slowly for >1\mathcal{R}>1.

Refer to caption
Figure 8: Infectious II cohort (actual values) in 16×3216\times 32 space-time domain of size (L,T)=(1,100)(L,T)=(1,100) with qubit-layer count (n,l)=(4,5)(n,l)=(4,5) for each cohort, depending on basic reproduction number (a,c,e) =0.66\mathcal{R}=0.66 and (b,d,f) =1.33\mathcal{R}=1.33, and fractional index (a,b) α=1\alpha=1, (c,d) α=0.8\alpha=0.8 and (e,f) α=0.6\alpha=0.6.

Similar time-fractional memory effects also apply to other cohorts, namely susceptible SS, exposed EE and recovered RR, as shown in Fig. 9 at the start of an epidemic (>1\mathcal{R}>1). The apparent smoothness of the solutions, as presented, affirms the potential of the iterative solver in other applications involving coupled fractional-order derivatives, such as predator-prey population models [56] and Oldroyd-B viscoelastic flows [2].

Refer to caption
Figure 9: (a,b) Susceptible SS, (c,d) exposed EE and (e,f) recovered RR cohorts (actual values) in 16×3216\times 32 space-time domain of size (L,T)=(1,100)(L,T)=(1,100) with qubit-layer count (n,l)=(4,5)(n,l)=(4,5) for each cohort at the start of an epidemic (=1.33>1\mathcal{R}=1.33>1). Fractional index (a,c,e) α=1\alpha=1 and (b,d,f) α=0.8\alpha=0.8.

5 Hardware noise

Near-term quantum devices are subjected to hardware noise which significantly impairs the performance of variational quantum algorithms [57, 58], despite their inherent resilience to coherent errors [59]. To explore the effect of noise, we employ a realistic noise model sampled from the IBM Nairobi quantum hardware device (Falcon r5.11H, version 1.3.3) applied to the Aer Simulator backend provided by the Pennylane-Qiskit plugin. Circuits are transpiled using default settings with level 3 optimization and SABRE routing. The optimizer of choice is the Simultaneous Perturbation Stochastic Approximation (SPSA), which is known for its exceptional scalability and performance under noisy conditions [57, 58]. We apply the SPSAOptimizer class on Pennylane using default hyperparameters for 200 iterations, equivalent to 400 circuit evaluations. Data readout is assumed to be noiseless via statevector emulation.

Here, we solve minimally for the sub-diffusion problem (Section 4.1) in N×M=4×2N\times M=4\times 2 using qubit-layer count (n,l)=(2,1)(n,l)=(2,1) for α=1\alpha=1. Initial conditions are u(0,x)=x(1x)u(0,x)=x(1-x) and boundary conditions are periodic instead of Dirichlet. Figure 10 shows the effects of hardware noise model on Aer Simulator based on 40 instances with fixed 10,000 shots per circuit evaluation. Of note here is the effect of noise on the evaluation of the norm, which directly affects the weights of the cost function 𝒞\mathcal{C} for the subsequent time step. For fair evaluation of each time-step, we restore the norm to the classical error-free value before each time-step.

Refer to caption
Figure 10: Hardware noise model tests across 40 instances on Aer Simulator using SPSA optimizer set at 200 iterations per time step. (a) Effect of noise model on overlap and Hamiltonian measurements results in shifting of (b) the optimized cost function 𝒞\mathcal{C}. (c) Box plots of norm fidelity φnorm\varphi_{\mathrm{norm}} and trace error ϵtr\epsilon_{\mathrm{tr}} with noise model in time steps k={1,2}k=\{1,2\}. Reference values without noise model are shown as φnorm1\varphi_{\mathrm{norm}}\approx 1 and ϵtr0\epsilon_{\mathrm{tr}}\approx 0. (d) Comparing |u(1)|u^{(1)}\rangle and |u(2)|u^{(2)}\rangle with noise model (box plots) to noiseless simulation (line circles). Inset shows hardware test results across 20 instances obtained from the IBMQ Mumbai 27 qubit device using Qiskit Runtime set at 200 SPSA iterations for a single time step.

Figure 10a shows that averaged overlap measurements are shifted by the noise model to u1,u0=0.686±0.049\langle u^{1},u^{0}\rangle=0.686\pm 0.049 and u2,u1=0.682±0.049\langle u^{2},u^{1}\rangle=0.682\pm 0.049, from approximately 11 for measurements without noise model. The observed relative noise error is approximately 30%30\%, which is significantly greater than the error from Hamiltonian measurements uk|A|uk\langle u^{k}|A|u^{k}\rangle with noise model (less than 10%10\% by inspection, Fig. 10b). This can be attributed to greater gate errors from the Toffoli (controlled cnot) gates found in controlled entangling layers of the overlap circuit. In addition, the fractional noise error of the cost function Eq. 15

(ηC)2=(2ηO)2+(ηH)2\displaystyle\left(\eta_{C}\right)^{2}=\left(2\eta_{O}\right)^{2}+\left(\eta_{H}\right)^{2} (44)

depends on ηO\eta_{O}, the fractional noise error of the overlap measurements uk,uk1\langle u^{k},u^{k-1}\rangle, and ηH\eta_{H}, the fractional noise error of the Hamiltonian measurements uk|A|uk\langle u^{k}|A|u^{k}\rangle. Given ηO/ηH3\eta_{O}/\eta_{H}\approx 3, the proportion of noise error of the cost function due to the noise of overlap measurement is 36/370.986\sqrt{36/37}\approx 0.986. This means that the overall performance of the algorithm depends almost entirely on the noise error of overlap measurements, and very little on that of Hamiltonian measurements.

Figure 10c shows the norm fidelity

φnormk=|rkuk|,\displaystyle\varphi_{\mathrm{norm}}^{k}=\left|\frac{r^{k}}{\|u^{k}\|}\right|, (45)

where rkr^{k} is the measured norm Eq. 14 and uk\|u^{k}\| is the classical norm, and trace error ϵtrk\epsilon_{\mathrm{tr}}^{k} Eq. 26 at time step k{1,2}k\in\{1,2\}. Here, the mean norm fidelities φ¯normk0.65\overline{\varphi}_{\mathrm{norm}}^{k}\approx 0.65 are nearly identical for k{1,2}k\in\{1,2\} due to the classical norm reset, whereas the mean trace errors are ϵ¯tr10.039\overline{\epsilon}_{\mathrm{tr}}^{1}\approx 0.039 and ϵ¯tr20.052\overline{\epsilon}_{\mathrm{tr}}^{2}\approx 0.052.

Figure 10d shows the effects of hardware noise on the quantum solution states |uk|u^{k}\rangle over 40 instances. Although the degree of data scatter at each node (width of box plot) is of a similar magnitude to the difference between consecutive classical solutions, the mean readout states |u¯k|\overline{u}^{k}\rangle are in general agreement with the respective classical solutions. Further tests were conducted on actual hardware, in this case, the IBMQ Mumbai 27 qubit device across 20 instances (see inset) using Qiskit Runtime sampler and estimator primitives for overlap and Hamiltonian measurements respectively, set at 200 SPSA iterations for a single time step.

6 Discussion

In this study, we proposed and implemented a hybrid variational quantum algorithm for solving time-fractional diffusive differential equations in engineering applications, including non-linear equations such as Burgers’ equation (Section 4.2) and coupled systems of equations such as those in epidemic models (Section 4.3). Our approach is not only efficient in time complexity, but also offers advantages in terms of memory utilization. While the classical memory cost of numerically solving these equations scales linearly with the number of spatial grid points NN, the quantum memory cost scales only logarithmically with NN. This helps to mitigate the global dependence problem in fractional calculus, where previous solutions must be repeatedly accessed from memory causing the classical solver to have prohibitive memory costs when the spatial range is large. In terms of time complexity, the present iterative scheme is limited by the quadratic scaling with the number of time steps; this has some implications in the numerical stability of non-linear fractional equations (see Fig. 6).

The choice of the ansatz in the form of a parameterized circuit is reflected in its expressibility and entangling capability performance [60] of a variational quantum algorithm [9]. Hence, as a matter of heuristics, the real-amplitude ansatze used in this study (Eqs. 19 and 20) are by no means the most efficient designs for such applications. Designing and optimizing ansatz architecture, including utilizing adaptive methods [61] or leveraging geometric tools [62, 63, 64], remains an active area of research [65, 66, 67].

While the hybrid approach offers notable advantages, it is not exempt from the challenges that are commonly encountered in variational quantum algorithms. First, unlike a classical computer, the cost of loading initial conditions as classical data as an n-qubit quantum state could be prohibitive [68]. Encoding schemes, such as parametric optimization (Eq. 21), may incur an exponential cost in primitive operations since the encoded n-qubit state occupies a space of dimension O(2n)O(2^{n}). More efficient encoding techniques are currently being developed; for example, solutions may be represented in the form of finite Fourier series, using the quantum Fourier transform as part of the Fourier series loader introduced by [69] and employed by [14]. The use of the Walsh series instead of the Fourier series may yield an even more efficient sub-exponential scaling in encoding [70]. In addition, extracting the complete solution at each of the MM time steps would require full readout of the statevector via quantum state tomography. This experimental procedure is notorious for its exponential cost [71], which is a bottleneck to quantum advantage as pointed out by [68]. Therefore, where possible, applications should consider a partial readout of the (spatial) solutions only at few selected time points of interest to minimize the expensive overhead due to tomography, or measuring only integrated quantities like mean, variance or other moments. In these cases, robust classical shadow tomography techniques [72, 73, 74, 75, 76] can be employed to further reduce the required sample complexity.

In closing, the hybrid algorithm investigated in this work presents a nascent but promising pathway to solving fractional partial differential equations of the integro-differential form, subjected to potentially prohibitive space or memory requirements. More work needs to be done to address issues related to the trainability of variational quantum algorithms, such as barren plateaus and narrow gorges [39, 77], as well as practical hardware implementation, including error mitigation [78] and correction.

Appendix A Quantum circuit diagrams

In this appendix, we give explicit circuit diagrams for some of the circuits we used in this paper. Real-amplitude hardware-efficient ansaetze are shown in Fig. 11. Circuits used for measuring expectations and overlaps are shown in Fig. 12.

\Qcircuit@C=0.4em@R=.4em&layer 1layer 2layer l
\lstick|0\qw\gateRY(θ1,1)\ctrl1\qw\qw\qw\qw\qw\qw\gateRY(θ2,1)\ctrl1\qw\qw\qw\qw\qw\qw\gateRY(θl,1)\ctrl1\qw\qw\qw\qw\qw\qw\lstick|0\qw\gateRY(θ1,2)\targ\ctrl1\qw\qw\qw\qw\qw\gateRY(θ2,2)\targ\ctrl1\qw\qw\qw\qw\qw\gateRY(θl,2)\targ\ctrl1\qw\qw\qw\qw\qw\lstick|0\qw\gateRY(θ1,3)\qw\targ\ctrl1\qw\qw\qw\qw\gateRY(θ2,3)\qw\targ\ctrl1\qw\qw\qw\qw\gateRY(θl,3)\qw\targ\ctrl1\qw\qw\qw\qw\targ\qw\targ\qw\targ\qw\lstick\ctrl1\qw\ctrl1\qw\ctrl1\qw\lstick|0\qw\gateRY(θ1,n)\qw\qw\qw\qw\targ\qw\qw\gateRY(θ2,n)\qw\qw\qw\qw\targ\qw\qw\gateRY(θl,n)\qw\qw\qw\qw\targ\qw\qw\gategroup33148.6em
.\gategroup3111416.6em.\gategroup3251430.6em
.
\Qcircuit@C=0.4em@R=.4em{&\mbox{layer 1}\mbox{layer 2}\mbox{layer $l$}\\ ~{}\\ \lstick{|0\rangle}\qw\gate{R_{Y}(\theta_{1,1})}\ctrl{1}\qw\qw\qw\qw\qw\qw\gate{R_{Y}(\theta_{2,1})}\ctrl{1}\qw\qw\qw\qw\qw\qw\ldots\gate{R_{Y}(\theta_{l,1})}\ctrl{1}\qw\qw\qw\qw\qw\qw\\ \lstick{|0\rangle}\qw\gate{R_{Y}(\theta_{1,2})}\targ\ctrl{1}\qw\qw\qw\qw\qw\gate{R_{Y}(\theta_{2,2})}\targ\ctrl{1}\qw\qw\qw\qw\qw\ldots\gate{R_{Y}(\theta_{l,2})}\targ\ctrl{1}\qw\qw\qw\qw\qw\\ \lstick{|0\rangle}\qw\gate{R_{Y}(\theta_{1,3})}\qw\targ\ctrl{1}\qw\qw\qw\qw\gate{R_{Y}(\theta_{2,3})}\qw\targ\ctrl{1}\qw\qw\qw\qw\ldots\gate{R_{Y}(\theta_{l,3})}\qw\targ\ctrl{1}\qw\qw\qw\qw\\ \targ\qw\targ\qw\targ\qw\\ ~{}\\ ~{}\\ \lstick{\vdots}\vdots\ddots\ddots\vdots\ddots\\ ~{}\\ ~{}\\ ~{}\\ \ctrl{1}\qw\ctrl{1}\qw\ctrl{1}\qw\\ \lstick{|0\rangle}\qw\gate{R_{Y}(\theta_{1,n})}\qw\qw\qw\qw\targ\qw\qw\gate{R_{Y}(\theta_{2,n})}\qw\qw\qw\qw\targ\qw\qw\ldots\gate{R_{Y}(\theta_{l,n})}\qw\qw\qw\qw\targ\qw\qw\gategroup{3}{3}{14}{8}{.6em}{.}\gategroup{3}{11}{14}{16}{.6em}{.}\gategroup{3}{25}{14}{30}{.6em}{.}}

(a)
\Qcircuit@C=0.4em@R=.4em&layer 1layer 2layer l
\lstick|0\qw\gateRY(θ1,1)\ctrl1\qw\qw\qw\qw\qw\targ\qw\qw\gateRY(θ2,1)\ctrl1\qw\qw\qw\qw\qw\targ\qw\qw\gateRY(θl,1)\ctrl1\qw\qw\qw\qw\qw\targ\qw\qw\lstick|0\qw\gateRY(θ1,2)\targ\ctrl1\qw\qw\qw\qw\qw\qw\qw\gateRY(θ2,2)\targ\ctrl1\qw\qw\qw\qw\qw\qw\qw\gateRY(θl,2)\targ\ctrl1\qw\qw\qw\qw\qw\qw\qw\lstick|0\qw\gateRY(θ1,3)\qw\targ\ctrl1\qw\qw\qw\qw\qw\qw\gateRY(θ2,3)\qw\targ\ctrl1\qw\qw\qw\qw\qw\qw\gateRY(θl,3)\qw\targ\ctrl1\qw\qw\qw\qw\qw\qw\targ\qw\targ\qw\targ\qw\lstick\ctrl1\qw\ctrl1\qw\ctrl1\qw\lstick|0\qw\gateRY(θ1,n)\qw\qw\qw\qw\targ\qw\ctrl
11\qw\qw\gateRY(θ2,n)\qw\qw\qw\qw\targ\qw\ctrl11\qw\qw\gateRY(θl,n)\qw\qw\qw\qw\targ\qw\ctrl11\qw\qw\gategroup331410.6em
.\gategroup3131420.6em.\gategroup3291436.6em
.
\Qcircuit@C=0.4em@R=.4em{&\mbox{layer 1}\mbox{layer 2}\mbox{layer $l$}\\ ~{}\\ \lstick{|0\rangle}\qw\gate{R_{Y}(\theta_{1,1})}\ctrl{1}\qw\qw\qw\qw\qw\targ\qw\qw\gate{R_{Y}(\theta_{2,1})}\ctrl{1}\qw\qw\qw\qw\qw\targ\qw\qw\ldots\gate{R_{Y}(\theta_{l,1})}\ctrl{1}\qw\qw\qw\qw\qw\targ\qw\qw\\ \lstick{|0\rangle}\qw\gate{R_{Y}(\theta_{1,2})}\targ\ctrl{1}\qw\qw\qw\qw\qw\qw\qw\gate{R_{Y}(\theta_{2,2})}\targ\ctrl{1}\qw\qw\qw\qw\qw\qw\qw\ldots\gate{R_{Y}(\theta_{l,2})}\targ\ctrl{1}\qw\qw\qw\qw\qw\qw\qw\\ \lstick{|0\rangle}\qw\gate{R_{Y}(\theta_{1,3})}\qw\targ\ctrl{1}\qw\qw\qw\qw\qw\qw\gate{R_{Y}(\theta_{2,3})}\qw\targ\ctrl{1}\qw\qw\qw\qw\qw\qw\ldots\gate{R_{Y}(\theta_{l,3})}\qw\targ\ctrl{1}\qw\qw\qw\qw\qw\qw\\ \targ\qw\targ\qw\targ\qw\\ ~{}\\ ~{}\\ \lstick{\vdots}\vdots\ddots\ddots\vdots\ddots\\ ~{}\\ ~{}\\ ~{}\\ \ctrl{1}\qw\ctrl{1}\qw\ctrl{1}\qw\\ \lstick{|0\rangle}\qw\gate{R_{Y}(\theta_{1,n})}\qw\qw\qw\qw\targ\qw\ctrl{-11}\qw\qw\gate{R_{Y}(\theta_{2,n})}\qw\qw\qw\qw\targ\qw\ctrl{-11}\qw\qw\ldots\gate{R_{Y}(\theta_{l,n})}\qw\qw\qw\qw\targ\qw\ctrl{-11}\qw\qw\gategroup{3}{3}{14}{10}{.6em}{.}\gategroup{3}{13}{14}{20}{.6em}{.}\gategroup{3}{29}{14}{36}{.6em}{.}}
(b)
Figure 11: (a) Real-amplitude hardware-efficient ansatz (Eq. 19) and (b) circular real-amplitude ansatz (Eq. 20).
\Qcircuit@C=0.3em@R=0.05em@!\lstick|0&\gateH\ctrlo1\ctrl1\gateH\meter\qw\lstick|0n\qw\gateU(𝜽k)\gateUj\qw\qw\qw\Qcircuit@C=0.3em@R=0.05em@!{\lstick{|0\rangle}&\gate{H}\ctrlo{1}\ctrl{1}\gate{H}\meter\qw\\ \lstick{|0\rangle^{\otimes n}}\qw\gate{U(\boldsymbol{\theta}^{k})}\gate{U^{j}}\qw\qw\qw}
(a)
\Qcircuit@C=1.4em@R=0.5em&\lstick|0n\qw\gateU(𝜽k)\qw\gate/𝒮\qw\meter\qw\Qcircuit@C=1.4em@R=0.5em{&\mathcal{H}\\ \lstick{|0\rangle^{\otimes n}}\qw\gate{U(\boldsymbol{\theta}^{k})}\qw\gate{\mathcal{I}/\mathcal{S}}\qw\meter\qw}
(b)
\Qcircuit@C=0.3em@R=0.05em@!\lstick|0&\gateH\ctrlo1\ctrl2\ctrl1\ctrl1\gateH\meter\qw\lstick|0n\qw\gateU(𝜽k)\qw\gateUk1\ctrl1\qw\qw\qw\lstick|0n\qw\qw\gateUk1\gate𝒮/𝒮\targ\qw\qw\qw\Qcircuit@C=0.3em@R=0.05em@!{\lstick{|0\rangle}&\gate{H}\ctrlo{1}\ctrl{2}\ctrl{1}\ctrl{1}\gate{H}\meter\qw\\ \lstick{|0\rangle^{\otimes n}}\qw\gate{U(\boldsymbol{\theta}^{k})}\qw\gate{U^{k-1}}\ctrl{1}\qw\qw\qw\\ \lstick{|0\rangle^{\otimes n}}\qw\qw\gate{U^{k-1}}\gate{\mathcal{S}/\mathcal{S}^{\dagger}}\targ\qw\qw\qw\\ }
(c)
\Qcircuit@C=0.3em@R=0.05em@!\lstick|0&\gateH\ctrl2\ctrl1\gateH\meter\qw\lstick|0n\gateS(𝜽k)\qw\ctrl1\qw\qw\qw\lstick|0n\qw\gateIk1\targ\qw\qw\qw\Qcircuit@C=0.3em@R=0.05em@!{\lstick{|0\rangle}&\gate{H}\ctrl{2}\ctrl{1}\gate{H}\meter\qw\\ \lstick{|0\rangle^{\otimes n}}\gate{S(\boldsymbol{\theta}^{k})}\qw\ctrl{1}\qw\qw\qw\\ \lstick{|0\rangle^{\otimes n}}\qw\gate{I^{k-1}}\targ\qw\qw\qw\\ }
(d)
\Qcircuit@C=1.4em@R=0.6em\lstick|0&\gateH\ctrlo3\ctrl3\gateH\meter\qw\lstick|0n\qw\gateU(𝜽k)\gateUk1\gate/𝒮\meter\qw\Qcircuit@C=1.4em@R=0.6em{\lstick{|0\rangle}&\gate{H}\ctrlo{3}\ctrl{3}\gate{H}\meter\qw\\ \\ \mathcal{H}\\ \lstick{|0\rangle^{\otimes n}}\qw\gate{U(\boldsymbol{\theta}^{k})}\gate{U^{k-1}}\gate{\mathcal{I}/\mathcal{S}}\meter\qw}

(e)
Figure 12: Circuits for measuring (a) overlap u(𝜽k),uj\langle u(\boldsymbol{\theta}^{k}),u^{j}\rangle and (b) expectation U(𝜽k)|A|U(𝜽k)\langle U(\boldsymbol{\theta}^{k})|A|U(\boldsymbol{\theta}^{k})\rangle (Eq. 15), (c) nonlinear overlap uk,Λ±k1uk1\langle u^{k},\Lambda_{\pm}^{k-1}u^{k-1}\rangle (Eq. 30), (d) expectation S(𝜽k)|ΛIk1|S(𝜽k)\langle S(\boldsymbol{\theta}^{k})|\Lambda^{k-1}_{I}|S(\boldsymbol{\theta}^{k})\rangle (Eq. 39) and (e) higher-order overlap uk,Buk1\langle u^{k},Bu^{k-1}\rangle (Eq. 49). U(𝜽k)U(\boldsymbol{\theta}^{k}) denotes an ansatz with parameters 𝜽\boldsymbol{\theta} optimized at time kk and UjU^{j} denotes an ansatz with parameters fixed at time jj. /𝒮\mathcal{I}/\mathcal{S} denotes an optional shift operator (Eq. 18) and 𝒮/𝒮\mathcal{S}/\mathcal{S}^{\dagger} denotes either incremental or decremental shift operator. Operators SS and II are the ansaetze representing the respective variables.

Appendix B Higher-order Crank-Nicolson scheme

The quadratic scaling of quantum complexity in time steps Eq. (25) motivates higher-order time-stepping methods in order to limit time discretization and its errors. The Crank-Nicolson method is a second-order finite-difference scheme that retains the stability advantage associated with implicit methods [79]. Using the trapezoidal rule, the finite difference of the spatial derivative Eq. (5) takes the midpoint between forward and backward Euler schemes, yielding

xxu(tk,xn)12h2[(un+1k2unk+un1k)+(un+1k12unk1+un1k1)].\displaystyle\partial_{xx}u(t_{k},x_{n})\simeq\frac{1}{2h^{2}}\left[\left(u_{n+1}^{k}-2u_{n}^{k}+u_{n-1}^{k}\right)+\left(u_{n+1}^{k-1}-2u_{n}^{k-1}+u_{n-1}^{k-1}\right)\right]. (46)

Equating to the finite difference of the Caputo derivative, we obtain

(1a2δ)unk=a2δunk1+wkun0j=1k1Δwjunkj,\displaystyle\left(1-\frac{a}{2}\delta\right)u_{n}^{k}=\frac{a}{2}\delta u_{n}^{k-1}+w_{k}u_{n}^{0}-\sum_{j=1}^{k-1}\Delta w_{j}u_{n}^{k-j}, (47)

or in matrix form,

A𝐮k=B𝐮k1+wk𝐮0j=1k1Δwj𝐮kj,\displaystyle A\mathbf{u}^{k}=B\mathbf{u}^{k-1}+w_{k}\mathbf{u}^{0}-\sum_{j=1}^{k-1}\Delta w_{j}\mathbf{u}^{k-j}, (48)

where A=𝕀BN×NA=\mathbb{I}-B\in\mathbb{R}^{N\times N}, B=(a/2)N×NB=(a/2)\mathcal{L}\in\mathbb{R}^{N\times N}, \mathcal{L} is a symmetric tridiagonal matrix with 2-2 along its main diagonal and 11 along the adjacent off-diagonals, and 𝕀\mathbb{I} is the identity matrix. This can be iterated using variational quantum optimization Eq. 9 as before, with an updated cost function

𝒞k=12(rk1uk,Buk1+uk,f~k1)2uk|A|uk,\displaystyle\mathcal{C}^{k}=-\frac{1}{2}\frac{\left(r^{k-1}\langle u^{k},Bu^{k-1}\rangle+\langle u^{k},\tilde{f}^{k-1}\rangle\right)^{2}}{\langle u^{k}|A|u^{k}\rangle}, (49)

which includes a new term uk,Buk1\langle u^{k},Bu^{k-1}\rangle to be measured as a sum of observables (242-4, Eq. (17)), using the quantum circuit (Fig. 12e).

Appendix C Truncated Caputo integral

Since the coefficient Δwj\Delta w_{j} of the (kj)(k-j)-th term decreases monotonically with jj for constant fractional power index α\alpha, the 𝒪(M2)\mathcal{O}(M^{2}) time complexity scaling Eq. (25) can be limited to 𝒪(M)\mathcal{O}(M) by setting an upper bound to the limits of the Caputo integral. This is done by replacing the Caputo finite difference derivative in Eq. (4) with

Dtαu(tk,xn)gα,τ[w1unk+j=1min{k,ξ}(wj+1wj)unkj],\displaystyle D_{t}^{\alpha}u(t_{k},x_{n})\simeq g_{\alpha,\tau}\left[w_{1}u_{n}^{k}+\sum_{j=1}^{\min\{k,\xi\}}\left(w_{j+1}-w_{j}\right)u_{n}^{k-j}\right], (50)

where ξ[1,M]\xi\in[1,M] and wk+1=0w_{k+1}=0. For ξ<k\xi<k, the truncation error thus incurred is

εtr(α,ξ)𝒪[gα,τ(Δwξ+1)rk(ξ+1)],\displaystyle\varepsilon_{\operatorname{tr}}(\alpha,\xi)\sim\mathcal{O}\left[g_{\alpha,\tau}(\Delta w_{\xi+1})r^{k-(\xi+1)}\right], (51)

where Δwξ+1=wξ+2wξ+1\Delta w_{\xi+1}=w_{\xi+2}-w_{\xi+1}. A similar trade-off between solution fidelity and time complexity applies to classical finite difference schemes.

Acknowledgements

We acknowledge the use of IBM Quantum services for this work. The views expressed are those of the authors, and do not reflect the official policy or position of IBM or the IBM Quantum team. This research is supported by the National Research Foundation, Singapore and the Agency for Science, Technology and Research (A*STAR) under the Quantum Engineering Programme (NRF2021-QEP2-02-P03), and A*STAR C230917003. This project is supported by the Singapore Ministry of Health’s National Medical Research Council through the Programme for Research in Epidemic Preparedness and Response (PREPARE), under Environmental Transmission & Mitigation Co-operative (PREPARE-CS1-2022-004). DEK acknowledges funding support from the A*STAR Central Research Fund (CRF) Award for Use-Inspired Basic Research. DP acknowledges support from the Ministry of Education Singapore, under the grant MOE-T2EP50120-0019.

Author Declarations

The authors have no conflicts to disclose.

Data Availability

The data that support the findings of this study are available from the corresponding author upon reasonable request.

References

  • [1] Taohua Liu and Muzhou Hou. A Fast Implicit Finite Difference Method for Fractional Advection-Dispersion Equations with Fractional Derivative Boundary Conditions. Advances in Mathematical Physics, 2017(4):1–8, 2017.
  • [2] Fang Wang and Yu Wang. A Finite Difference Method for Solving Unsteady Fractional Oldroyd-B Viscoelastic Flow Based on Caputo Derivative. Advances in Mathematical Physics, 2023:1–22, apr 2023.
  • [3] Olaniyi Samuel Iyiola and FD Zaman. A fractional diffusion equation model for cancer tumor. AIP Advances, 4(10), 2014.
  • [4] V.E. Lynch, B.A. Carreras, D. Del-Castillo-Negrete, K.M. Ferreira-Mejias, and H.R. Hicks. Numerical methods for the solution of partial differential equations of fractional order. Journal of Computational Physics, 192(2):406–421, dec 2003.
  • [5] Changpin Li and Fanhai Zeng. The Finite Difference Methods for Fractional Ordinary Differential Equations. Numerical Functional Analysis and Optimization, 34(2):149–179, feb 2013.
  • [6] Diego A. Murio. Implicit finite difference approximation for time fractional diffusion equations. Computers and Mathematics with Applications, 56(4):1138–1145, 2008.
  • [7] Yumin Lin and Chuanju Xu. Finite difference/spectral approximations for the time-fractional diffusion equation. Journal of Computational Physics, 225(2):1533–1552, aug 2007.
  • [8] Kishor Bharti, Alba Cervera-Lierta, Thi Ha Kyaw, Tobias Haug, Sumner Alperin-Lea, Abhinav Anand, Matthias Degroote, Hermanni Heimonen, Jakob S. Kottmann, Tim Menke, Wai-Keong Mok, Sukin Sim, Leong-Chuan Kwek, and Alán Aspuru-Guzik. Noisy intermediate-scale quantum algorithms. Reviews of Modern Physics, 94(1):015004, feb 2022.
  • [9] M. Cerezo, Andrew Arrasmith, Ryan Babbush, Simon C. Benjamin, Suguru Endo, Keisuke Fujii, Jarrod R. McClean, Kosuke Mitarai, Xiao Yuan, Lukasz Cincio, and Patrick J. Coles. Variational quantum algorithms. Nature Reviews Physics, 3(9):625–644, Sep 2021.
  • [10] Hui-Min Li, Zhi-Xi Wang, and Shao-Ming Fei. Variational quantum algorithms for Poisson equations based on the decomposition of sparse Hamiltonians. Physical Review A, 108(3):032418, 2023.
  • [11] Yuki Sato, Ruho Kondo, Satoshi Koide, Hideki Takamatsu, and Nobuyuki Imoto. Variational quantum algorithm based on the minimum potential energy for solving the Poisson equation. Physical Review A, 104(5):052409, 2021.
  • [12] Mazen Ali and Matthias Kabel. Performance study of variational quantum algorithms for solving the Poisson equation on a quantum computer. Phys. Rev. Appl., 20:014054, Jul 2023.
  • [13] Michael Lubasch, Jaewoo Joo, Pierre Moinier, Martin Kiffner, and Dieter Jaksch. Variational quantum algorithms for nonlinear problems. Physical Review A, 101(1):010301, jan 2020.
  • [14] Abhijat Sarma, Thomas W Watts, Mudassir Moosa, Yilian Liu, and Peter L McMahon. Quantum variational solving of nonlinear and multi-dimensional partial differential equations. arXiv preprint arXiv:2311.01531, 2023.
  • [15] Wei-Bin Ewe, Dax Enshan Koh, Siong Thye Goh, Hong-Son Chu, and Ching Eng Png. Variational quantum-based simulation of waveguide modes. IEEE Transactions on Microwave Theory and Techniques, 70(5):2517–2525, 2022.
  • [16] Fong Yew Leong, Dax Enshan Koh, Wei-Bin Ewe, and Jian Feng Kong. Variational quantum simulation of partial differential equations: applications in colloidal transport. International Journal of Numerical Methods for Heat & Fluid Flow, 33(11):3669–3690, July 2023.
  • [17] Dieter Jaksch, Peyman Givi, Andrew J Daley, and Thomas Rung. Variational quantum algorithms for computational fluid dynamics. AIAA journal, 61(5):1885–1894, 2023.
  • [18] Pete Rigas. Variational quantum algorithm for measurement extraction from the Navier-Stokes, Einstein, Maxwell, Boussniesq-type, Lin-Tsien, Camassa-Holm, Drinfeld-Sokolov-Wilson, and Hunter-Saxton equations. arXiv preprint arXiv:2209.07714, 2022.
  • [19] Fong Yew Leong, Wei-Bin Ewe, and Dax Enshan Koh. Variational quantum evolution equation solver. Scientific reports, 12(1):10817, jun 2022.
  • [20] Kenji Kubo, Koichi Miyamoto, Kosuke Mitarai, and Keisuke Fujii. Pricing multi-asset derivatives by variational quantum algorithms. arXiv preprint arXiv:2207.01277, 2022.
  • [21] Francesco Mainardi, Gianni Pagnini, and Rudolf Gorenflo. Some aspects of fractional diffusion equations of single and distributed order. Applied Mathematics and Computation, 187(1):295–305, 2007.
  • [22] Sadeq Taha Abdulazeez and Mahmut Modanli. Solutions of fractional order pseudo-hyperbolic telegraph partial differential equations using finite difference method. Alexandria Engineering Journal, 61(12):12443–12451, 2022.
  • [23] Alternatively, |f~k1|\tilde{f}^{k-1}\rangle can be prepared separately through post-selection of linear combination of unitaries [80] using a quantum multiplexer, to be measured directly as one single overlap term uk|f~k1\langle u^{k}|\tilde{f}^{k-1}\rangle.
  • [24] Dmitri Maslov. Advantages of using relative-phase Toffoli gates with an application to multiple control Toffoli optimization. Physical Review A, 93(2):022311, feb 2016.
  • [25] Hedayat Alghassi, Amol Deshmukh, Noelle Ibrahim, Nicolas Robles, Stefan Woerner, and Christa Zoufal. A variational quantum algorithm for the Feynman-Kac formula. Quantum, 6:730, June 2022.
  • [26] For example, in decreasing index order, we have i=31Ai=A3A2A1\prod_{i=3}^{1}{A_{i}=A_{3}A_{2}A_{1}}.
  • [27] Gilles Brassard, Peter Hoyer, Michele Mosca, and Alain Tapp. Quantum amplitude amplification and estimation. Contemporary Mathematics, 305:53–74, 2002.
  • [28] Yohichi Suzuki, Shumpei Uno, Rudy Raymond, Tomoki Tanaka, Tamiya Onodera, and Naoki Yamamoto. Amplitude estimation without phase estimation. Quantum Information Processing, 19(2), January 2020.
  • [29] Scott Aaronson and Patrick Rall. Quantum approximate counting, simplified. In Symposium on simplicity in algorithms, pages 24–32. SIAM, 2020.
  • [30] Tudor Giurgica-Tiron, Iordanis Kerenidis, Farrokh Labib, Anupam Prakash, and William Zeng. Low depth algorithms for quantum amplitude estimation. Quantum, 6:745, June 2022.
  • [31] Dax Enshan Koh, Guoming Wang, Peter D. Johnson, and Yudong Cao. Foundations for Bayesian inference with engineered likelihood functions for robust amplitude estimation. Journal of Mathematical Physics, 63(5):052202, 05 2022.
  • [32] Guoming Wang, Dax Enshan Koh, Peter D Johnson, and Yudong Cao. Minimizing estimation runtime on noisy quantum computers. PRX Quantum, 2(1):010346, 2021.
  • [33] Peter D Johnson, Alexander A Kunitsa, Jérôme F Gonthier, Maxwell D Radin, Corneliu Buda, Eric J Doskocil, Clena M Abuan, and Jhonathan Romero. Reducing the cost of energy estimation in the variational quantum eigensolver algorithm with robust amplitude estimation. arXiv preprint arXiv:2203.07275, 2022.
  • [34] James C Spall. Multivariate stochastic approximation using a simultaneous perturbation gradient approximation. IEEE transactions on automatic control, 37(3):332–341, 1992.
  • [35] Yuki Sato, Ruho Kondo, Ikko Hamamura, Tamiya Onodera, and Naoki Yamamoto. Hamiltonian simulation for time-evolving partial differential equation by scalable quantum circuits. arXiv preprint arXiv:2402.18398, 2024.
  • [36] Junpeng Hu, Shi Jin, Nana Liu, and Lei Zhang. Quantum Circuits for partial differential equations via Schrödingerisation. arXiv preprint arXiv:2403.10032, 2024.
  • [37] Ville Bergholm, Josh Izaac, Maria Schuld, Christian Gogolin, M Sohaib Alam, Shahnawaz Ahmed, Juan Miguel Arrazola, Carsten Blank, Alain Delgado, Soran Jahangiri, et al. Pennylane: Automatic differentiation of hybrid quantum-classical computations. arXiv preprint arXiv:1811.04968, 2018.
  • [38] Zixuan Hu and Sabre Kais. The unitary dependence theory for characterizing quantum circuits and states. Communications Physics, 6(1), 2023.
  • [39] M. Cerezo, Akira Sone, Tyler Volkoff, Lukasz Cincio, and Patrick J. Coles. Cost function dependent barren plateaus in shallow parametrized quantum circuits. Nature Communications, 12(1), dec 2021.
  • [40] Yufeng Xu and Om P. Agrawal. Numerical solutions and analysis of diffusion for new generalized fractional Burgers equation. Fractional Calculus and Applied Analysis, 16(3):709–736, sep 2013.
  • [41] N. Sugimoto. Burgers equation with a fractional derivative; hereditary effects on nonlinear acoustic waves. Journal of Fluid Mechanics, 225:631–653, apr 1991.
  • [42] Roberto Garra. Fractional-calculus model for temperature and pressure waves in fluid-saturated porous rocks. Physical Review E, 84(3):036605, sep 2011.
  • [43] Vijitha Mukundan and Ashish Awasthi. Linearized Implicit Numerical Method for Burgers’ Equation. Nonlinear Engineering, 5(4):219–234, jan 2016.
  • [44] Jin Peng Liu, Herman Øie Kolden, Hari K. Krovi, Nuno F. Loureiro, Konstantina Trivisa, and Andrew M. Childs. Efficient quantum algorithm for dissipative nonlinear differential equations. Proceedings of the National Academy of Sciences of the United States of America, 118(35), aug 2021.
  • [45] Furkan Oz, Rohit K. S. S. Vuppala, Kursat Kara, and Frank Gaitan. Solving Burgers’ equation with quantum computing. Quantum Information Processing, 21(1):30, jan 2022.
  • [46] Tayyaba Akram, Muhammad Abbas, Muhammad Bilal Riaz, Ahmad Izani Ismail, and Norhashidah Mohd Ali. An efficient numerical technique for solving time fractional Burgers equation. Alexandria Engineering Journal, 59(4):2201–2220, aug 2020.
  • [47] Zeeshan Ali, Faranak Rabiei, Mohammad M Rashidi, and Touraj Khodadadi. A fractional-order mathematical model for COVID-19 outbreak with the effect of symptomatic and asymptomatic transmissions. Eur. Phys. J. Plus, 137:395, 2022.
  • [48] Shahram Rezapour, Hakimeh Mohammadi, and Mohammad Esmael Samei. SEIR epidemic model for COVID-19 transmission by Caputo derivative of fractional order. Advances in Difference Equations, 2020:490, 12 2020.
  • [49] Muhammad Altaf Khan and Abdon Atangana. Modeling the dynamics of novel coronavirus (2019-nCov) with fractional derivative. Alexandria Engineering Journal, 59(4):2379–2389, aug 2020.
  • [50] Benedict Barnes, Martin Anokye, Mohammed Muniru Iddrisu, Bismark Gawu, and Emmanuel Afrifa. The analytic solutions of the fractional-order model for the spatial epidemiology of the COVID-19 infection. Advances in Mathematical Physics, 2023:1–19, 5 2023.
  • [51] Nushrat Nazia, Zahid Ahmad Butt, Melanie Lyn Bedard, Wang-Choi Tang, Hibah Sehar, and Jane Law. Methods used in the spatial and spatiotemporal analysis of COVID-19 epidemiology: A systematic review. International journal of environmental research and public health, 19, 7 2022.
  • [52] Bisong Hu, Pan Ning, Jingyu Qiu, Vincent Tao, Adam Thomas Devlin, Haiying Chen, Jinfeng Wang, and Hui Lin. Modeling the complete spatiotemporal spread of the COVID-19 epidemic in mainland china. International Journal of Infectious Diseases, 110:247–257, 9 2021.
  • [53] Adedapo Ismaila Alaje and Morufu Oyedunsi Olayiwola. A fractional-order mathematical model for examining the spatiotemporal spread of COVID-19 in the presence of vaccine distribution. Healthcare Analytics, 4:100230, 12 2023.
  • [54] Pauline van den Driessche. Reproduction numbers of infectious disease models. Infectious Disease Modelling, 2(3):288–303, aug 2017.
  • [55] Brice Kammegne, Kayode Oshinubi, Oluwatosin Babasola, Olumuyiwa James Peter, Olumide Babatope Longe, Roseline Bosede Ogunrinde, Emmanuel Olurotimi Titiloye, Roseline Toyin Abah, and Jacques Demongeot. Mathematical Modelling of the Spatial Distribution of a COVID-19 Outbreak with Vaccination Using Diffusion Equation. Pathogens, 12(1):88, jan 2023.
  • [56] H. Jafari, R.M. Ganji, N.S. Nkomo, and Y.P. Lv. A numerical study of fractional order population dynamics model. Results in Physics, 27:104456, 2021.
  • [57] Aidan Pellow-Jarman, Ilya Sinayskiy, Anban Pillay, and Francesco Petruccione. A comparison of various classical optimizers for a variational quantum linear solver. Quantum Information Processing, 20(6):202, jun 2021.
  • [58] Xavier Bonet-Monroig, Hao Wang, Diederick Vermetten, Bruno Senjean, Charles Moussa, Thomas Bäck, Vedran Dunjko, and Thomas E. O’Brien. Performance comparison of optimization methods on variational quantum algorithms. Physical Review A, 107(3):032407, mar 2023.
  • [59] Enrico Fontana, Nathan Fitzpatrick, David Muñoz Ramo, Ross Duncan, and Ivan Rungger. Evaluating the noise resilience of variational quantum algorithms. Physical Review A, 104(2), nov 2020.
  • [60] Sukin Sim, Peter D. Johnson, and Alán Aspuru-Guzik. Expressibility and Entangling Capability of Parameterized Quantum Circuits for Hybrid Quantum-Classical Algorithms. Advanced Quantum Technologies, 2(12):1–15, 2019.
  • [61] Harper R. Grimsley, Sophia E. Economou, Edwin Barnes, and Nicholas J. Mayhall. An adaptive variational algorithm for exact molecular simulations on a quantum computer. Nature Communications, 10(1):3007, jul 2019.
  • [62] Amara Katabarwa, Sukin Sim, Dax Enshan Koh, and Pierre-Luc Dallaire-Demers. Connecting geometry and performance of two-qubit parameterized quantum circuits. Quantum, 6:782, August 2022.
  • [63] Tobias Haug, Kishor Bharti, and M.S. Kim. Capacity and quantum geometry of parametrized quantum circuits. PRX Quantum, 2:040309, Oct 2021.
  • [64] Tobias Haug and M. S. Kim. Natural parametrized quantum circuit. Phys. Rev. A, 106:052611, Nov 2022.
  • [65] Junhan Qin. Review of ansatz designing techniques for variational quantum algorithms. Journal of Physics: Conference Series, 2634(1):012043, nov 2023.
  • [66] Jia-Bin You, Dax Enshan Koh, Jian Feng Kong, Wen-Jun Ding, Ching Eng Png, and Lin Wu. Exploring variational quantum eigensolver ansatzes for the long-range XY model. arXiv preprint arXiv:2109.00288, 2021.
  • [67] Jules Tilly, Hongxiang Chen, Shuxiang Cao, Dario Picozzi, Kanav Setia, Ying Li, Edward Grant, Leonard Wossnig, Ivan Rungger, George H Booth, et al. The variational quantum eigensolver: a review of methods and best practices. Physics Reports, 986:1–128, 2022.
  • [68] Scott Aaronson. Read the fine print. Nature Physics, 11(4):291–293, apr 2015.
  • [69] Mudassir Moosa, Thomas W Watts, Yiyou Chen, Abhijat Sarma, and Peter L McMahon. Linear-depth quantum circuits for loading Fourier approximations of arbitrary functions. Quantum Science and Technology, 9(1):015002, jan 2024.
  • [70] Julien Zylberman and Fabrice Debbasch. Efficient quantum state preparation with Walsh series. Phys. Rev. A, 109:042401, Apr 2024.
  • [71] Ryan O’Donnell and John Wright. Efficient quantum tomography. In Proceedings of the forty-eighth annual ACM symposium on Theory of Computing, pages 899–912, 2016.
  • [72] Hsin-Yuan Huang, Richard Kueng, and John Preskill. Predicting many properties of a quantum system from very few measurements. Nature Physics, 16(10):1050–1057, 2020.
  • [73] Kaifeng Bu, Dax Enshan Koh, Roy J. Garcia, and Arthur Jaffe. Classical shadows with Pauli-invariant unitary ensembles. npj Quantum Information, 10:6, 2024.
  • [74] Senrui Chen, Wenjun Yu, Pei Zeng, and Steven T. Flammia. Robust shadow estimation. PRX Quantum, 2:030348, Sep 2021.
  • [75] Dax Enshan Koh and Sabee Grewal. Classical Shadows With Noise. Quantum, 6:776, August 2022.
  • [76] Daniel Grier, Hakop Pashayan, and Luke Schaeffer. Sample-optimal classical shadows for pure states. arXiv preprint arXiv:2211.11810, 2022.
  • [77] Andrew Arrasmith, Zoë Holmes, M Cerezo, and Patrick J Coles. Equivalence of quantum barren plateaus to cost concentration and narrow gorges. Quantum Science and Technology, 7(4):045015, aug 2022.
  • [78] Zhenyu Cai, Ryan Babbush, Simon C. Benjamin, Suguru Endo, William J. Huggins, Ying Li, Jarrod R. McClean, and Thomas E. O’Brien. Quantum error mitigation. Rev. Mod. Phys., 95:045005, Dec 2023.
  • [79] Umair Ali, Farah Aini Abdullah, and Ahmad Izani Ismail. Crank-Nicolson finite difference method for two-dimensional fractional sub-diffusion equation. Journal of Interpolation and Approximation in Scientific Computing, 2017(2):18–29, 2017.
  • [80] Andrew M Childs and Nathan Wiebe. Hamiltonian simulation using linear combinations of unitary operations. Quantum Information & Computation, 12(11&12):901–924, 2012.