Quantum variational solving of nonlinear and multidimensional partial differential equations (2024)

Physical Review A

covering atomic, molecular, and optical physics and quantum information
  • Highlights
  • Letters
  • Recent
  • Accepted
  • Collections
  • Authors
  • Referees
  • Search
  • Press
  • About
  • Editorial Team

Quantum variational solving of nonlinear and multidimensional partial differential equations

Abhijat Sarma, Thomas W. Watts, Mudassir Moosa, Yilian Liu, and Peter L. McMahon
Phys. Rev. A 109, 062616 – Published 21 June 2024
  • Article
  • References
  • No Citing Articles

PDFHTMLExport Citation

Quantum variational solving of nonlinear and multidimensional partial differential equations (1)

Abstract
Authors
Article Text
  • INTRODUCTION
  • GENERAL ALGORITHMIC FRAMEWORK
  • ANSATZ SELECTION
  • OPTIMIZATION
  • SOLVING THE BARLES-SONER NONLINEAR…
  • SOLVING THE 2D LINEAR BLACK-SCHOLES…
  • SOLVING THE BUCKMASTER EQUATION
  • SOLVING THE DETERMINISTIC…
  • EXECUTION ON HARDWARE
  • CONCLUSION AND OUTLOOK
  • APPENDICES
  • References

    Quantum variational solving of nonlinear and multidimensional partial differential equations (2)

    Abstract

    A variational quantum algorithm for numerically solving partial differential equations(PDEs) on a quantum computer was proposed by Lubasch etal. [Phys. Rev. A 101, 010301(R) (2020)]. In this paper we generalize the method introduced by Lubasch etal. to cover a broader class of nonlinear PDEs as well as multidimensional PDEs and study the performance of the variational quantum algorithm on several example equations. Specifically, we show via numerical simulations that the algorithm can solve instances of the single-asset Black-Scholes equationwith a nontrivial nonlinear volatility model, the double-asset Black-Scholes equation, the Buckmaster equation, and the deterministic Kardar-Parisi-Zhang equation. Our simulations use up to n=12 Ansatz qubits, computing PDE solutions with 2n grid points. We also perform proof-of-concept demonstrations with a trapped-ion quantum processor from IonQ [Nat. Commun. 10, 5464 (2019)], showing accurate computation of two representative expectation values needed for the calculation of a single time step of the nonlinear Black-Scholes equation. Through our classical simulations and demonstrations on quantum hardware, we identify and discuss several open challenges for using quantum variational methods to solve PDEs in a regime with a large number (much greater than 220) of grid points, but also a practical number of gates per circuit and circuit shots.

    • Quantum variational solving of nonlinear and multidimensional partial differential equations (3)
    • Quantum variational solving of nonlinear and multidimensional partial differential equations (4)
    • Quantum variational solving of nonlinear and multidimensional partial differential equations (5)
    • Quantum variational solving of nonlinear and multidimensional partial differential equations (6)
    • Quantum variational solving of nonlinear and multidimensional partial differential equations (7)
    • Quantum variational solving of nonlinear and multidimensional partial differential equations (8)
    • Quantum variational solving of nonlinear and multidimensional partial differential equations (9)

    6 More

    • Received 25 February 2024
    • Accepted 28 May 2024

    DOI:https://doi.org/10.1103/PhysRevA.109.062616

    ©2024 American Physical Society

    Physics Subject Headings (PhySH)

    1. Research Areas

    Quantum circuitsQuantum computationQuantum information processing

    Quantum Information, Science & Technology

    Authors & Affiliations

    Abhijat Sarma1,*, Thomas W. Watts2, Mudassir Moosa1,3, Yilian Liu2, and Peter L. McMahon2,†

    • *Contact author: as3232@cornell.edu
    • Contact author: pmcmahon@cornell.edu

    Article Text (Subscription Required)

    Click to Expand

    References (Subscription Required)

    Click to Expand

    Issue

    Vol. 109, Iss. 6 — June 2024

    Quantum variational solving of nonlinear and multidimensional partial differential equations (10)
    Reuse & Permissions
    Access Options
    Quantum variational solving of nonlinear and multidimensional partial differential equations (13)

    Authorization Required

    Other Options
    • Buy Article »
    • Find an Institution with the Article »

    ×

    Download & Share

    PDFExportReuse & Permissions

    ×

    Images

    • Quantum variational solving of nonlinear and multidimensional partial differential equations (14)

      Figure 1

      Algorithmic framework. (a)Quantum variational-PDE-solving workflow. Here Û is an Ansatz gate, and λ0 and λ are the variational parameters to be trained to represent our function of interest, with a tilde denoting the previous time step's parameters; Cu is the main cost function to be minimized, returning the optimal state after one time step. First, read in initial Ansatz parameters to represent u(ti). Decompose the discretized (nonlinear) differential operator Ô into adder and diagonal gates. By training intermediate quantum states, a much broader class of nonlinearities can be represented than possible through naive applications of the adder and diagonal gates as considered in Ref.[1]. Then use Ô to construct a cost function which is then optimized to find |u from |ũ, as in Ref.[1]. Here the cost function shown represents the backward Euler discretization scheme, though it can easily be adapted to other schemes. Repeat for the desired number of time steps and then extract the desired classical data from the solution at the final time step |u(tf). (b)Decomposition of the operator Ô into adder and diagonal gates via training intermediate quantum states. Here θ0i and θi are the variational parameters corresponding to intermediate states |χi, which are utilized in diagonal gates D̂χito synthesize the full nonlinear operator Ô. Cost functions Cχi are iteratively constructed utilizing the adder gate and the diagonal gates of states already trained, which are then minimized to return the optimal intermediate parameters to represent any necessary nonlinearities or inhom*ogeneous terms. The number of intermediate states N and the functions fk and f will depend on the exact form of Ô. (c)Example of the estimation of a typical expectation value appearing in the cost functions via the Hadamard test. Here |ψ and |ϕ represent the normalized versions of |u and |χ, respectively.

      Reuse & Permissions

    • Quantum variational solving of nonlinear and multidimensional partial differential equations (15)

      Figure 2

      Expressibility of the Ansatz vs the number of parameters. Here n is the number of qubits, m is the number of ZGR qubits for the ZGR QFT, and d is the depth for the ULA. The V represents the function of interest for the Black-Scholes problem (2), while χ is an intermediate state used to construct the nonlinearity in the problem. (a)and (b)The real-valued ZGR QFT Ansatz is able to accurately approximate the continuous terminal condition for |V (the put option) and (c)and (d)the universal layered Ansatz is able to accurately approximate the sparse, discontinuous terminal condition for |χ. We choose these terminal conditions as a representative example for the expressibility [28] of the Ansätze because they are the least smooth functions considered in the paper. All simulations were conducted with n=8 Ansatz qubits, except for the plot in (d), where n varies. The ZGR QFT has the useful property that its expressibility as a function of the number of parameters is invariant with respect to n, assuming that the function being approximated is continuous. This follows from the fact that, for a constant m, the ZGR QFT will approximate the target distribution with the same number of Fourier coefficients regardless of n, meaning that the Ansatz does not become more difficult to train as the number of qubits increases. For the ULA, the necessary depth d to get a good approximation of the target distribution scales roughly linearly with the number of qubits, making the necessary number of parameters O(n2).

      Reuse & Permissions

    • Quantum variational solving of nonlinear and multidimensional partial differential equations (16)

      Figure 3

      Best cost-function value found by the optimizer vs the budget. Here budget refers to the total number of cost-function evaluations that the optimizer software is allowed to make per PDE time step in the PDE solving (step 3 in Fig.1). (In our circuit simulations, to evaluate the cost function, we directly computed expectation values, so this plot has nothing to do with the number of times a circuit would need to be executed on quantum hardware to estimate each expectation value.) This figureshows how difficult it is for different optimizers to optimize the (a)ZGR QFT Ansatz and (b)ULA. Both Anszätze were set to use n=8 qubits, with m=6 for the ZGR QFT and d=6 for the ULA. For the ZGR QFT only Differential Evolution and NGOpt converged to the global minimum, and for the ULA only NGOpt and Implicit Filtering reached the global minimum. The optimizations were performed for the first time step in solving the nonlinear Black-Scholes equation

      Reuse & Permissions

    • Quantum variational solving of nonlinear and multidimensional partial differential equations (17)

      Figure 4

      1D nonlinear Black-Scholes equationtime evolution. The (a)quantum (n=8) and (b)classical solutions closely align, with a final relative error of 2.36% after the last time step, calculated as (VquantumVclassical)/||Vclassical||, giving an error per time step of 0.236%. At the boundaries, most of the error accumulates due to the Gibbs phenomenon and the imperfect approximation of the Dirichlet boundary condition. There is also relatively large error due to the Gibbs phenomenon near S=50, where the terminal condition has a discontinuous derivative. (c)Absolute error.

      Reuse & Permissions

    • Quantum variational solving of nonlinear and multidimensional partial differential equations (18)

      Figure 5

      Effect of nonlinear volatility σ2 in the Black-Scholes equation(first time step, n=8 qubits). The difference between the solutions to the nonlinear and linear Black-Scholes equationsVnonlinearVlinear is plotted. The key feature of the nonlinear volatility (as described in Ref.[30]) is that it causes the price of the option to sharply increase compared to the linear model, peaked asymmetrically near the discontinuity in the terminal condition (around S=50). As evident from the plot, this qualitative behavior is reflected in the quantum solution, which differs from the ideal solution mostly due to edge effects, an artifact of the Fourier-based nature of the Ansatz and the Gibbs phenomenon. The rest of the error stems from imperfect optimization. The ideal plot was calculated by classically solving numerically for the first time step of the nonlinear Black-Scholes time evolution where the terminal condition is given by the (imperfect) ZGR QFT representation of the put option, and we use the reflected periodic boundary instead of Dirichlet boundary conditions so that errors associated with the optimization are not confounded with errors associated with the readin of the terminal condition or the imperfect boundary condition.

      Reuse & Permissions

    • Quantum variational solving of nonlinear and multidimensional partial differential equations (19)

      Figure 6

      2D linear Black-Scholes equationsolution (final time step). (a)The quantum solution has an error of 2.60% compared with the classical, giving an error per time step of 0.260% (nx=6 and ny=6). As in the 1D case, most of the error is near the boundaries due to the approximate boundary conditions. (b)The classical solution is calculated using the backward Euler scheme with the exact initial condition. (c)Absolute error.

      Reuse & Permissions

    • Quantum variational solving of nonlinear and multidimensional partial differential equations (20)

      Figure 7

      Buckmaster equationtime evolution. (a)The quantum solution has an error of 6.54% compared with the classical, giving an error per time step of 0.0262% (n=5). The error is large near the boundaries despite the periodic boundary condition because any errors that accrue naturally near the boundaries as a result of the imperfect initial condition or optimization will grow larger over time due to the Gibbs phenomenon. (b)The classical solution is calculated using the forward Euler scheme with the exact initial condition. (c)Absolute error.

      Reuse & Permissions

    • Quantum variational solving of nonlinear and multidimensional partial differential equations (21)

      Figure 8

      KPZ equationtime evolution. (a)The quantum solution has an error of 0.415% compared with the classical, giving an error per time step of 0.00208% (n=5). (b)The classical solution is calculated using the forward Euler scheme with the exact initial condition. (c)Absolute error.

      Reuse & Permissions

    • Quantum variational solving of nonlinear and multidimensional partial differential equations (22)

      Figure 9

      Analysis of Buckmaster cost-function estimation. We estimated the cost function by estimating each relevant expectation value using a binomial experiment with the given number of shots, effectively replicating what the output from a noiseless quantum computer would be. We repeat this experiment 100 times to get 100 different estimates of the cost function. (a)Average fractional error, defined as the average of |CestCexact|/|Cexact| over all 100 trials as a function of shots. The slope of each line in the log-log plot is very close to 0.5, while the y intercept is exponentially increasing with the number of qubits, exhibiting a dependence of error proportional to en(shots)1/2. This suggests that to achieve an average error of ε in the estimation of the cost function, one needs O(enε2) shots (ignoring the effect of noise from hardware imperfections). (b)Scatter plot of all 100 samples of the cost function with 108 shots for each number of qubits. The estimations of the cost function tend to exponentially deviate from the true value as the number of qubits increases.

      Reuse & Permissions

    • Quantum variational solving of nonlinear and multidimensional partial differential equations (23)

      Figure 10

      Estimation of expectation values on a trapped-ion processor: (a)ψ|Â|ψ and (b)ψ|D̂ϕ|ψ. The data were generated by runs on an 11-qubit trapped-ion device offered by IonQ [22]. The first expectation value was calculated with two Ansatz qubits using the ULA. The second was calculated with one Ansatz qubit, using a single Ry gate as the Ansatz. The circuits are shown in Appendixpp7. To mitigate the errors in the estimation of the expectation values, we ran each circuit with one set of parameters for which the expectation value is known, in order to estimate the damping factor [33] of the circuits. We then ran the circuits with the true set of parameters and divided by the damping factor to recover a better estimate of the true expectation value. Using this method, we found errors of 0.552% and 1.56% in the estimation of the first and second expectation values, respectively.

      Reuse & Permissions

    • Quantum variational solving of nonlinear and multidimensional partial differential equations (24)

      Figure 11

      Real-valued ZGR QFT Ansatz circuit diagram, displayed here with n=7 and m=3. The generalization for arbitrary m and nm+2 is straightforward. Note that the lines through the adder gate mean that the adder is not acting on the corresponding qubits. One can straightforwardly verify that the gates before the QFT prepare a state proportional to |ψf.

      Reuse & Permissions

    • Quantum variational solving of nonlinear and multidimensional partial differential equations (25)

      Figure 12

      ULA circuit diagram. Here the ULA with n=5 qubits and depth d=2 is displayed. Each SO(4) gate contains six different parameters, giving a total of 6(n1)d parameters.

      Reuse & Permissions

    • Quantum variational solving of nonlinear and multidimensional partial differential equations (26)

      Figure 13

      Circuit diagrams for Fig.10: (a)two-qubit-controlled adder implemented by the Toffoli and cnot gates for expectation value ψ|Â|ψ and (b)bottom ancilla qubit used to implement the controlled diagonal gate for expectation value ψ|D̂ϕ|ψ. Both expectation values are calculated using the Hadamard test.

      Reuse & Permissions

    ×

    Quantum variational solving of nonlinear and multidimensional partial differential equations (2024)

    References

    Top Articles
    Latest Posts
    Article information

    Author: Carlyn Walter

    Last Updated:

    Views: 5685

    Rating: 5 / 5 (70 voted)

    Reviews: 85% of readers found this page helpful

    Author information

    Name: Carlyn Walter

    Birthday: 1996-01-03

    Address: Suite 452 40815 Denyse Extensions, Sengermouth, OR 42374

    Phone: +8501809515404

    Job: Manufacturing Technician

    Hobby: Table tennis, Archery, Vacation, Metal detecting, Yo-yoing, Crocheting, Creative writing

    Introduction: My name is Carlyn Walter, I am a lively, glamorous, healthy, clean, powerful, calm, combative person who loves writing and wants to share my knowledge and understanding with you.