Variational fast forwarding for quantum simulation beyond the coherence time

Trotterization-based, iterative approaches to quantum simulation (QS) are restricted to simulation times less than the coherence time of the quantum computer (QC), which limits their utility in the near term. Here, we present a hybrid quantum-classical algorithm, called variational fast forwarding (VFF), for decreasing the quantum circuit depth of QSs. VFF seeks an approximate diagonalization of a short-time simulation to enable longer-time simulations using a constant number of gates. Our error analysis provides two results: (1) the simulation error of VFF scales at worst linearly in the fast-forwarded simulation time, and (2) our cost function’s operational meaning as an upper bound on average-case simulation error provides a natural termination condition for VFF. We implement VFF for the Hubbard, Ising, and Heisenberg models on a simulator. In addition, we implement VFF on Rigetti’s QC to demonstrate simulation beyond the coherence time. Finally, we show how to estimate energy eigenvalues using VFF.

Simulating the dynamics of a quantum system for time T typically requires Ω(T ) gates so that a generic Hamiltonian evolution cannot be achieved in sublinear time.This result is known as the 'No Fast Forwarding Theorem' and holds both for a typical unknown Hamiltonian [26] and for the query model setting [27].However, there are particular Hamiltonians that can be fast forwarded which means that the quantum circuit depth does not need to grow significantly with simulation time.Hamiltonians * The first two authors contributed equally to this work.that allow fast-forwarding are precisely those that lead to violations of time-energy uncertainty relations and equivalently allow for precise energy measurements [26].For example, commuting local Hamiltonians [26], quadratic fermionic Hamiltonians [26], and continuous-time quantum walks on particular graphs [28] can all be fast forwarded.In addition, Ref. [29] exploited the exact solvability of the transverse Ising model to formulate a quantum circuit for its exact diagonalization, allowing for fast forwarding.This circuit was used to simulate the Ising model on Cloud QCs [30].A subspace-search variational eigensolver was employed in [25] in their Subspace Variational Quantum Simulation (SVQS) algorithm to fast forward low-lying states in a quantum system.In general, it remains an open problem to determine the precise form of Hamiltonians that can be fast forwarded.
The advantage of fast forwarding, if possible, for nearterm QCs is that the simulation time T can be much longer than the coherence time τ of the QC performing the simulation.This is because T is just a parameter that is set 'by hand' in a fixed-depth quantum circuit [25,29].
Previous results analyze fast forwarding of Hamiltonians mostly in a computational complexity setting [26,27,31] in which the asymptotic scaling of the runtime of quantum circuits implementing a simulation is important.For near-term devices the overhead of constant factors becomes significant.Therefore we ask the following core question: Can we fast forward the evolution of a Hamiltonian beyond the coherence time of a near-term device using a variational algorithm?
In this paper, we introduce a variational, hybrid quantum-classical algorithm (VHQCA) that we call Variational Fast Forwarding (VFF).We envision it to be most useful for implementing quantum simulations on nearterm, NISQ computers.However, it could also have uses in fault-tolerant QS.It is distinct from SVQS [25] in that our method searches for an approximate diagonalization of an entire QS unitary, rather than for a finite set of low-lying states.Most importantly, we analyze the sim-FIG.1.The concept of Variational Fast Forwarding (VFF).(A) A Trotterization-based quantum simulation with N = 5 timesteps.This simulation runs past the coherence limit of the quantum architecture.(B) A VFF-based quantum simulation.An approximate diagonalization of a short-time simulation is found variationally.Using the eigenvector W and diagonal D unitaries that were learned, an arbitrary length simulation is implemented by modifying the parameters in D. As long as VFF results in few enough gates that the circuit does not exceed the coherence time, longer simulations can be performed than the standard method in (A).
ulation errors produced by VFF and guarantee a desired accuracy for the simulation once a termination condition is achieved.This is possible due to the operational meaning of our cost function.In contrast, low-energy subspace approaches as in SVQS may not be able to guarantee a desired simulation error, since the cost function (i.e., the energy) does not carry an obvious operational meaning.
The basic idea of VFF is depicted in Fig. 1.In what follows, we discuss the ansatz, cost function, training method, and error analysis of VFF in Sec.II, while Sec.III presents our implementations of VFF on a simulator and on Rigetti's QC.

A. Overview
Given a Hamiltonian H on a d = 2 n dimensional Hilbert space (i.e., on n qubits) evolved for a short time ∆t with the simulation unitary e −iH∆t , the goal is to find an approximation that allows the simulation at later times T to be fast forwarded beyond the coherence time τ .Figure 2 schematically shows the VFF algorithm, which consists of the following steps: 1. Implement a unitary circuit U (∆t) to approximate e −iH∆t , the simulation at a small time step.
2. Compile U (∆t) to a diagonal factorization V = W DW † ≈ e −iH∆t with circuit depth L.
3. Approximately fast forward the quantum simulation at large time T = N ∆t using the same circuit of depth L: e −iHT ≈ W D N W † .
Typically U (∆t) will be a single-timestep Trotterized unitary approximating e −iH∆t .We variationally search for an approximate diagonalization of U (∆t) by compiling it to a unitary with a structure of the form with α = (θ, γ) being a vector of parameters.Here, D(γ, ∆t) is a parameterized unitary composed of commuting unitaries that encode the eigenvalues of U (∆t) while W (θ) is a parameterized unitary matrix consisting of corresponding eigenvectors.In Sec.II B we describe layered structures that provide ansätze for the circuits W (θ) and D(γ, ∆t).
To approximately diagonalize U (∆t), the parameters α = (θ, γ) are variationally optimized via gradient descent to minimize a cost function C LHST (U (∆t), V ) that can be evaluated using a short-depth quantum circuit called the Local Hilbert-Schmidt Test (LHST) [32] shown in Fig. 2(c).The compilation procedure we employ to approximate U (∆t) by V (α, ∆t) makes use of the Quantum-Assisted Quantum Compiling (QAQC) algorithm [32], that was later shown to be robust to quantum hardware noise [33].In Sec.II C and Sec.II D, we elaborate on our cost function and optimization method.
If we can find such an approximate diagonalization for U (∆t) then, for any total simulation time, T = N ∆t, we have: Hence, a QS for any total time, T , may be performed with a fixed quantum circuit structure as depicted in Fig. 2(d).
In Sec.II E, we perform an error analysis to investigate how the approximate equalities in (3) and (4) affect the overall simulation error.

B. Ansatz
As with many VHQCAs, it is natural to employ a layered gate structure for W (θ) and D(γ, ∆t), with the number of layers being a refinement parameter.(d) Output: Fast Forwarded Simulation Circuit to evaluate cost and gradients Approximately simulate H for time T = N t using The variational loop is exited when a termination condition given by ( 26) is reached, which guarantees that a user-defined bound on the average fidelity F (T ) is achieved.(d) After the termination condition is reached, the optimal parameters (θopt, γopt) are used to implement a fast-forwarded simulation, with the fast-forwarding error growing sub-linearly in the simulation time (see Eq. ( 22)).The fast-forwarding is performed by modifying the parameters of the diagonal unitary, D(γopt, ∆t) → D(N γopt, ∆t), producing a quantum simulation unitary, W (θopt)D(N γopt, ∆t)W † (θopt).
is equivalent to finding a Walsh series approximation [34] where q = n, G and Z k are diagonal operators with the Pauli operator Z k acting on the k-th qubit, and j k is the k-th bit in a bitstring j.Efficient quantum circuits for minimum depth approximations of D may be obtained by resampling the function on the diagonal of G at sequencies lower than a fixed threshold, with q = k, with k n.The resampled diagonal takes the same form as (6) but with q = k.The error after resampling is k sup x |G (x)|/2 k , where we have introduced a coordinate along the diagonal, x.While we do not know G, we can assume a particular ansatz for terms to include in the expansion.
In all of our implementations, we use a re-ordering of terms in Eq. ( 6).Namely, we take where S m is a set of all indices j such that 7) are organized in increasing order.We truncate the above product to a small number (up to l = 2) of initial l-local terms.The accuracy of the approximation is controlled by truncating the expansion in Eq. (7).The above expansion may be more suited than Eq. ( 6) for quantum many-body Hamiltonians.For instance, it is known that the quantum Ising model in a transverse field can be diagonalized exactly by keeping only 1-local terms.

Ansatz for W
Let us now consider an ansatz for W (θ).With the Baker-Campbell-Hausdorff formula we may generate any eigenvector unitary, W (θ), by appropriately interleaving non-commuting unitaries [7,32].In general, this requires order d 2 parameterized operations.Here, we briefly discuss two approaches to make its generation tractable.
The first approach is to use a fixed, layered ansatz for W (θ). By alternating sets of single-and two-qubit unitaries, we construct a polynomial number of noncommuting layers capable of generating a rich set of parameterized unitaries.Translational invariance of the system Hamiltonian may be incorporated into the ansatz for W (θ). In this case, all gates in a given layer may be chosen to be the same.As a result, the number of variational parameters is reduced by a factor of n.
Another approach is to employ a randomized ansatz, in which parametrized gates are randomly placed.This approach may be more suitable for irregular Hamiltonians H, where the optimal form of W (θ) is not easily deducible from H. The randomized approach may potentially find a shorter W (θ) that contains fewer gates, which is beneficial for near-term applications.Ref. [18] discusses further details of both methods.

Growing the Ansatz and Parameter Initialization
We use the method of growing the ansatz in order to mitigate the problem of getting trapped in local minima during the optimization [18,35].This technique can be used with both ansätze mentioned above.The optimization is initiated with a shallow circuit containing only a few variational parameters.After a local minimum is found, we add a resolution of the identity to the ansatz for W (θ).This takes a form of a layer of unitaries (for a layered ansatz) or a smaller block of parametrized gates (for a randomized ansatz) that evaluates to the identity.Adding such structures to W (θ) does not change the value of the cost function but it increases the number of variational parameters.In the enlarged space, local minima encountered in previous steps may be turned into saddle points and the cost function may be further minimized towards the global minimum.The technique of systematically growing the ansatz to improve the quality of the result and mitigate the problem of local minima is described in detail in [18].
In order to approach the issue of initializing the parameters θ and γ, we often use a perturbative method [15,36] in which we pre-train these parameters for a slightly different Hamiltonian.Namely, we begin a VFF search for a unitary diagonalization with a known short-depth, readily diagonalizable, unitary.We then modify the Hamiltonian by adding successively perturbed terms in an attempt to guide the previously learned diagonalization from known initial parameters toward an unknown diagonalization of interest.

C. Cost Function and Cost Evaluation
For the variational compiling step of VFF (shown in Fig. 2(c)), we employ the cost function C LHST (U, V ) introduced in Ref. [32].This is defined as where the F (j) e are entanglement fidelities and hence satisfy 0 F (j) e 1. Specifically, F (j) e is the entanglement fidelity for the quantum channel obtained from feeding into the unitary U V † the maximally mixed state on j and then tracing over j at the output of U V † , where j contains all qubits except for the j-qubit.We elaborate on the form of This function has several important properties.
1.It is faithful, vanishing if and only if V = U (up to a global phase).
2. Non-zero values are operationally meaningful.Namely, C LHST (U, V ) upper bounds the averagecase compilation error as follows: where F (U, V ) is the average fidelity of states acted upon by V versus those acted upon by U , with the average being over all Haar-measure pure states.
3. The cost function appears to be trainable, in the sense that it does not have an obvious barren plateau issue (i.e., exponentially vanishing gradient, see Ref. [32]).
4. Estimating the cost function is DQC1-hard and hence it cannot be efficiently estimated with a classical algorithm [32].
5. There exists a short-depth quantum circuit for efficiently estimating the cost and its gradient.
Regarding the last point, each term in ( 8) is estimated with a different quantum circuit and then one classically sums them up to compute C LHST (U, V ).An example of such a circuit is depicted in Fig. 2(c).It involves 2n qubits, with the top (bottom) n qubits denoted A (B).The probability of the 00 measurement outcome on qubits A j B j in this circuit is precisely the entanglement fidelity F (j) e .We remark that the C LHST (U, V ) function was recently shown to have noise resilience properties, in that noise acting during the quantum circuit in Fig. 2(c) tends not to affect the global optimum of this function [33].

D. Optimization via Gradient Descent
Gradient-based approaches can improve convergence of variational quantum-classical algorithms [37], and the optimizer performance can be further enhanced by judiciously adapting the shot noise for each partial derivative [38].Furthermore, the same quantum circuit used for cost estimation can be used for gradient estimation [39].Therefore, we recommend a gradient-based approach for VFF, in what follows.
With the ansatz in (1), we can write the cost function for VFF as The partial derivative of this cost function with respect to θ k , a parameter of the eigenvector operator W (θ), is The operator W k + (W k − ) is generated from the original eigenvector operator W (θ) by the addition of an extra π 2 (− π 2 ) rotation about a given parameter's rotation axis: Similarly, the partial derivative with respect to γ , a parameter of the diagonal operator D(γ), is with Equation ( 13) is derived in [32] and we derive Eq. ( 11) in Appendix B. Using ( 11) and ( 13), we can evaluate the gradient of C VFF LHST directly and use a simple gradient descent iteration θ to minimize C VFF LHST .

Linear scaling in N
In practice, each of the steps in the VFF algorithm above will generate errors.This includes the algorithmic error from the approximate implementation, U (∆t), of the infinitesimal time evolution operator e −iH∆t and error from the approximate compilation and diagonalization of U (∆t) into V (α, ∆t).These two error sources bound the overall error via the triangle inequality: Here, FF p (∆t) is the overall simulation error for time ∆t, TS p (∆t) is the Trotterization error (note that this error may always be reduced using higher-order Trotterizations at the cost of more gates), and ML p (∆t) is the "machine learning" error associated with the variational compilation step.These quantities are defined as where M p = ( j m p j ) 1/p is the Schatten p-norm, with {m j } the singular values of M .
Ultimately we are interested in fast-forwarding and hence we want to bound FF p (T ) with T = N ∆t.For this purpose, we prove a lemma in Appendix C stating that for any two unitaries U 1 and U 2 .Combining this lemma with the triangle inequality in (17) gives Equation (22) implies that the overall simulation error scales at worst linearly with the number of time steps, N .We remark that, for the special case of p = 2, Eq. ( 21) can be reformulated in terms of our cost function as: where ).The approximation in (23) holds when the cost function C VFF LHST (T ) is small, which is the case after a successful optimization procedure.See Appendix C 2 for the non-approximate version of (23).Thus we find that the VFF cost function scales at worst quadratically in N under fast forwarding.

Certifiable error and a termination condition
Equation ( 22) holds for all Schatten norms, but of particular interest for our purposes is the Hilbert-Schmidt norm, p = 2, from which we can derive certifiable error bounds on the average-case error.In addition, the operator norm, p = ∞, quantifies the worst-case error and is often used in the quantum simulation literature [40,41].For our numerical implementations (Section III), we will consider both worst-case and average-case error.On the other hand, for our analytical results presented here, we will focus on average-case error since it is naturally suited to providing a termination condition for the optimization in VFF.
As an operationally-meaningful measure of averagecase error we consider the average gate fidelity between the target unitary e −iHT and the approximate simulation V (α, T ) arising from the VFF algorithm: where the integral is over all states |ψ chosen according to the Haar measure.
In Appendix C 3 we show that one can lower bound F (T ) based on the value of the VFF cost function, This inequality holds to a good approximation in the limit that C VFF LHST (∆t) is small, as is the case after a successful optimization procedure.See Appendix C 3 for the exact lower bound on F (T ), from which (25) is derived.
In addition, Eq. ( 25) provides a termination condition for the variational portion of VFF.If one has a desired threshold for F (T ), then this threshold can be guaranteed provided that C VFF LHST (∆t) is below a certain value.Once C VFF LHST (∆t) dips below this value, then the variational portion of VFF can be terminated.Specifically, the termination condition is C VFF LHST (∆t) C Threshold , where with the approximation holding when C VFF LHST (∆t) is small.Again, for the exact expression for C Threshold , see Appendix C 3.

Ansatz for Implementations
General ansatz considerations were discussed in Sec.II B. For our implementations, W consists of successive layers, each formed of three sub-layers: (i) an initial sub-layer of single-qubit gates, (ii) a second sublayer of entangling two-qubit gates acting on neighboring even-odd qubit pairs, and (iii) a third sub-layer of twoqubit gates acting on odd-even qubit pairs.The twoqubit gates are typically CNOTs, but equivalently we have used ZZ(θ) = CNOT(I ⊗ R z (θ))CNOT or XX(θ) gates.The layers are appended successively always with a final layer of single-qubit gates.In addition, our implementations use a set of layers consisting of various commuting operators for D. For the first layer we use a set of single-qubit Z-rotations, R z (γ), acting on all qubits.The second layer is a set of two-qubit ZZ(γ) gates acting on all pairs of qubits.The third layer would be a set of three-qubit gates Z ⊗Z ⊗Z(γ) acting on all triplets of qubits.However, for the threshold used, we did not need a third layer in the results presented below.

Diagonalization of a single-qubit unitary
We first studied the diagonalization of arbitrary single-qubit unitaries.
Here, U = R x (φ x ∆t)R y (φ y ∆t)R z (φ z ∆t), where φ x,y,z were random angles, and Fig. 3, shows results from the optimization phase of VFF (inset) and errors from VFF simulations.In the optimization phase, we see a rapid approach to diagonalization up to an accuracy limited by the number of shots used to measure gradients.VFF directly minimizes the certifiable optimization error, C VFF LHST (∆t), and we additionally plot ( FF ∞ (∆t)) 2 , the worst-case error.Note that in this case, ( FF ∞ (∆t)) 2 is also minimized by VFF, giving evidence that by training the average-case error, we also train the worst-case error.
The simulation errors plotted for a range of initial optimization errors show the advantage of VFF for simulating quantum systems beyond the coherence time of a QC.For instance, we see that the fast forwarding error for a simulation beginning with an optimization error of approximately 10 −6 remains below a simulation error tolerance δ = 10 −2 for approximately 200 timesteps.Thus, FIG. 4. VFF of a two-site, two-qubit Hubbard quantum simulation unitary.A) Optimization error.Here, cost estimates were made with nsamp = 10 6 and ∆t = 0.1.We plot C VFF LHST (∆t) versus optimization step for a sequence of parameters (see text).In plot, red x's depict the initial costs for each parameter before optimization.Each optimization was terminated after reaching C Threshold = 10 −6 .After taking some time to diagonalize the initial unitary with u = 0, subsequent optimizations took just a few iterations.B) Simulation error.Here, we plot C VFF LHST (T ) versus N for all u.For this level of optimization, fast forwardings of approximately 30 timesteps were achieved.

Hubbard Model
To study our perturbative approach to efficient optimization, we applied VFF to Trotterized quantum simulation unitaries, U (∆t) ≈ e −iH Hub ∆t , of the Fermi-Hubbard model Here, c † i,σ and c i,σ are electron creation and annihilation operators (resp.)for spin σ ∈ {↓, ↑} at site i and n i,σ = c † i,σ c i,σ is the electron number operator.The parameters t and u are the hopping strength and onsite interaction (resp.).We studied a two-site, two-qubit Fermi-Hubbard model [42], which, after translation via the Jordan-Wigner transform, takes the form We took t = 1 for our initial diagonalization, then perturbatively increased u from 0 to 0.1 in increments of 0.01.For U (∆t), we used a first-order Trotterization of exp(−iH Hub,2 ∆t).We set a threshold for optimization of 10 −6 .We used a three-layer ansatz for W and a two-layer ansatz for D. In representative results shown in Fig. 4, we see that, after an initial optimization taking a number of iteration steps, VFF reached the optimization threshold.Then, as we perturbed away from u = 0, VFF rapidly found new parameters that diagonalized exp(−iH Hub,2 ∆t) to below the cost threshold.For all approximate diagonalizations, for an error tolerance of δ = 10 −2 , the simulation error remains below this tolerance for T = 30∆t.The diagonalization used 9 single-qubit gates and 7 CNOTs.The Trotterization used two single-qubit gates and one CNOT.Thus, the fast-forwarded simulations used 9 single-qubit layers and 7 CNOTs, but the equivalent Trotterized simulations used 60 single-qubit gates and 30 CNOTs.Thus, VFF gave significant depth compression versus the Trotterized simulations, particularly with respect to entangling gates.

Heisenberg Model
We next applied VFF to the Heisenberg model, where X j , Y j , and Z j are Pauli spin matrices acting on qubit j, and h, J x , J y , and J z are parameters.
Here, we took h = 1.0 and investigated the model acting on three qubits (whose Hamiltonian we denote H Heis,3 ).We used a first-order Trotterization of exp(−iH Heis,3 ∆t).We set an optimization threshold of 10 −6 and used a ten-layer ansatz for W and a two-layer ansatz for D. From J z = 1.0 (a non-interacting Hamiltonian) we increased J z to 5.0 in increments of 1.0.For these parameter values, H Heis is an anti-ferromagnetic classical Ising model.
Next, we kept h = 1.0 and J z = 5.0 fixed and increased J x = J y from 0.0 to 8.0 in increments of 2.0.When J x = J y , these are often called XXZ Heisenberg models.
Finally, we kept h = 1.0,J z = 5.0, J x = 8.0 and varied J y from 0.0 to 10.0 in increments of 1.0 (XYZ Heisenberg models).
As may be seen in the representative results plotted in Fig. 5, VFF rapidly found new diagonalizations W DW † ≈ exp(−iH Heis,3 ∆t) for all models considered.We performed additional searches for diagonalizations of ferromagnetic models (J z , J x , and J y < 0) with similar results.For all approximate diagonalizations, the simulation error remained below an error tolerance of δ = 10 −2 , up to T ≈ 100∆t.For this simulation time, each diagonalization used 40 CNOTs and 71 single-qubit gates (111 total), whereas each Trotterization used 1200 CNOTs and 2500 single-qubit gates (3700 total).We implemented VFF on 1 + 1 qubits (i.e.diagonalizing a random single-qubit unitary) on the Rigetti Aspen-4 quantum computer (Figs.6 and 7).Here we considered the first-order Trotterization of the Hamiltonian H = α x σ x + α y σ y + α z σ z , where α was a randomly chosen unit vector, at the time ∆t = 0.5.We used W = R z (θ z )R x (θ x ) and D = R z (γ z ).The VFF cost function, as evaluated on the QC with n samp = 10 4 , was optimized to C VFF LHST (∆t) ≈ 10 −1 .With this system, we investigated how well VFF performed by classically computing the true, noiseless, cost for the parameters found on the Rigetti QC.This true cost converged to two orders of magnitude below the QCevaluated cost, demonstrating significant robustness of VFF to the noise on the Rigetti QC.
We next simulated single qubit evolution on the QC (Fig. 7) by 1) iterating the original Trotterization, U (∆t) N , and 2) using the VFF diagonalization (5).We then used process tomography to compare the resultant noisy process resulting from the Trotterization and the process resulting from VFF to the exact process U (∆t) N calculated classically.
In this single qubit case, the Trotterized simulation unitary could have been compiled to a circuit with many fewer gates; however, this would not be true for higher dimensional unitaries and for this reason we did not compile the iterated gate sequence here.
In Fig. 7, we show that VFF performed much better than the iterated Trotterization, giving a high fidelity simulation.In these results, the entanglement fidelity between the process implemented using VFF and the exact process remained high until at least N VFF = 150 and never reached a value below 0.7.On the other hand, the fidelity of the iterated Trotterization approach was already 0.586 by N = 25.This indicates that VFF on current quantum computers can allow for longer simulation times than are achievable with a simple Trotter iteration.

IV. DISCUSSION
We presented a new variational method for quantum simulation called Variational Fast Forwarding (VFF).Our results showed that, once a diagonalization is in hand, one could form an approximate fast forwarding of the simulation that allowed for quantum simulations beyond the coherence time.For the particular models, ansätze, and thresholds that we studied, we were able to fast forward simulations by factors of approximately 400 (single-spin), 30 (Hubbard), and 80 (Heisenberg) simulation timesteps.For instance, for the Hubbard model, if one Trotter step could be executed within the coherence time of a given QC, by using VFF, we could compile a diagonalization of that step, then generate a simulation accurate to an error of 10 −2 that was equivalent to 30 Trotter steps.In addition, a fast-forwarding of a factor of at least 6, relative to a Trotterization approach, was found experimentally on Rigetti's quantum hardware.Essentially, the more accurate the diagonalization step of VFF is (i.e., the lower the cost function value), the longer is the achievable fast-forwarding simulation time.
A crucial feature of VFF is the operational meaning of its cost function as a bound on average-case simulation error.Hence, any reduction in the cost results in a tighter bound on the simulation error.We used this feature to define a termination condition for the variational portion of VFF, such that once the cost is below a particular value, then one can guarantee that the simulation error will be below a desired threshold.This is arguably the most important feature that distinguishes VFF from prior work on Subspace Variational Quantum Simulation (SVQS) [25], whose cost function does not have an obvious meaning in terms of simulation error.In addition, since VFF is not targeting a low-energy subspace, it is capable of simulating systems at moderate to high-temperature or more dramatic dynamics such as quenches.The tradeoff is that the diagonalization step of VFF can be more difficult than that of SVQS, since one is diagonalizing over the entire space rather than a subspace.This tradeoff will be important to study in future work.
In the NISQ era, the minimum value of the VFF cost function that can be achieved will be limited by quantum hardware noise.On the one hand, this will result in loose bounds on the simulation error obtained from (25).On the other hand, we have seen from our implementation of VFF on Rigetti's quantum hardware that the true (noiseless) cost is often orders of magnitude lower than the noisy cost, implying that we learned the correct optimal parameters despite the noise.This noise resilience is analogous to analytical and numerical results recently reported in [33].Hence, an important direction of future research would be to tighten our bound (25) for specific noise models, which would allow for tight simulation error bounds in the presence of noise.
Finally, a principle limitation of VFF is the No Fast-Forwarding Theorem, which is stated in a variety of forms [26,27,31], but basically says that there exist some Hamiltonians for which the number of gates needed for quantum simulation must grow roughly in proportion to the simulation time.Clearly VFF will not work for these Hamiltonians, perhaps because the circuit depth needed to achieve an accurate diagonalization will be long or perhaps because the cost landscape will be difficult to optimize.At the same time, there are many physically interesting Hamiltonians that are close to (i.e., perturbations of) models that are known to be fast-forwardable, and VFF holds promise for these Hamiltonians.Hence, future work needs to explore the class of Hamiltonians that are approximately fast-forwardable.

V. ACKNOWLEDGEMENTS
We thank Rolando Somma and Sumeet Khatri for helpful discussions.We thank Rigetti for providing access to its quantum computers.The views expressed in this paper are those of the authors and do not reflect those of Rigetti.CC, ZH, and JI acknowledge support from the U.

1 .
Ansatz for DLet us first consider an ansatz for D. The problem of constructing quantum circuits for diagonal unitaries, D,

FIG. 2 .
FIG. 2. The VFF Algorithm.(a) An input Hamiltonian is transformed into (b) a gate sequence associated with a singletimestep Trotterized unitary, U (∆t).(c) The unitary is then variationally diagonalized by fitting a parameterized factorization, V (α, ∆t) = W (θ)D(γ, ∆t)W † (θ).This variational subroutine employs gradient descent to minimize a cost function CLHST, whose gradient is efficiently estimated with a short-depth quantum circuit called the Local Hilbert-Schmidt Test (LHST).The variational loop is exited when a termination condition given by (26) is reached, which guarantees that a user-defined bound on the average fidelity F (T ) is achieved.(d) After the termination condition is reached, the optimal parameters (θopt, γopt) are used to implement a fast-forwarded simulation, with the fast-forwarding error growing sub-linearly in the simulation time (see Eq. (22)).The fast-forwarding is performed by modifying the parameters of the diagonal unitary, D(γopt, ∆t) → D(N γopt, ∆t), producing a quantum simulation unitary, W (θopt)D(N γopt, ∆t)W † (θopt).

FIG. 3 .
FIG.3.VFF of a random single-qubit unitary.We plot worstcase and average-case errors, ( FF ∞ (T )) 2 and C VFF LHST (T ), versus N .The inset plots ( FF ∞ (∆t)) 2 and C VFF LHST (∆t), where ∆t = 1, for a range of optimization steps.The number of shots, nsamp = 10 6 .Note that to make consistent comparisons FF ∞ is squared, but C VFF LHST , closely related to ( FF 2 ) 2 , is not.Dashed diagonal gray traces denote upper bounds on ( FF ∞ (∆t)) 2 and C VFF LHST (T ) as a function of N .Traces for a given optimization error are paired just below the dashed gray bounds.A dashed black horizontal line is placed at an error tolerance of δ = 10 −2 .

FIG. 5 .
FIG.5.VFF of a three-qubit Heisenberg quantum simulation unitary.A) Optimization error.Estimates were made with nsamp = 10 6 and ∆t = 0.1.We plot C VFF LHST (∆t) versus optimization step for a sequence of parameters (see text).In this plot, red x's depict the initial costs for each parameter before optimization.Each optimization was terminated after reaching C Threshold = 10 −6 .B) C VFF LHST (T ) versus N plotted for all values of Jz, Jx, and Jy.Here, fast forwardings of approximately 70 to 100 timesteps were achieved.

FIG. 6 .
FIG.6.Training results for single-qubit VFF implemented on the Rigetti Aspen-4 quantum computer.Here, the quantum circuit acted on two qubits, one with a random single-qubit unitary, U , and the second with the diagonal ansatz, V = W DW † .Optimization was performed using gradient descent of the VFF cost function.Results from four optimizations are shown.The plot shows the cost function evaluated on the QC (solid line) and the true cost function evaluated classically (dashed line) using the parameters found on the Rigetti QC via VFF.The table provides the optimal noisy cost values from the Rigetti QC and the equivalent true cost value for the given set of optimized parameters.

6 FIG. 7 .
FIG.7.Process tomography for single-qubit VFF implemented on the Rigetti Aspen-4 quantum computer.Real (left) and imaginary (right) parts of the exact, classically computed process matrix of a first-order Trotterized quantum simulation (Exact Trotter) compared with a quantum simulation using an optimal diagonalization from the VFF shown in Fig.6(VFF on QC) and the first-order Trotterization (Trotter on QC), both computed on the Rigetti QC.The number of timesteps for the simulation are shown to the left.To quantify the accuracy of the fast-forwarded simulation, we include a table containing the entanglement fidelity[43] between the exact unitary and either the noisy process implemented by VFF or Trotterization respectively on the Rigetti QC.Note that for the VFF simulation, we used the optimization angles corresponding to the best cost from the noisy cost function, i.e., what was actually measured on the QC.
S. Department of Energy (DOE) through a quantum computing program sponsored by the LANL Information Science & Technology Institute.CC acknowledges support from the EPSRC National Quantum Technology Hub in Networked Quantum Information Technologies.LC was supported initially by the U.S. DOE through the J. Robert Oppenheimer fellowship and subsequently by the DOE, Office of Science, Basic Energy Sciences, Materials Sciences and Engineering Division, Condensed Matter Theory Program.PJC and AS acknowledge initial support from the DOE ASC Beyond Moore's Law program and subsequent support from LANL's Laboratory Directed Research and Development (LDRD) program.