Abstract
Variational quantum algorithms offer a promising new paradigm for solving partial differential equations on near-term quantum computers. Here, we propose a variational quantum algorithm for solving a general evolution equation through implicit time-stepping of the Laplacian operator. The use of encoded source states informed by preceding solution vectors results in faster convergence compared to random re-initialization. Through statevector simulations of the heat equation, we demonstrate how the time complexity of our algorithm scales with the Ansatz volume for gradient estimation and how the time-to-solution scales with the diffusion parameter. Our proposed algorithm extends economically to higher-order time-stepping schemes, such as the Crank–Nicolson method. We present a semi-implicit scheme for solving systems of evolution equations with non-linear terms, such as the reaction–diffusion and the incompressible Navier–Stokes equations, and demonstrate its validity by proof-of-concept results.
Introduction
Partial differential equations (PDEs) are fundamental to solving important problems in disciplines ranging from heat and mass transfer, fluid dynamics and electromagnetics to quantitative finance and human behavior. Finding new methods to solve PDEs more efficiently—including making use of new algorithms or new types of hardware—has been an active area of research.
Recently, the advent of quantum computers and the invention of new quantum algorithms have provided a novel paradigm for solving PDEs. A cornerstone of many of these quantum algorithms is the seminal Harrow-Hassidim-Lloyd (HHL) algorithm1 for solving linear systems, which can be utilized to solve PDEs by discretizing the PDE and mapping it to a system of linear equations. Compared to classical algorithms, the HHL algorithm can be shown to exhibit an exponential speedup. Unfortunately, attractive as it may sound, the HHL algorithm works only in an idealized setting, and a list of caveats must be addressed before it can be used to realize a quantum advantage2. Moreover, implementing HHL and many other quantum algorithms would require the use of a fault-tolerant quantum computer, which may not be available in the near future3. Instead, the machines we have today are imperfect, noisy intermediate-scale quantum (NISQ) devices4 with both coherent and incoherent errors limiting practical circuit depths.
Over the last few years, variational quantum algorithms (VQAs) have emerged as a leading strategy to realize a quantum advantage on NISQ devices. Specifically, VQAs employ shallow circuit depths to optimize a cost function, expressed in terms of an Ansatz with tunable parameters, through iterative evaluations of expectation values5. Applications of VQAs include the variational quantum eigensolver (VQE) for finding the ground or excited states of a system Hamiltonian6,7,8, the quantum approximate optimization algorithm (QAOA) for solving combinatorial optimization problems9, and solvers for linear10,11,12 and non-linear13 systems of equations.
Here, we are interested in variational quantum algorithms for solving differential equations14, such as the Black–Scholes equation15,16, the Poisson equation17,18, and the Helmholtz equation19. Specifically, the Poisson equation can be solved efficiently through explicit decomposition of the coefficient matrix derived from finite difference discretization17 using minimal cost function evaluations18 and shallower circuit depth compared to other non-variational quantum algorithms14,20,21,22. A natural question to ask, then, is whether such variational algorithms for Poisson equations can be extended to solving evolution equations, i.e. partial differential equations including a time domain. McArdle et al.23 proposed a variational quantum algorithm which simulates the real (imaginary) time evolution of parametrized trial states via forward Euler time-stepping of the Wick rotated Schrödinger equation, thereby solving the Black–Scholes equation, and by extension, the heat equation15,16. Besides issues of Ansatz selection and quantum complexity, time-stepping based on an explicit Euler method may be unstable, a limiting condition exacerbated by noise. With existing variational quantum algorithms10, an implicit scheme for evolution equations is expected to preserve any quantum advantage1 over classical algorithms, with reduced time complexity18.
This paper is organized as follows. In section “Theory”, we outline general implicit time-stepping schemes for solving evolution partial differential equations and propose the use of a variational quantum solver to resolve the Laplacian operator iteratively. In section “Applications to the heat/diffusion equation”, we apply the variational quantum algorithm to solving a heat or diffusion equation without source terms as a proof of concept. With that, we explore potential applications to more general evolution problems with non-linear source terms, including the reaction–diffusion (section “Applications to the reaction–diffusion equations”) and the Navier–Stokes equations (section “Applications to the Navier–Stokes equations”), where variables can be coupled through semi-implicit schemes.
Theory
Consider the second-order homogeneous evolution equation defined on the set \(\Omega \times J\), where \(\Omega \subset \mathbb R^d\) denotes a d-dimensional bounded spatial domain and \(J = [0,T]\), where \(T>0\) denotes a bounded temporal domain, as
where \(u(\vec{x},t)\) is a function of spatial vector \(\vec{x}\) and time t, \(D>0\) is the diffusion coefficient and f is an unspecified source term. For now, Dirichlet and Neumann boundary conditions are applicable on the boundary \(\Gamma := \partial \Omega = \Gamma _D\cup \Gamma _N\), respectively,
where \(\partial /\partial n\) is the outward normal derivative on boundary \(\Gamma\).
For a two-dimensional rectangular domain \(\Omega = (x_L,x_R )\times (y_L,y_R) \subset \mathbb R^2\), partitioning the space-time domain \(\Omega \times J\) yields the space-time grid points
where \(n_x\), \(n_y\) and \(n_t\) are prescribed positive integers, such that \(x_i=x_L+i\cdot \Delta x\), \(y_j=y_L+j \cdot \Delta y\), \(t^k=k\cdot \Delta t\), \(\Delta x=L_x/n_x\) , \(\Delta y=L_y/n_y\) and \(\Delta t=T/n_t\) , where \(L_x=x_R-x_L\) and \(L_y=y_R-y_L\). The discrete domain grid is denoted by \(\Omega _d=\{(x_i,y_j ): n_x \in \{0,1,\ldots ,n_x\}, n_y \in \{0,1,\ldots ,n_y\} \}\) and boundary grid by \(\Gamma _d\).
The finite difference (FD) approximation for the second-order spatial derivative (5-point) of the Laplacian operator taken at \(t=t^k\) is
where \(\delta _x :=D \Delta t/\Delta x^{2}\) and \(\delta _y:=D \Delta t/\Delta y^{2}\) are diffusion parameters.
Using first-order FD for temporal derivative \((u_{ij}^{k+1}-u_{ij}^k)/\Delta t\) weighted by \(\vartheta \in [0,1]\), the evolution Eq. (1) can be expressed in vector shorthand as
where \(\mathcal {I}\) is the identity matrix of the same size, \(u^{k}=\left[ u_{i j}^{k}\right] _{0 \le i \le n_{x}, 0 \le j \le n_{y}}\) and \(f^{k}=\left[ f_{i j}^{k}\right] _{0 \le i \le n_{x}, 0 \le j \le n_{y}}\).
Depending on the choice of parameter \(\vartheta\), actual time-stepping may follow an explicit (forward Euler) method (\(\vartheta =0\)), an implicit (backward Euler) method (\(\vartheta =1\)), a semi-implicit (Crank–Nicolson) method (\(\vartheta =1/2\)) or a variable-\(\vartheta\) method24. The explicit method (\(\vartheta =0\)) is efficient for each time-step but is only stable if it satisfies the stability condition \(v\le 1/2\). The implicit (backward Euler) method (\(\vartheta =1\)) is unconditionally stable and first-order accurate in time (\(\varepsilon \sim \Delta t\)), which reads
The semi-implicit Crank–Nicolson (CN) method (\(\vartheta =1/2\)) is popular as it is not only stable, but also second-order accurate in both space and time (\(\varepsilon \sim \Delta t^2\)), which reads
where \(f^{k+1/2}=(f^{k+1}+f^k )/2\). However, the CN method may introduce spurious oscillations to the numerical solution for non-smooth data unless the algorithm parameters satisfy the maximum principle25.
Variational quantum solver
Here, we explore a variational quantum approach towards the solution of the evolution equation (1). In addition to potential quantum speedup, a variational quantum algorithm could also benefit from data compression, where a matrix of dimension N can be expressed by a quantum system with only \(\log _2 N\) qubits, where N is the size of the problem. Consider the Poisson equation, which is a time-independent form of Eq. (1), expressed as
The Laplacian operator \(\nabla ^2\) in one dimension can be discretized using the finite difference method in the x direction into an N N coefficient matrix \(A_{x,\beta }\) as
where \(\beta \in \{D,N\}\) refers to either the Dirichlet (D) or Neumann (N) boundary condition, and \(\alpha _D=1\) and \(\alpha _N=0\). This extends naturally to higher dimensions, for instance \(A_{y,\beta }\) in the y direction.
A variational quantum solution is to prepare a state \(| u \rangle\) such that \(A | u \rangle\) is proportional to a state \(| b \rangle\) in a way that satisfies Eq. (10). To do that, a canonical approach10,11,12 is to first decompose the matrix A over the Pauli basis \(\mathcal P_n = \{P_1\otimes \cdots \otimes P_n: \forall i,P_i \in \{I,X,Y,Z\} \}\) (where \(X=|1\rangle \!\langle 0| +|0\rangle \!\langle 1|\), \(Y = i|1\rangle \!\langle 0| -i |0\rangle \!\langle 1|\), and \(Z=|0\rangle \!\langle 0| -|1\rangle \!\langle 1|\) are the Pauli matrices and \(I=|0\rangle \!\langle 0| +|1\rangle \!\langle 1|\) is the identity matrix) as
where \(c_P={{\,\mathrm{tr}\,}}(PA)/2^n\) are the coefficients of A in the Pauli basis. Using simple operators \(\sigma _+ = |0\rangle \!\langle 1|\), \(\sigma _- = |1\rangle \!\langle 0|\), the number of terms in the decomposition can be reduced to \(2 \log N+1\)17. A more efficient approach, however, is to express A as a linear combination of unitary transformations of simple Hamiltonians18. Accordingly, the decomposition of A in one dimension can be written as19
where \(I_0 = |0\rangle \!\langle 0|\) and \(\beta \in \{D,N\}\), as before except here, \(a_D=0\) and \(a_N=1\). Here, S is the n-qubit cyclic shift operator defined as
The expectation values of a Hamiltonian H including the shift operator S are evaluated by applying the unitary shift operator to the quantum state18,
where \(| \phi \rangle\) is an arbitrary n-qubit state and \(| \phi ' \rangle = S | \phi \rangle\). Note that Eq. (13) can be re-written as
Since expectation values of the identity operator are equal to 1, i.e. \(\langle \phi |I^{\otimes n} | \phi \rangle = \langle \phi ' | I^{\otimes n} | \phi ' \rangle = 1\), evaluating the expectation value of the operator \(A_{x, \beta }\) requires only the evaluation of expectation values of the simple Hamiltonians \(H_{1-4}\) (\(H_{1-3}\) for Dirichlet boundary condition). The required number of quantum circuits is therefore limited to a constant \(O(n^0)\)18. Similar decomposition expressions apply to problems of higher dimensions, including \(A_{y,\beta }\) in the y direction19.
Once the matrix A is decomposed, a parameterized quantum state \(| \psi (\theta ) \rangle\) is prepared using an Ansatz represented by a sequence of quantum gates \(U(\theta )\) parameterized by \(\theta\) applied to a basis state \(| 0 \rangle ^{\otimes n}\), such that \(| \psi (\theta ) \rangle = U(\theta ) | 0 \rangle ^{\otimes n}\). Here, we use a hardware-efficient Ansatz consisting of multiple layers of \(R_Y\) gates across n qubits entangled by controlled-X gates (see Fig. 1). For the source term f in (10), a quantum state \(| b \rangle\) is prepared by encoding a real vector with the unitary \(U_b\), such that \(| b \rangle = U_b | 0 \rangle ^{\otimes n}\). Depending on the actual input, conventional amplitude encoding methods26,27 may introduce a global phase that must be corrected by its complex argument for computing in the real space.
With \(| \psi (\theta ) \rangle\) and \(| b \rangle\), the cost function E can be optimized in terms of A as18
where \(| \psi (\theta ),b \rangle := (| 0 \rangle | \psi (\theta ) \rangle + | 1 \rangle | b \rangle )/\sqrt{2}\). The norm of the state vector \(| \psi (\theta ) \rangle\) is represented by \(r\in \mathbb R\), where
The quantum circuit required for the numerators of (17) and (18) consists of an encoding unitary \(U_b\) and a parameterized Ansatz \(U(\theta )\) (Fig. 1), both oppositely controlled by an ancilla qubit placed in superposition17. As for the denominators, the number of quantum circuits required corresponds to the number of decomposed terms of the Hamiltonian (13), each paired with the Ansatz \(U(\theta )\). Finally, the resulting states of these circuits are measured in the computational basis.
Using classical optimization tools, the cost function (17) is minimized with \(\theta\) updated iteratively until convergence is reached. The optimization process follows either a gradient-based or gradient-free approach, depending on how the gradient of the cost function is evaluated. A gradient-free optimizer is guided by an estimate of the inverse Hessian matrix, whereas a gradient-based optimizer by the partial derivative of the cost function E with respect to parameters \(\theta\), i.e. \(\partial E /\partial \theta\), which can be evaluated by a quantum computer (for details, see18,19). Regardless of the choice of gradient optimizer used, the optimization routine halts when the cost error falls under a convergence threshold (\(\epsilon < \epsilon _{\mathrm {tol}}\)) whence the parameters are at optimum \(\theta =\theta _\mathrm {opt}\). The converged solution vector \(| u \rangle = r_{\mathrm {opt}} | \psi (\theta _{\mathrm {opt}} \rangle\) satisfies10
where \(r_{\mathrm {opt}}=r(\theta _{\mathrm {opt}} )\) is the norm of the solution to the Poisson equation (10).
In this study, we propose to solve the evolution equation (1) through successive time-stepping of the quasi-steady Poisson equation using a variational quantum algorithm. Using a parameter set \(\theta ^k\) obtained at time-step k, we encode a normalized source state \(| \hat{b}^k \rangle := | b \rangle /\sqrt{\langle b|b\rangle }\) from \(| b(\theta ^k) \rangle\) and seek an implicit solution to
where \(\theta ^{k+1}=\theta _\mathrm {opt}(t^{k+1} )\) is the parameter set and \(r^{k+1}=r_\mathrm {opt}(\theta ^{k+1})\) is the norm at next time-step \(k+1\). This process is then iterated in time up to \(n_t\) number of time-steps as desired (see Algorithm 1).

The cost function \(E(\theta ^k)\) may be evaluated on a quantum computer by computing each of the inner products in the expression in Eq. (17) separately. Using the decomposition provided in Eq. (16), these inner products may be expressed in terms of expectation values \(\langle \varphi | O_i | \varphi \rangle\) for preparable states \(| \varphi \rangle\) and simple Hermitian operators \(O_i\). Each expectation value \(\langle \varphi | O_i | \varphi \rangle\) is evaluated on a quantum computer by preparing the state \(| \varphi \rangle\) using the quantum circuits described above and then measuring the operator \(O_i\) in the state \(| \varphi \rangle\)18.
In this study, the variational quantum algorithm is implemented in Pennylane (Xanadu)28 using a statevector simulator with the Qulacs29 plugin as a backend for quantum simulations, and the L-BFGS-B optimizer for parametric updates. Amplitude encoding is carried out via the standard Mortonnen state preparation template30 with custom global phase correction. For hardware emulation via the QASM simulator (Qiskit), we refer the reader to the excellent cost-sampling analysis of Sato et al. 18.
Applications to the heat/diffusion equation
Consider the following one-dimensional heat or diffusion equation without a source term
Dirichlet conditions are applied on the boundaries of a 1D domain \(\Omega =(x_L,x_R)\subset \mathbb R\), where \(u(x_L,t)=g_L (t)\) and \(u(x_R,t)=g_R (t)\), such that the boundary vector \(u_D=(g_L, 0,\ldots , 0,g_R )\) is known for all t.
To solve Eq. (22), the variational quantum evolution algorithm (Algorithm 1) can be employed with a suitable time-stepping scheme (7). For the implicit Euler (IE) method (8), the matrix A and source state \(| b(\theta ^k) \rangle\) can be decomposed into
where \(| u^k \rangle = r^k| \psi \left( \theta ^{k}\right) \rangle\).
For the Crank-Nicolson (CN) method (9), it follows that the \(\mathcal Au^k\) term, which carries a small but non-trivial evaluation cost, can be eliminated using the source state of the previous time-step \(k-1\), leading to
where \(2\left| \bar{u}_{D}^{k+1/2}\right\rangle :=\left( \left| u_{D}^{k+1}\right\rangle +\left| u_{D}^{k}\right\rangle \right)\). Here, the presence of a \(k-1\) term in \(\left| b^{k-1}\right\rangle\) is not unexpected due to temporal finite differencing at second-order accuracy.
For a space-time domain \(\Omega \times J\in [0,1] \times [0,1]\), let the number of time-steps be \(n_t=20\) and the spatial intervals be \(n_x=2^n+1\), where n is the number of qubits, and \(\delta _x=1\) is the diffusion parameter. We employ the Dirichlet boundary condition with boundary values \((g_L,g_R )=(1,0)\) and initial values \(u_0= \mathbf {0}\). With initial random parameters \(\theta ^0 \in [0,2 \pi ]\), we run a limited-memory Broyden-Fletcher-Goldfarb-Shanno boxed (L-BFGS-B) optimizer31,32,33,34 to optimize \(\theta\) with absolute and gradient tolerances set at \(10^{-8}\).
Figure 2a compares solutions obtained from the variational quantum solver (23) and classical methods to a 1D heat or diffusion problem in time-increments of 0.1, where the number of qubits and Ansatz layers expressed as a set n- l, are 3- 3 and 4- 4. Here we define the time-averaged trace error \(\bar{\epsilon }_{\mathrm {tr}}\) as
where \(\left| \hat{u}^{k}\right\rangle :=\left| u^{k}\right\rangle / \sqrt{\left\langle u^{k} \mid u^{k}\right\rangle }\) is the normalized classical solution vector at time k. The trace errors of solutions shown in Fig. 2a are 0.0008 and 0.0025 for n- l sets of 3-3 and 4-4 respectively.
(a) Implicit variational quantum solutions to a 1D heat conduction or diffusion problem in time-increments of 0.1, with boundary values \(\{g_L,g_R \}=\{1,0\}\), initial values \(u_0=\bar{0}\) and diffusion parameter \(\delta _x=1\). (Left) Qubit–layer count n-\(l=3\)-3 and time-averaged trace error \(\bar{\varepsilon }_{{{\,\mathrm{tr}\,}}}=0.0008\); (Right) n-\(l=4\)-4, \(\bar{\varepsilon }_{{{\,\mathrm{tr}\,}}}=0.0025\). Both classical and quantum solutions overlap with vanishingly small trace errors. (b) Cost function vs. number of optimization steps for 10 runs. Inset: Input parameters are re-initialized randomly, \(\theta \in [0,2 \pi ]\), before each time-step for 5 runs.
Figure 2b shows how the cost function E depends on the number of optimization steps for n-l of 3-3 and 4-4 (10 sampled runs each). Each distinct step in E represents sequential optimization from solution \(| \psi (\theta ^k) \rangle\) at time-step k towards the solution \(| \psi (\theta ^{k+1}) \rangle\) at \(k+1\). For small time-step \(\Delta t\), \(\theta ^k\) provides a good initial parameter set for solving optimization step \(k+1\). If the Ansatz parameters were re-initialized randomly \(\theta ^k\in [0,2\pi ]\) before each time-step, significantly more optimization steps would be required on average for convergence for each run (see Fig. 2b, inset).
Time complexity
Here we briefly examine the time complexity of the quantum algorithm excluding the classical computing components. Following the analysis of the variational Poisson solver18, the time complexity of the proposed variational evolution equation solver per time-step reads
where the terms within the inner parentheses indicate the time complexity of the state preparation scaling as \(\mathcal {O}(l+e+n^2 )\), which consists of the Ansatz depth l, the encoding depth \(e = \mathcal {O}(n^2)\)35, the depth of the circuit needed to implement the n-qubit cyclic shift operator \(O(n^2)\), and that of the number of shots \(\mathcal {O}(\varepsilon ^{-2})\) required for estimation of expectation values up to a mean squared error of \(\varepsilon ^2\). The required number of quantum circuits depends on the boundary conditions applied (3 for periodic, 4 for Dirichlet and 5 for Neumann conditions), scaling only as \(\mathcal {O}(n^0 )\). \(\bar{T}_{\mathrm {eval}}\) is the time-averaged number of function evaluations,
where \(T_{\mathrm {eval}}\) is the sum of function evaluations required for a run with \(n_t\) time-steps. Using a gradient-based optimizer, the time complexity for gradient estimation via quantum computing would scale as the Ansatz volume \(\mathcal {O}(nl)\) representing the number of quantum circuits required for parameter shifting. Otherwise, with a gradient-free optimizer, the time complexity simply contributes towards \(\bar{T}_{\mathrm {eval}}\) as additional function evaluations required to evaluate the Hessian for gradient descent.
To see if the time complexity for gradient-free optimization scales as \(\mathcal {O}(nl)\), we plot the time-averaged number of function evaluations \(\bar{T}_{\mathrm {eval}}\) against the number of parameters nl (Fig. 3a). Indeed, we found that \(\bar{T}_{\mathrm {eval}}\) scales reasonably with nl (see trendline of slope 1), despite apparent tapering at higher l. Figure 3b shows that the time-averaged trace error \(\bar{\varepsilon }_{{{\,\mathrm{tr}\,}}}\) decreases with circuit depth l, even for over-parameterized quantum circuits where the number of layers exceeds the minimum required for convergence, \(l_{\mathrm {min}} := 2^n/n\)36. For low grid resolution \(n = 3\), the trace error is limited to a minimum of \(\sim 10^{-4}.\) Since the time complexity for solving the Poisson equation classically is \(\mathcal {O}(N\log _2N)\), where \(N=2^n\), quantum advantage could be realized with the proposed algorithm with linear time scaling by \(n_t\) at sub-exponential time complexity18.
Logarithmic plots of time-averaged (a) number of function evaluations \(\bar{T}_{\mathrm {eval}}\) vs. number of parameters nl, (b) trace error \(\bar{\varepsilon }_{{{\,\mathrm{tr}\,}}}\) vs. number of layers l, (c) number of iterations \(\bar{T}_{ }\) and (d) trace error \(\bar{\varepsilon }_{{{\,\mathrm{tr}\,}}}\) vs. diffusion parameter \(\delta\) for \(l=n\) up to \(T=1\). Each data point and error bar represents, respectively, the mean and standard deviation out of 25 runs.
For deep and wide quantum circuits, the increase in optimization time is exacerbated by the presence of barren plateaus, or vanishingly small gradients in the energy landscape, where re-initialization can leave one trapped at a position far removed from the minimum37,38,39. Conversely, short time-steps lead to efficient solution trajectories that remain close to the local cost minima, leading to significant reduction in optimization times. To verify this, we conduct numerical simulations varying the diffusion parameter \(\delta\) with \(l=n\) up to time \(T=1\). Figure 3c shows that the number of iterations, or required optimization steps, per time-step increases linearly with \(\delta\). Close inspection of the time-averaged trace distance shows bimodal distributions at higher \(\delta\), which separates success and failure during convergence towards the global minimum (see Fig. 3d, dotted lines), resembling local minima traps due to poor optimization or expressivity of Ansätze19,40.
Discretization error
Time evolution can be at a higher order, specifically for the Crank-Nicolson method. The problem statement is identical to the previous one, except with Dirichlet boundary values \((g_L, g_R) = (0,0)\) and the initial condition \(u_0 = \sin (\pi x/L_x\)), where we use \(L_x=1\) as the spatial length of the domain. This admits an exact analytical solution,
Figure 4 compares variational quantum and exact solutions using implicit Euler and Crank-Nicolson (CN) schemes. The discretization error for the higher-order CN scheme is reduced significantly, especially at lower grid resolution (\(n=3\)). Although the complexity costs for both methods (23) and (24) are similar, note however that the CN method may introduce spurious oscillations for non-smooth data24, an issue which may be exacerbated by quantum noise41.
Variational quantum solutions to a 1D heat conduction or diffusion problem for qubit-layers (a) n-\(l=3\)-3 and (b) n-\(l=4\)-4 in time-increments of 0.1 using implicit Euler and Crank–Nicolson schemes, with Dirichlet boundary values \((g_L,g_R )=(0,0)\), initial values \(u_0=\sin {(\pi x)}\) and diffusion parameter \(\delta _x=1\). Dashed lines denote exact solutions.
Higher dimensions
The preceding analysis can be extended to higher dimensions. Consider the following two-dimensional heat or diffusion equation in \(\Omega \times J\), where \(\Omega =(x_L,x_R )\times (y_L,y_R) \subset \mathbb R^2\):
Under the implicit Euler scheme (8), the matrix A and source state \(| b^k \rangle\) can be decomposed into
Dirichlet conditions are applied on the boundaries, where \(u(x_{L,R},y,t) = g_{x_{L,R}}(y,t)\) and \(u(x,y_{L,R},t) = g_{y_{L,R}}(x,t)\). Let the number of spatial grid intervals be \(n_x = 2^{m_x} + 1\) and \(n_y = 2^{m_y} + 1\), where \(m_x\) is the number of qubits allocated to the x grid, \(m_y\) to the y grid, and \(n=m_x+m_y\) is the total number of qubits. Accordingly, A is decomposed in terms of simple Hamiltonians in x and y as
where \(H_{1-4}\) are simple Hamiltonians to be evaluated (\(H_{1-3}\) for Dirichlet boundary condition).
Figure 5 shows solution snapshots to a 2D heat conduction or diffusion problem taken at time \(T = 1\) with Dirichlet boundary values \((g_{x_L},g_{x_R}) = (0,0)\) and \((g_{y_L},g_{y_R})=(1,0)\), initial values \(u_0=\mathbf {0}\), \(n_t = 20\) and diffusion parameters \(\delta _x=\delta _y=1\). Results obtained from variational quantum solver agree with classical solutions with time-averaged trace errors of up to \(10^{-2}\).
(a) Contour solution plot of 2D heat conduction or diffusion problem at time \(T = 1\) on a \(8 \times 8\) x-y square grid (qubit-layer \(m_x\)-\(m_y\)-\(l=3\)-3-6) with Dirichlet boundary values \((g_{x_L},g_{x_R}) = (0,0)\) and \((g_{y_L},g_{y_R})=(1,0)\), initial values \(u_0=\mathbf {0}\), \(n_t = 20\) and diffusion parameters \(\delta _x=\delta _y=1\). (b) Solution vectors in time-increments of 0.1.
Applications to the reaction–diffusion equations
Here, we extend applications of our variational quantum solver to evolution equations with non-trivial source terms. Consider a two-component homogeneous reaction-diffusion system of equations
where \(\mathbf {u}=[u_1,u_2]^T\) is a concentration tensor, \(\mathbf {D}={\text {diag}}[D_1,D_2]^T\) is a diffusion tensor and \(\mathbf {f} = [f_1(u_1,u_2), f_2(u_1,u_2)]^T\) is a coupled reaction source term. First proposed by Turing42, the reaction-diffusion equations are useful for understanding pattern formation and self-organization in biological and chemical systems43,44, such as morphogenesis45 and autocatalysis46.
Here, we propose a semi-implicit time-stepping scheme, whereby the coupled, non-linear source term is solved at the current time-step k. With explicit source term \(f^k\), the implicit Euler scheme (8) reads
The two-component tensor \(\mathbf {A}=[A_1,A_2]^T\) and source state \(\mathbf {b}=[b_1,b_2]^T\) can then be decomposed into
where \(\mathbf {\delta _x} = 2^{2n}\Delta t\mathbf {D}\) is the two-component diffusion parameter vector. With a linear Hermitian source matrix f, a fully implicit time-stepping scheme becomes available (Appendix A).
Implementation
The semi-implicit variational quantum solver solves for the Laplacian for each component using a quantum computer and the solution vectors are explicitly coupled through source terms prior to re-encoding in preparation for the next time-step (see Algorithm 2).

1D Gray–Scott model
The Gray-Scott model46 was originally conceived to model chemical reactions of the type \(U + 2V \rightarrow 3V\), \(V \rightarrow P\), where U, V and P are chemical species with reaction term
where \(k_1\) and \(k_2\) are kinetic rate constants.
An interesting class of Gray-Scott solutions involves periodic splitting of chemical wave pulses24,47. Here, we conduct a pulse splitting numerical experiment under limited spatial and temporal resolutions, using input parameters \(\mathbf {D}=[10^{-4},10^{-6}]^T\), \(k_1 = 0.04\) and \(k_2 = 0.02\), with a mid-pulse initial condition and Dirichlet boundary conditions as
where time t extends up to \(T=600\) on \(dt = 0.5\).
Figure 6a shows how an initial mid-pulse can spontaneously and periodically split in space and time, a phenomenon captured using variational quantum diffusion reaction solver (see Algorithm 2) even on relatively low spatial resolutions.
Space-time solutions of (a) mid-pulse wave-splitting in 1D two-component Gray-Scott model obtained using semi-implicit variational quantum reaction-diffusion solver on \(2^{6}=64\) grid points up to \(T=600\), for chemical species \(u_1\) (left) and \(u_2\) (right). Parameters include \(\mathbf {D}=[10^{-4},10^{-6}]^T\), \(k_1 = 0.04\), \(k_2 = 0.02\) and \(dt=0.5\). (b) Traveling wave solutions for 1D Brusselator model on \(2^{4}=16\) grid points up to \(T=400\) on Neumann boundary conditions. Parameters include \(\mathbf {D}=[10^{-4},10^{-4}]^T\), \(k_1 = 3\), \(k_2 = 1\) and \(dt=0.5\).
1D Brusselator model
So far, we have been looking at only Dirichlet boundary conditions. Here, we demonstrate a test example for Neumann boundary conditions in a diffusion-reaction model, namely, the Brusselator model48, which was developed by the Brussels school of Prigogine to model the behavior of non-linear oscillators in a chemical reaction system. The model reaction term reads
Using \(\mathbf {D}=[10^{-4},10^{-4}]^T\), \(k_1 = 3\) and \(k_2 = 1\), with initial conditions
where time t extends up to \(T=400\) on \(dt = 0.5\).
Figure 6b shows how a chemical pulse can be spontaneously created, which continually travels leftwards in time, creating traveling waves that appear as striped patterns in time despite low spatial resolutions.
Applications to the Navier–Stokes equations
The Navier-Stokes equations are a set of non-linear partial differential equations that describes the motion of fluids across continuum length scales. There are several studies aimed at applying quantum algorithms to computational fluid dynamics (see review49), ranging from reduction of partial differential equations to ordinary differential equations50 and quantum solutions of sub-steps of the classical algorithm51,52 to the quantum Lattice Boltzmann scheme53.
Here, we look into the potential use of variational quantum algorithms to evolve the fluid momentum equations in time. Consider the incompressible Navier-Stokes equations in non-dimensional form
where \(\mathbf {u}\) is the velocity vector and p is the fluid pressure. The ratio \(\mathrm {Re}=U_cL_c/\nu\) is the Reynolds number, where \(U_c\) is the characteristic flow velocity across a characteristic length-scale \(L_c\) and \(\nu\) is the fluid kinematic viscosity.
Unlike other temporal evolution equations, the incompressible Navier-Stokes equations cannot be time-marched directly as the resultant velocities do not satisfy the continuity constraint (45), and hence are not divergence-free. To resolve this, the projection method54, also known as the predictor-corrector or fractional step method, separates the solution time-step into velocity and pressure sub-steps, also known as the predictor and corrector steps.
Projection method
Predictor step
The predictor step first approximates an intermediate velocity \(\mathbf {u^{*}}\) by solving the fluid momentum equation (44) in the absence of pressure, i.e. the Burgers’ equations55, of the form
Through a semi-implicit scheme, the viscous terms are handled implicitly using the variational quantum evolution equation solver and the non-linear inertial terms explicitly as source terms using classical computation. For quantum algorithms for non-linear problems, the reader is referred to separate works on quantum ordinary differential equation solvers50,55, Carleman linearization56 and a variational quantum nonlinear processing unit (QNPU)13.
On a two-dimensional domain with Dirichlet boundary conditions, the tensor \(\mathbf {A_u}=[A_u,A_v]^T\) and source state \(\mathbf {b_u}=[b_u,b_v]^T\) can be decomposed as
where \(\delta _x := \Delta t/(\mathrm {Re}\Delta x^{2})\) and \(\delta _y:= \Delta t/(\mathrm {Re}\Delta y^{2})\). \(F^k = D^k_u B_{x,D} + D^k_v B_{y,D}\) is an operator which approximates the non-linear inertial term, where \(\mathbf {D^k_{u}}\) are diagonal matrices with velocity vectors \(\mathbf {| u^k \rangle }\) along the diagonals and B is a divergence matrix discretized through center differencing, for instance in the x direction, as
where \(\beta \in \{D,N\}\) refers to either Dirichlet (D) or Neumann (N) boundary condition. Here, \(\alpha _D=0\) and \(\alpha _N=-1\).
Corrector step
The second corrector step solves for the velocity \(\mathbf {u^{k+1}}\) by correcting the intermediate velocities \(\mathbf {u^*}\) using the pressure gradient as a Lagrange multiplier to enforce continuity. Applying divergence to the correction equations yields the pressure Poisson equation for the pressure field at half-step
which can be solved implicitly in two dimensions (x, y) via the following decomposition:
Note the addition of a simple Hermitian \(I_0 = |0\rangle \!\langle 0|\) to the pressure matrix \(A_p\), which would otherwise be singular (corank 1) under Neumann boundary conditions for the pressure field.
With the new pressure \(p^{k+1}\), the velocities are updated at the \(k+1\) time-step as
where \(\mathbf {B_N} = [B_{x,N}, B_{y,N}]^T\) are the gradient operators.
Implementation
Overall, the variational quantum solver for Navier-Stokes equations using the projection method (see Algorithm 3) involves two sequential steps, the first requiring a number of Algorithm 1 iterations equal to the number of velocity components, and the second for the pressure Poisson step. For two-dimensional flows, the number of velocity components to be solved can be effectively reduced by one through the vorticity stream-function formulation (Appendix B). In computational fluid dynamics, these implicit systems of linear equations are often the most computationally expensive parts to solve in classical algorithms, providing incentives for potential speedup via quantum computing49,52.

2D cavity flow
The lid-driven cavity flow is a standard benchmark for testing incompressible Navier–Stokes equations57. Consider a two-dimensional square domain \(\Omega =(0,L)\times (0, L) \subset \mathbb R^2\) with only one wall sliding tangentially at a constant velocity. For simplicity, we employ a fixed collocated grid, instead of a staggered grid which helps avoid spurious pressure oscillations but at the cost of increased mesh and discretization complexity. No-slip boundary conditions apply on all walls, so that zero velocity applies on all wall boundaries except one moving at \(u(x,0)=1\).
Figure 7a shows a snapshot of a test case conducted on a \(2^n=8\times 8\) grid at \(\Delta t=0.5\) up to \(T = 5\), with the central vortex shown by normalized velocity quivers in white. In terms of time complexity, we note that the pressure correction step requires a greater number of function evaluations for convergence compared to an implicit velocity step (Fig. 7b). This is due to the additional quantum circuits for evaluating the \(H_4\) Hamiltonians (32, 33) for Neumann boundary conditions and one for specifying the reference pressure (50), leading to a total of 9 evaluation terms compared to 6, a ratio which corroborates with the apparent \(\sim 50\%\) increase in function evaluations shown in Fig. 7b.
(a) 2D lid-driven cavity flow (\(\mathrm {Re}= 100\)) on a \(2^n=8\times 8\) grid at \(\Delta t=0.5\) up to \(T = 5\) and upper boundary sliding in the x direction at \(u(x,0)=1\). Color map indicates velocity magnitude with normalized velocity quivers in white indicating direction of flow. (b) Plots of cumulative number of function evaluations (Nfeval) vs. time for intermediate velocities (u,v) and pressure (p).
While not directly comparable to classical computational fluid dynamics in numerical accuracy, this exercise, nevertheless, roadmaps potential applications of the variational quantum method towards more complicated flow problems52.
Conclusion
In this study, we proposed a variational quantum solver for evolution equations which include a Laplacian operator to be solved implicitly. For short time-steps \(\Delta t\), the use of initial parameter sets encoded from prior solution vectors results in faster convergence compared to random re-initialization. The overall time complexity scales with the Ansatz volume \(\mathcal {O}(nl)\) for gradient estimation and with the number of time-steps \(\mathcal {O}(n_t)\) for temporal discretization. Our proposed algorithm extends naturally to higher-order time-stepping and higher dimensions. For evolution equations with non-trivial source terms, the semi-implicit scheme can be applied, where non-linear source terms are handled explicitly. Using statevector simulations, we demonstrated that variational quantum algorithms can be useful in solving popular partial differential equations, including the reaction-diffusion and the incompressible Navier-Stokes equations. Together, our proposed algorithm extends the use of quantum Poisson solvers to solve time-dependent problems with reduced time complexity from variational quantum algorithms over classical computation.
The present work aims at bridging the gap between variational quantum algorithms and practical applications. Our work has assumed that the state preparations, unitary transformations and measurements are implemented perfectly, and does not consider the effects of quantum noise from actual hardware or any potential amplification from iterative time-stepping. In our implementation, we only considered the hardware-efficient Ansatz with \(R_y\) rotation gates and controlled-NOT entanglers, and thus leave open the question about the performance of other Ansätze. Future work can include noise mitigation58,59,60, quantum random access memory61,62,63, tensor networks64, Ansatz architecture, non-linear algorithms and cost-efficient encoding.
Data availability
The datasets used and/or analysed during the current study are available from the corresponding author on reasonable request.
References
Harrow, A. W., Hassidim, A. & Lloyd, S. Quantum algorithm for linear systems of equations. Phys. Rev. Lett. 103, 150502 (2009).
Aaronson, S. Read the fine print. Nat. Phys. 11(4), 291–293 (2015).
Bharti, K. et al. Noisy intermediate-scale quantum algorithms.. Rev. Mod. Phys. 94, 015004 (2022).
Preskill, J. Quantum computing in the NISQ era and beyond. Quantum 2, 79 (2018).
Cerezo, M. et al. Variational quantum algorithms. Nat. Rev. Phys. 3, 625–644 (2021).
Peruzzo, A. et al. A variational eigenvalue solver on a photonic quantum processor. Nat. Commun. 5(1), 1–7 (2014).
McClean, J. R., Romero, J., Babbush, R. & Aspuru-Guzik, A. The theory of variational hybrid quantum-classical algorithms. New J. Phys. 18(2), 023023 (2016).
Kandala, A. et al. Hardware-efficient variational quantum eigensolver for small molecules and quantum magnets.. Nature 549(7671), 242–246 (2017).
Edward, F., Jeffrey, G. & Sam, G.. A quantum approximate optimization algorithm. arXiv:1411.4028 (2014).
Bravo-Prieto, C., LaRose, R., Cerezo, M., Subasi, Y., Cincio, L., & Coles, P. J. Variational quantum linear solver. arXiv:1909.05820 (2019).
Huang, H.-Y., Bharti, K. & Rebentrost, P. Near-term quantum algorithms for linear systems of equations with regression loss functions. New J. Phys. 23(11), 113021 (2021).
Xu, X. et al. Variational algorithms for linear algebra. Sci. Bull. 66(21), 2181–2188 (2021).
Lubasch, M., Joo, J., Moinier, P., Kiffner, M. & Jaksch, D. Variational quantum algorithms for nonlinear problems. Phys. Rev. A 101(1), 010301 (2020).
Arrazola, J. M., Kalajdzievski, T., Weedbrook, C. & Lloyd, S. Quantum algorithm for nonhomogeneous linear partial differential equations. Phys. Rev. A 100(3), 9 (2019).
Fontanela, F., Jacquier, A. & Oumgari, M. A quantum algorithm for linear PDEs arising in finance. SIAM J. Financ. Math. 12(4), SC98–SC114 (2021).
Miyamoto, K. & Kubo, K. Pricing multi-asset derivatives by finite-difference method on a quantum computer. IEEE Trans. Quantum Eng. 3, 1–25 (2021).
Liu, H.-L. et al. Variational quantum algorithm for the Poisson equation. Phys. Rev. A 104(2), 022418 (2021).
Sato, Y., Kondo, R., Koide, S., Takamatsu, H. & Imoto, N. Variational quantum algorithm based on the minimum potential energy for solving the Poisson equation. Phys. Rev. A 104(5), 052409 (2021).
Ewe, W.-B., Koh, D. E., Goh, S. T., Chu, H.-S. & Png, C. E. Variational quantum-based simulation of waveguide modes. IEEE Trans. Microw. Theory Tech. 70(5), 2517–2525 (2022).
Cao, Y., Papageorgiou, A., Petras, I., Traub, J. & Kais, S. Quantum algorithm and circuit design solving the Poisson equation. New J. Phys. 15(1), 013021 (2013).
Linden, N., Montanaro, A. & Shao, C. Quantum vs. classical algorithms for solving the heat equation. arXiv:2004.06516 (2020).
Childs, A. M., Liu, J.-P. & Ostrander, A. High-precision quantum algorithms for partial differential equations. Quantum 5, 574 (2021).
McArdle, S. et al. Variational ansatz-based quantum simulation of imaginary time evolution.. NPJ Quantum Inform. 5(1), 1–6 (2019).
Lee, P. & Kim, S. A variable-\(\theta\) method for parabolic problems of nonsmooth data. Comput. Math. Appl. 79(4), 962–981 (2020).
Crank, J. & Nicolson, P. A practical method for numerical evaluation of solutions of partial differential equations of the heat-conduction type. Math. Proc. Camb. Philos. Soc. 43(1), 50–67 (1947).
Möttönen, M., Vartiainen, J. J., Bergholm, V. & Salomaa, M. M. Transformation of quantum states using uniformly controlled rotations.. Quantum Inf. Comput. 5(6), 467–473 (2005).
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).
Bergholm, V., Izaac, J., Schuld, M., Gogolin, C., Sohaib Alam, M., Ahmed, S., Miguel Arrazola, J., Blank, C., Delgado, A., Jahangiri, S., et al. Pennylane: Automatic differentiation of hybrid quantum-classical computations. arXiv:1811.04968 (2018).
Suzuki, Y. et al. Qulacs: A fast and versatile quantum circuit simulator for research purpose. Quantum 5, 559 (2021).
Schuld, Maria & Petruccione, Francesco. Supervised Learning with Quantum Computers (Quantum Science and Technology, Springer, 2019).
Shanno, D. F. Conditioning of quasi-Newton methods for function minimization. Math. Comput. 24(111), 647–656 (1970).
Goldfarb, D. A family of variable-metric methods derived by variational means. Math. Comput. 24(109), 23–26 (1970).
Fletcher, R. A new approach to variable metric algorithms. Comput. J. 13(3), 317–322 (1970).
Broyden, C. G. The convergence of a class of double-rank minimization algorithms 1. General considerations. IMA J. Appl. Math. 6(1), 76–90 (1970).
Israel F. Araujo, Daniel K. Park, Francesco Petruccione, and Adenilton J. da Silva. A divide-and-conquer algorithm for quantum state preparation. Sci. Rep. 2021 11:1, 11:1–12 (2021).
Patil, H., Wang, Y. & Krstić, P. S. Variational quantum linear solver with a dynamic ansatz. Phys. Rev. A 105(1), 012423 (2022).
Huembeli, P. & Dauphin, A. Characterizing the loss landscape of variational quantum circuits. Quantum Sci. Technol. 6(2), 025011 (2021).
McClean, J. R., Boixo, S., Smelyanskiy, V. N., Babbush, R. & Neven, H. Barren plateaus in quantum neural network training landscapes. Nat. Commun. 9(1), 4812 (2018).
Cerezo, M., Sone, A., Volkoff, T., Cincio, L. & Coles, P. J. Cost function dependent barren plateaus in shallow parametrized quantum circuits. Nat. Commun. 12(1), 1–12 (2021).
Wierichs, D., Gogolin, C. & Kastoryano, M. Avoiding local minima in variational quantum eigensolvers with the natural gradient optimizer. Phys. Rev. Res. 2(4), 043246 (2020).
Cincio, L., Rudinger, K., Sarovar, M. & Coles, P. J. Machine learning of noise-resilient quantum circuits. PRX Quantum 2, 010324 (2021).
Turing, A. M. The chemical basis of morphogenesis. 1953. Bull. Math. Biol., 52(1-2):153–97; discussion 119–52 (1990).
Van Gorder, R. A. Pattern formation from spatially heterogeneous reaction–diffusion systems. Philos. Trans. R. Soc. A: Math. Phys. Eng. Sci., 379(2213) (2021).
Kondo, S. & Miura, T. Reaction–diffusion model as a framework for understanding biological pattern formation. Science 329(5999), 1616–1620 (2010).
Gierer, A. & Meinhardt, H. A theory of biological pattern formation. Kybernetik 12(1), 30–39 (1972).
Gray, P. & Scott, S. K. Autocatalytic reactions in the isothermal, continuous stirred tank reactor. Chem. Eng. Sci. 38(1), 29–43 (1983).
Zegeling, P. A. & Kok, H. P. Adaptive moving mesh computations for reaction-diffusion systems. J. Comput. Appl. Math. 168(1–2), 519–528 (2004).
Jiwari, R., Singh, S. & Kumar, A. Numerical simulation to capture the pattern formation of coupled reaction-diffusion models. Chaos Solitons Fractals 103, 422–439 (2017).
Griffin, K. P., Jain, S. S., Flint, T. J. & WHR Chan. Investigations of quantum algorithms for direct numerical simulation of the Navier-Stokes equations. Center for Turbulence Research Annual Research Briefs, pages 347–363 (2019).
Gaitan, F. Finding flows of a Navier–Stokes fluid through quantum computing. NPJ Quantum Inform. 6(1), 61 (2020).
Steijl, R. Quantum algorithms for nonlinear equations in fluid mechanics. In Quantum Computing and Communications, chapter 2 (ed. Zhao, Y.) (IntechOpen, Rijeka, 2022).
Steijl, R. & Barakos, G. N. Parallel evaluation of quantum algorithms for computational fluid dynamics. Comput. Fluids 173, 22–28 (2018).
Budinski, L. Quantum algorithm for the advection-diffusion equation simulated with the lattice Boltzmann method. Quantum Inf. Process. 20(2), 57 (2021).
Chorin, A. J. Numerical solution of the Navier–Stokes equations. Math. Comput. 22(104), 745–762 (1968).
Oz, F., Vuppala, R. K. S. S., Kara, K. & Gaitan, F. Solving Burgers’ equation with quantum computing. Quantum Inf. Process. 21(1), 30 (2022).
Liu, J. P., Kolden, H., Krovi, H. K., Loureiro, N. F., Trivisa, K. & Childs, A. M. Efficient quantum algorithm for dissipative nonlinear differential equations. Proceedings of the National Academy of Sciences of the United States of America, 118(35), (2021).
Erturk, E., Corke, T. C. & Gökçöl, C. Numerical solutions of 2-D steady incompressible driven cavity flow at high Reynolds numbers. Int. J. Numer. Meth. Fluids 48(7), 747–774 (2005).
Li, Y. & Benjamin, S. C. Efficient variational quantum simulator incorporating active error minimization. Phys. Rev. X 7, 021050 (2017).
Temme, K., Bravyi, S. & Gambetta, J. M. Error mitigation for short-depth quantum circuits. Phys. Rev. Lett. 119, 180509 (2017).
Endo, S., Benjamin, S. C. & Li, Y. Practical quantum error mitigation for near-future applications. Phys. Rev. X 8, 031027 (2018).
Chen, Z.-Y. et al. Quantum approach to accelerate finite volume method on steady computational fluid dynamics problems. Quantum Inf. Process. 21(4), 1–27 (2022).
Giovannetti, V., Lloyd, S. & Maccone, L. Architectures for a quantum random access memory. Phys. Rev. A 78(5), 052310 (2008).
Giovannetti, V., Lloyd, S. & Maccone, L. Quantum random access memory. Phys. Rev. Lett. 100(16), 160501 (2008).
Gourianov, N. et al. A quantum-inspired approach to exploit turbulence structures. Nature Comput. Sci. 2(1), 30–37 (2022).
Acknowledgements
We thank Maria Schuld for helpful comments on amplitude embedding. This work was supported in part by the Agency for Science, Technology and Research (#21709) under Grant No. C210917001. DEK acknowledges funding support from the National Research Foundation, Singapore, through Grant NRF2021-QEP2-02-P03.
Author information
Authors and Affiliations
Contributions
F.Y.L. designed the study. W.B.E. and D.E.K. advised the study. F.Y.L. and W.B.E. wrote the software code. F.Y.L. ran simulations and analyzed data. All authors wrote and reviewed the manuscript.
Corresponding author
Ethics declarations
Competing interests
The authors declare no competing interests.
Additional information
Publisher's note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Appendices
A Fully implicit scheme for linear Hermitian source term
For a reaction-diffusion system of equations with non-trivial source terms (35), time-stepping could be rendered fully implicit if the source terms can be expressed as a linear Hermitian matrix with constant coefficients. Consider a two-component 1D chemical reaction with source terms of the form
where \(k_{ij}\) (\(i,j \in \{1,2\}\)) are kinetic rate constants that are components of the linear Hermitian matrix \(K = K^T \in \mathbb R^{N\times N}\), whose off-diagonal elements are equal, i.e. \(k_{12}=k_{21}\); \(\mathcal {I}\) is the identity matrix of size \(N\times N\) and \([u_1, u_2]^T\) is a concentration vector of length 2N. This problem requires \(n+1\) qubits, where \(n=\log _2N\). Following the implicit Euler scheme (Eq. 8), we set up a \(2N\times 2N\) coefficient matrix, which decomposes as
where \(A_{x,\beta }\) is the discretized \(N \times N\) coefficient matrix for a single component (Eq. 16) containing up to four Hamiltonian terms \(H_{1-4}\). Note the last three additional Hamiltonian terms contributed by the source term.
B Vorticity stream-function formulation
For two-dimensional incompressible flows, the vorticity stream-function formulation can be used to eliminate the pressure as a dependent variable, such that
where \(\omega = \partial v/\partial x - \partial u/\partial y\) is the flow vorticity and the stream-function \(\psi\) satisfies \(u=-\partial \psi /\partial y\) and \(v=\partial \psi /\partial x\). It follows that the re-formulation \(\{u,v,p\} \rightarrow \{\omega ,\psi \}\) can simplify the variational quantum algorithm 3 by reducing the number of velocity components by one, at the cost of specifying stream-function values along the domain boundaries.
Rights and permissions
Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by/4.0/.
About this article
Cite this article
Leong, F.Y., Ewe, WB. & Koh, D.E. Variational quantum evolution equation solver. Sci Rep 12, 10817 (2022). https://doi.org/10.1038/s41598-022-14906-3
Received:
Accepted:
Published:
DOI: https://doi.org/10.1038/s41598-022-14906-3
This article is cited by
-
An efficient quantum partial differential equation solver with chebyshev points
Scientific Reports (2023)
-
Extracting a function encoded in amplitudes of a quantum state by tensor network and orthogonal function expansion
Quantum Information Processing (2023)
-
NISQ computing: where are we and where do we go?
AAPPS Bulletin (2022)
Comments
By submitting a comment you agree to abide by our Terms and Community Guidelines. If you find something abusive or that does not comply with our terms or guidelines please flag it as inappropriate.