Have a personal or library account? Click to login
Variational Quantum Algorithm for Solving Second-Order Linear Differential Equations Cover

Variational Quantum Algorithm for Solving Second-Order Linear Differential Equations

Open Access
|Jul 2025

Full Article

1.
Introduction

Solving partial differential equations (PDEs) is key to describing various issues in condensed matter physics, fluid simulation, electromagnetic field analysis, and other fields as mathematical models [1]. Therefore, identifying efficient algorithms for solving PDEs is crucial. Thus, numerous studies has explored the numerical analysis of PDEs.

Quantum algorithms (QAs), which are computational algorithms employing quantum computers, have attracted attention owing to their ability to solve specific issues more efficiently compared with classical computers. Notably, QAs have been demonstrated to outperform classical computers in solving certain problems. Hence, QAs have been deployed to solve problems in various fields such as machine learning [2,3], integer factorization [4], and combinatorial optimization [5]. Further, the Harrow–Hassidim–Lloyd (HHL) algorithm [6], a QA for solving linear equations, can solve linear equations obtained via PDEs discretization. However, the HHL algorithm requires a sufficient number of qubits and error correction techniques on quantum computers, which may require a long development time. To resolve this shortcoming, quantum-classical hybrid algorithms, employing noisy intermediate-scale quantum (NISQ) devices [7] with intermediate numbers of qubits, combined with classical computers, have gained attention. Among these quantum-classical hybrid algorithms, the variational quantum algorithms (VQAs) can operate on NISQ devices.

VQAs [8] are algorithms for minimizing objective functions containing approximate solution vectors. These approximate solution vectors are generated by quantum gates (ansatz gates) depending on parameters. The parameter updates are performed using iterative algorithms to minimize the objective function represented by approximate solution vectors. Thus, VQA is highly versatile and has been applied to various tasks such as solving eigenvalue problems using the variational quantum eigenvalue solver [9,10], quantum machine learning [2], and quantum approximate optimization algorithms [5].

To obtain the value of the objective function using VQA, the computation is performed by measuring the expectations. Furthermore, two conventional methods for calculating expectations on a quantum computer are projective measurements and the Hadamard test [11]. To compute expectations using projective measurement and the Hadamard test, the matrices involved must be measurement operators and unitary, respectively. Therefore, to implement VQAs, decomposing a matrix into a linear combination of unitary matrices and measurement operators represents a crucial challenge.

Many researchers have proposed methods for solving linear equations using VQAs [1218]. Notably, Sato et al. proposed VQAs to solve linear equations obtained by the discretization of the Poisson equation [18]. To solve Ax = b for a symmetric positive definite matrix A, the minimizing problem for xAx/2 – xf was solved using VQAs in the previous study, which was aimed at solving the Poisson equation, where xdenotes the conjugate transpose of x. Furthermore, the number of terms involving expectations in the objective function value was accelerated to O(1) regardless of the matrix size by decomposing the coefficient matrix into a linear combination of unitary matrices and measurement operators. However, A must be a symmetric positive definite to ensure its formulation as a convex quadratic programming problem. Additionally, as A in the Poisson equation exhibits a specific structure, extending the methods employed in previous studies to other PDEs may be challenging. For example, for differential equations containing advection terms in fluid simulations, A becomes non-symmetric, thereby complicating the use of existing VQAs to solve the problem.

Thus, we propose VQAs for solving general second-order linear differential equations containing constant coefficients, e.g., the Poisson equation. Generally, second-order linear differential equations containing constant coefficients include advection terms, thus yielding non-symmetric coefficient matrices when discretized. For example, A obtained from the discretization of the Poisson equation with the Dirichlet boundary condition represents a special tridiagonal Toeplitz matrix that is symmetric and positive definite. Conversely the A obtained by discretizing a second-order linear differential equation containing constant coefficients and the Dirichlet boundary condition is a general tridiagonal Toeplitz matrix. To handle the non-symmetric A, we considered the normal equation AAx = Ab for the original linear equation (Ax = b) because AA is always a symmetric positive definite when A is a nonsingular, making it reducible to a convex quadratic programming problem1. Furthermore, solving the normal equation is equivalent to solving the least squares problem for minimizing the norm ∥Ax – b∥. Similar to previous study [18], as matrices AA and A in the normal equation are not unitary matrices, they must be decomposed into linear combinations of unitary matrices and measurement operators. Thus, for A in second-order linear differential equations containing constant coefficients with the periodic boundary condition, we decomposed them into a linear combination of unitary matrices and measurement operators. Furthermore, by adding a correction term to A with the periodic boundary condition, we attempted the decomposition of the A for the case of the Dirichlet boundary condition. However, as the matrices employed for this correction do not possess unitarity and Hermiticity, we proposed a method for converting these correction matrices into projection operators or unitary matrices, ensuring it their applicability even under the Dirichlet boundary condition.

The remainder of this paper is structured as follows: Section 2 presents an overview of the extant studies on VQAs for solving the Poisson equation. Next, Section 3 reports the construction the objective function for the constantcoefficient second-order linear differential equations on the basis of VQAs. Thereafter, we demonstrated the decomposition method for the matrices included in the objective function under the periodic boundary condition. Next, we present the decomposition method for the correction matrices for cases involving the imposition of the Dirichlet boundary condition is imposed on section. Section 4 presents numerical examples using the proposed method implemented by Qiskit in this section. Finally, Section 5 concludes the paper and discussing the future directions.

2.
Variational Quantum Algorithm for the Poisson Equation

Here, we describe VQA for solving the Poisson equation based on Sato et al.’s study [18]. For the domain Ω = (L, R)d, (L, R ∈ ℝ, L < R), the d-dimensional Poisson equation with a given function f : Ω → ℝ is given by the following equation: 1Δu(x)=f(x)xΩ.

To simply explain the previous study, we consider here the Dirichlet boundary condition: u(x)=0xΩ.

For simplicity, we restrict the study to the case where d = 1. Thus, by discretizing Eq. (1) using the finite difference method with the interval-partition width h = (RL)/(N + 1), we derive the following linear equation: 2Au=f, where the matrix A ∈ ℝN×N is a symmetric positive-definite matrix, and u, f ∈ ℝN. Therefore, solving the differential equation Eq. (1) reduces to solving Eq. (2). Furthermore, as matrix A is positive definite and symmetric, solving the linear equation Eq. (2) is equivalent to determining the minimization solution νmin of the following objective function E(ν): E(v):=12vAvvf, where ν and f are assumed to be real vectors, and thus νf = fν.

In the following sections of this paper, we will consider N = 2n with respect to the number of qubits n ∈ ℤ+.

To minimize Ev(ν), the vector ν is assumed to be represented as ν = r |ψ(θ)⟩ and determine νmin from this representation. Here, r ∈ ℝ is the norm of ν, and |ψ(θ)⟩ is a quantum state vector depending on the parameter θ. In this study, |ψ(θ)⟩ generated by unitary matrices U(θ) is conventionally referred to as an ansatz gate, which is constructed by stacking the layers of Ry gates and CNOT gates. Notably, the ansatz parameters θ is given by the following θ=[θ11,,θ12m,θ21,,θ22m,,θn1,,θn2m], where the dimension of the parameter vector θ is linear with respect to the number of Ry gate m and number of qubits n.

On the basis of the foregoing, using r and θ, the objective function Ev (ν) is redefined as follows: 3E(v)=(r,θ)=12r2ψ(θ)| A |ψ(θ) rψ(θ)|f .

By minimizing ℱ(r, θ) with respect to r, we can reduce the problem to a minimization problem with respect to θ. E(θ)=12|ψ(θ)|f|2ψ(θ)|A|ψ(θ).

Furthermore, for any quantum state vector |φ⟩ or |ψ⟩, we define 4|ϕ,ψ:=12(|0|ϕ+|1|ψ).

Then, the following can be obtained using Eq. (4): 5E(θ)=12[ψ(θ),f|XIn|ψ(θ),f]2ψ(θ)|A|ψ(θ).

Furthermore, the quantum state |ϕ, ψ⟩ shown in Eq. (4) is constructed by the quantum circuit in Figure 1. Here, the unitary matrices Uϕ and Uψ satisfy |φ⟩ = Uφ|0⟩n and |ϕ⟩ = Uϕ | 0⟩n, respectively. The construction of multiple controlled-Uϕ and controlled-Uψ requires O(n2) quantum gates and a circuit depth of O(n) [20].

Figure 1.

Quantum circuit diagram for generating |ϕ, ψ⟩.

The coefficient matrix A(d) in the d-dimensional Poisson equation is expressed using matrix A as follows: 6A(d)=AIn(d1)+InAIn(d2)++In(d1)A.

Following Eq. (6), assuming a problem can be formulated in one dimension, it can also be formulated in higher dimensions. Therefore, in this paper, we will discuss the one-dimensional VQA in this paper.

3.
Variational Quantum Algorithms for Second-Order Linear Differential Equations
3.1.
Formulation

We consider the following d-dimensional second-order linear PDEs: 7a·(u(x))+b·u(x)+cu(x)=f(x),xΩ, where a, c ∈ ℝ, b ∈ ℝN, Ω = (L, R)d and f : Ω → ℝ. When a ≠ 0 and c = 0, Eq. (7) represents the steady advection-diffusion equation and when a ≠ 0, c = 0 and b = 0, Eq. (7) represents the d-dimension Poisson equation. We discretize this equation (7) using the central difference method. In one dimension, let the mesh size be h = (RL)/(N + 1). Then, we obtain the following difference equation: aui+12ui+ui1h2+bui+1ui12h+cui=fi,  1iN.

This difference equation is represented by the following linear equation: 8Mu=f, where M ∈ ℝN×N and u, f ∈ ℝN. The components of the coefficient matrix M in Eq. (8) depend on the boundary conditions of PDEs. Additionally, let Mp and Md denote M with the periodic boundary condition and Dirichlet boundary condition, u0 = uN and u0 = uN = 0 respectively. Here, the matrices Mp and Md are given as follows: Mp:=[ αγ000ββαγ0000βα000000αγ0000βαγγ000βα ],Md:=[ αγ0000βαγ0000βα000000αγ0000βαγ0000βα ], where Ω = (0, 1), a mesh size h = 1/(N + 1), α = 2a/h2 + c, β = – b/(2h) – a/h2, and γ = b/(2h) – a/h2. Let us solve the linear equation in Eq. (8). Assuming the matrix M is symmetric positive definite, solving Eq. (8) will be equivalent to minimizing an objective function (v):=12vMvvf.

However, as M is not always a symmetric positive-definite matrix, VQA for the Poisson equation cannot be applied to the optimization problem. Hence, we solve the following normal equation: 9MMu=Mf instead of Eq. (8). Assuming M is nonsingular, the coefficient matrix MM will be a symmetric positive-definite matrix. Thus, we define the objective function E(ν), as follows: 10normal(v):=12vMMvvMf to solve Eq. (9). Further, we express Eq. (10) as a function that depends on θ, similar to the previous section. Thus, we obtain Eq. (11) 11ropt=ψ(θ)|M|fψ(θ)|MM|ψ(θ).

Additionally, we obtain the following objective function ε(θ) by substituting Eq. (11) for Eq. (3) 12(θ)=12[ ψ(θ)|M|f ]2ψ(θ)|MM|ψ(θ).

Thus, Algorithm 1 expresses how to solve second-order linear PDEs using a VQA. Here, the formulation of the gradient of the objective function ▽ε (θ) is discussed in the Appendix A.

Algorithm 1

VQAs for second-order linear PDEs

Require: Objective function ε and gradient ▽ε;

   an initial ansatz parameter θ0 ; a tolerant parameter of gradient norm ϵ

Ensure: Optimized ansatz parameter θopt and an optimized quantum state |ψ(θopt)⟩

 1: while ∥▽ε (θ)∥ ≥ ϵ do

 2:   Encode |ψ(θ)⟩ on a quantum computer

 3:   Evaluate ε(θ) and ▽ε (θ) on a quantum computer

 4:   Update θ using a optimization method employing ε(θ) and ▽ε (θ) on a classical computer.

 5: end while

3.2.
Evaluation of the Objective Function

As M is not unitary, we cannot directly calculate ψ(θ)|MpMp|ψ(θ) and ψ(θ)|Mp|f in Eq. (3) on a quantum computer. Therefore, we first decompose MpMp and Mp into unitary matrices. Mp is decomposed into 13Mp=αIn+βP+γP, where P is a shift operator defined by P:=i=0N1|(i+1)modNi|=[ 000001100000010000001000000100000010 ].

Thus, matrix MM is represented by 14MpMp=(αIn+βP+γP)(αIn+βP+γP)=(α2+β2+γ2)In+α(β+γ)(P++P)+βγ(PP+PP).

Employing Eq. (13). Let us denote |ψ+(θ):=P|ψ(θ),|ψ(θ):=P|ψ(θ) with respect to the quantum state |ψ(θ)⟩. Further, we introduce |ψ+ (θ)⟩ and |ψ – (θ)⟩ newly defined, into the following expectation terms of observable MM: ψ(θ)|MpMp|ψ(θ)=(α2+β2+γ2)+α(β+γ)ψ(θ)|(P+P)|ψ(θ)+βγψ(θ)|(PP+PP)|ψ(θ) respectively. The first term ψ(θ)| (P + P) |ψ(θ)⟩ can yield ψ(θ)|(P+P)|ψ(θ)=ψ(θ)|P|ψ(θ)+ψ(θ)|P|ψ(θ)= ψ(θ)ψ+(θ) + ψ+(θ)ψ(θ) =2ψ+(θ),ψ(θ)|XIn|ψ+(θ),ψ(θ).

The second term ψ(θ)| (PP + PP) |ψ(θ) in Eq. (13) can be evaluated as ψ(θ)|(PP+PP)|ψ(θ)=ψ(θ)|PP|ψ(θ)+ψ(θ)|PP|ψ(θ)= ψ(θ)ψ+(θ) + ψ+(θ)ψ(θ) = ψ(θ)ψ+(θ) + ψ+(θ)ψ(θ) =2ψ+(θ),ψ(θ)|XIn|ψ+(θ),ψ(θ).

From the foregoing, the denominator in Eq. (3) can be decomposed to ψ(θ)|MpMp|ψ(θ)=(α2+β2+γ2)In+2α(β+γ)ψ+(θ),ψ(θ)|XIn|ψ+(θ),ψ(θ)+2βγψ+(θ),ψ(θ)|XIn|ψ+(θ),ψ(θ), and we can calculate Eq. (14) on a quantum computer, where each term in the equation is represented as the expectation of the Pauli matrices. Thereafter, we evaluate the numerator in Eq. (3). The numerator can be decomposed into ψ(θ)|Mp|f=αψ(θ)f+βψ(θ)|P|f+γψ(θ)|P|f=αψ(θ)f+β ψ+(θ)f +γ ψ(θ)f =αψ(θ),f|XIn|ψ(θ),f+βψ+(θ),f|XIn|ψ+(θ),f+γψ(θ),f|XIn|ψ(θ),f.

Note that if |ψ(θ)⟩, |ψ+ (θ)⟩, |ψ(θ)⟩ and |f⟩ are real-valued vector, then the inner products ψ(θ)|f⟩, ⟨ψ+(θ)|f⟩, ⟨ψ(θ)|f⟩ are commutative.

3.3.
Dirichlet Boundary Condition

The proposed method can be applied to the Dirichlet boundary condition. Notably, Md can also be decomposed into 15Md=αIn+βP+γPMBC, where the matrix MBC is given as follows: MBC=[ 00000β000000000000000000000000γ00000 ]=β|0N1|+γ|N10|.

Thus, MdMd can be decomposed into 16MdMd=(αIn+βP+γPMBC)(αIn+βP+γPMBC)=MpMpMpMBCMBCMp+MBCMBC.

To calculate the expectation of Eq. (16) on a quantum computer, we decompose the matrix MBC into symmetric and non-symmetric matrices, ν and W, respectively. 17MBC=β+γ2V+βγ2W.

Here, ν and W are given as follows: V=[ 000001000000000000000000000000100000 ]=|0N1|+|N10|,W=[ 000001000000000000000000000000100000 ]=|N10||0N1|.

To compute the numerator and denominator of ε(θ) (Eq. (12)) on a quantum computer, we introduce two decomposition methods for V and W.

3.3.1.
Computing the Numerator of the Objective Function

Employing Eq. (16), the numerator of Eq. (12) is decomposed into the following terms: 18ψ(θ)|MdMd|ψ(θ)=ψ(θ)|MpMp|ψ(θ)ψ(θ)|MpMBC+MBCMp|ψ(θ)+ψ(θ)|MBCMBC|ψ(θ).

The first term in Eq. (18) can be computed using the proposed method with the periodic boundary condition. Therefore, the second term in Eq. (18) is decomposed into 19ψ(θ)|MpMBCMBC+Mp|ψ(θ)=β+γ2ψ(θ)|MpV+VMp|ψ(θ)+βγ2ψ(θ)|MpW+WMp|ψ(θ)α(β+γ)ψ(θ)|V|ψ(θ)+ββ+γ2ψ(θ)|PV+VP|ψ(θ)+ββγ2ψ(θ)|PW+WP|ψ(θ)+γβ+γ2ψ(θ)|PV+VP|ψ(θ)+γβγ2ψ(θ)|PW+WP|ψ(θ).

We perform the decomposition using Eq. (17). Afterward, we extract the following outer products with a computational basis from the matrix included in each term in Eq. (19): PV+VP=2|N1N1|+|N20|+|0N2|,PV+VP=2|00|+|1N1|+|N11|,PW+WP=|N20|+|0N2|2|N1N1|,PW+WP=|1N1|+|N11|2|00|.

To compute the expectations in a quantum computer, these outer products must be denoted as measurement operators. Further, by performing matrix decomposition using measurement operators, we localize the quantum circuits and reduce the number of measurements involved in expectation-value measurement.

Here, we define the measurement operators |GHZ⟩, |GHZ+⟩, and |GHZ⟩, as 20|GHZ:=|0+|N12=UGHZ|0, 21|GHZ+:=|1+|N12=UGHZ+|0, 22|GHZ:=|0+|N22=UGHZ|0.

Here these unitary matrices, UGHZ, UGHZ+, UGHZ ∈ ℝN×N are equivalent to the quantum circuits shown in Figures 2, 3 and 4, respectively: these quantum circuits are constructed using 𝒪(n) fundamental quantum gates.

Figure 2.

Quantum circuit diagram for UGHZ

Figure 3.

Quantum circuit diagram for UGHZ+

Figure 4.

Quantum circuit diagram for UGHZ

Furthermore, these outer products can be introduced as projection operators using Eqs. (20) and (21) and (22). |N10|+|0N1|=2|GHZGHZ||00||N1N1|,|N11|+|1N1|=2|GHZ+GHZ+||11||N1N1|,|N20|+|0N2|=2|GHZGHZ||00||N2N2|.

From the above, Eq. (19) is given as follows, and the expectation can be obtained from the projection measurement for each term. ψ(θ)|MpMBC+MBCMp|ψ(θ)=2α(β+γ)|ψ(θ)|UGHZ|0|2+2βγ|ψ(θ)|UGHZ+|0|2+2βγ|ψ(θ)|UGHZ|0|2{α(β+γ)+γ(β2γ)}|ψ(θ)|0|2{α(β+γ)+β(γ2β)}|ψ(θ)|N1|2βγ|ψ(θ)|1|2βγ|ψ(θ)|N2|2.

The third term of Eq. (18) is given as follows: ψ(θ)|MBCMBC|ψ(θ)=γ2|ψ(θ)|0|2+β2|ψ(θ)|N1|2.

From the above, Eq. (18) is decomposed into the following terms: ψ(θ)|MdMd|ψ(θ)=(α2+β2+γ2)+α(β+γ)ψ(θ)|(P+P)|ψ(θ)+βγψ(θ)|(PP+PP)|ψ(θ)2α(β+γ)| ψ(θ)|UGHZ |0|22βγ|ψ(θ)|UGHZ|0|22βγ|ψ(θ)|UGHZ+|0|2+{α(β+γ)+γ(βγ)}|ψ(θ)0|2+βγ|ψ(θ)1|2+βγ|ψ(θ)N2|2+{α(β+γ)+β(γβ)}|ψ(θ)N1|2.

3.3.2.
Computing the Denominator of the Objective Function

Employing Eq. (15), we decomposed the denominator of Eq. (12) as follows: 23ψ(θ)|MBC|f=β+γ2ψ(θ)|V|f+βγ2ψ(θ)|W|f.

The given matrix factorization is limited to cases where V and W could be decomposed into measurement operators, represented as the expected values of V and W, respectively. Alternatively, we consider the decomposition method for calculation using a quantum computer. Furthermore, matrices V and W can be decomposed as follows: V=VBC+VBC2,W=WBC+WBC2, where the unitary matrices VBC and WBC are defined VBC:=[ 0000000100000010000001000000100000010000001000000100000010000000 ],WBC:=[ 0000000100000010000001000000100000010000001000000100000010000000 ].

From the above, the expectation (23) is decomposed into the linear combination of the expectation of VBC and WBC. ψ(θ)|MBC|f=β+γ2(ψ(θ)|VBC|f+ψ(θ)|VBC|f)+γβ2(ψ(θ)|WBC|fψ(θ)|WBC|f)=β+γ4(ψ(θ),VBCf|XIn|ψ(θ),VBCf+ψ(θ),VBCf|XIn|ψ(θ),VBCf)+γβ4(ψ(θ),WBCf|XIn|ψ(θ),WBCfψ(θ),WBCf|XIn|ψ(θ),WBCf).

Furthermore, the quantum circuits corresponding to VBC and WBC are shown in Figures 5 and 6, respectively. The quantum circuits of VBC and WBC comprise n – 1 control bits and one target multi-Toffoli gate. Since VBC and WBC include multi-controlled Toffoli gates, they require a circuit depth of O(n) and are composed of O(n) elementary quantum gates, with an ancilla qubit [21]. Furthermore, considering the circuit cost of Eq. (4), one can see that a total of O(n2) elementary quantum gates is required. Therefore, from the perspective of gate implementation costs [22], decomposing into projection operators is effective for obtaining the expected values of matrices MBC and MBC .

Figure 5.

Quantum circuit diagram of VBC.

Figure 6.

Quantum circuit diagram of WBC.

Classical shadows are a useful technique for efficiently estimating expectation values [23]. In particular, by using random Clifford circuits, it is possible to compute expectation values with respect to arbitrary matrices. However, since the upper bound of the variance for random Clifford measurements scales as O(tr(M2)), the variance depends on the values of α, β, and γ. That is, as these values increase, the variance also increases. In contrast, in our method, the error in the expectation value does not depend on the magnitude of the individual matrix components (α, β, and γ). Therefore, when tr(M) is large, our method can be considered advantageous

Additionally, expectation value estimation using the Extended Bell Measurement (XBM) is also a useful approach [24]. XBM is a technique for estimating expectation values of banded matrices and can compute expectation values involving tridiagonal matrices using O(n) measurement operators. The measurement operators used in XBM consist of at most n – 1 CNOT gates and one Hadamard gate. XBM is applicable to general problems including Eq. (7). However, simultaneous measurements using XBM yield not only the matrix elements required for computation but also additional and irrelevant elements, which may lead to a higher number of shots required to compute the expectation values. In contrast, our method, particularly with the periodic boundary condition, is tailored for second-order linear differential equations with constant coefficients, and therefore avoids computing irrelevant elements. We will investigate the relationship between the number of unnecessary elements and the required number of shots elsewhere in the future.

4.
Numerical Experiments

In this section, we present numerical-analysis experiments using the proposed method. In this experiment, a quantum computing simulation is performed using a classical computer. Further, Qiskit (version 0.38.0) is used as the quantum computation library [25], and Qiskit provided a simulator backend. In this experiment, we exclusively employed the Qiskit StatevectorSimulator. As StatevectorSimulator performed matrix-vector operations internally, it does not account for the sampling errors that may arise in the calculation of the expectation value.

The initial values of the variational parameters were randomly selected from the 0θit4π range. Additionally, the BFGS method, a type of gradient-descent method, was employed as the parameter-update method.

Further, we constructed a specific ansatz gate layer (Figure 7) and the number of the ansatz-gate layer m was 3.

Figure 7.

Quantum circuit diagram for the ansatz gate U(θ).

To compare the numerical solutions obtained with the proposed method, the solutions obtained using LU decomposition for the linear equation (Eq. (8)) were utilized.

The following PDEs was considered for the numerical calculations: 24d2udx2+0.2dudx+0.1u=cf, where the boundary condition in Eq. (24) was the Dirichlet boundary condition. Furthermore, the right-hand vector is defined, as follows: |f=2n/2cf(Hn|0n), where the matrix H is the Hadamard gate and the coefficient cf = 0.1.

Figure 8 shows that the solution obtained using the proposed method was plotted, exhibiting significant agreement with the analytical solution. Furthermore, Table 1 shows that regardless of the increase in the number of qubits, ϵc and ϵq exhibited nearly identical values, indicating that the solution obtained using the proposed method performed at a comparable level with that obtained via classical computation. Therefore, we concluded that the proposed method functioned appropriately as a method for solving second-order linear differential equations with constant coefficients.

Figure 8.

Plot of the analytical solution of Eq. (24) for 5 qubits, and the solution obtained using the proposed method.

Table 1.

Relative errors, ϵc and ϵ for n = 3, 4 and 5 qubit cases.

the number of qubitsthe relative error ϵcthe relative error ϵq
3 qubits7.8455 × 10−47.8478 × 10−4
4 qubits2.2014 × 10−42.2027 × 10−4
5 qubits5.8441 × 10−54.4997 × 10−4
5.
Conclusion

In this study, we proposed a VQA for solving constant-coefficient second-order linear differential equations with the periodic and the Dirichlet boundary condition, and our finding contributed the following two points to the extant literature:

  • We provided ε(θ) for the normal equations corresponding to the discretized linear equations and demonstrated a matrix decomposition method for reducing them to a computationally feasible form on a quantum computer.

  • For the case involving the imposition of the Dirichlet boundary condition, we proposed a method that focused on the difference between the matrices obtained with the periodic and Dirichlet boundary condition, following by decomposing this difference into a linear combination of unitary matrices and measurement operators.

To solve the linear equation, Mu = f, the condition number is given by κ(M)=M· M1 .

When the condition number κ was large, the numerical solution tended to be unstable. Particularly, as κ of the normal equations MMu = Mf(κ(MM) was approximately the square of κ(M), directly solving the normal equations presented a numerically unstable problem. In classical computation, preconditioning is conventionally performed to improve κ. Therefore, QAs that improve κ of the coefficient matrices and reduce the computational cost of the objective function. However, studying the preconditioning matrices for efficient quantum computation is a challenging task, requiring entirely different approaches from the existing preconditioning methods [19]. In VQAs, It is important to avoid barren plateaus when computing the objective function is an important issue. Barren plateaus refer to the phenomenon where the gradient of the objective function vanishes exponentially with respect to the number of qubits. This issue arises due to the execution of deep quantum circuits or measurements involving global quantum operations [26]. Although a complete solution to the barren plateaus problem has not yet been discovered, strategies that mitigate its effects are preferable. For example, designing ansatz gates specialized for specific problems has been proposed as a potential approach [27].

DOI: https://doi.org/10.2478/qic-2025-0012 | Journal eISSN: 3106-0544 | Journal ISSN: 1533-7146
Language: English
Page range: 232 - 247
Submitted on: Feb 17, 2025
Accepted on: Apr 17, 2025
Published on: Jul 1, 2025
Published by: Cerebration Science Publishing Co., Limited
In partnership with: Paradigm Publishing Services
Publication frequency: 1 issue per year
Related subjects:

© 2025 Ryo Sugaya, Tomohiro Sogabe, Tomoya Kemmochi, Shao-Liang Zhang, published by Cerebration Science Publishing Co., Limited
This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 License.