Variational quantum Crank-Nicolson and method-of-lines schemes for the solution of initial value problems
Francisco Guzman-Cajica, Francisco S. Guzmán · Physical Review A · 2024
In this paper we use a variational quantum algorithm to solve initial value problems with the implicit Crank-Nicolson and the method of lines (MoL) evolution schemes. The unknown functions use a spectral decomposition with the Fourier basis. The examples developed to illustrate the implementation are the advection equation, the wave equation written as a system of first-order coupled equations, and the viscous Burgers equation as a nonlinear case. The problems are solved using (i) standard finite differences as the solution to compare with, (ii) the state vector formalism (SVF), and (iii) the sampling error formalism (SEF). The contributions of this paper include (1) cost functions for generic first order in time partial differential equations (PDEs) using the implicit Crank-Nicholson and the MoL, (2) detailed convergence or self-convergence tests are presented for all the equations solved, (3) a system of three coupled PDEs is solved, (4) solutions using sampling error are presented, which highlights the importance of simulating the sampling process, and (5) a fast version of the SVF and SEF was developed which can be used to test different optimizers faster.