{'fraction_non_alphanumeric': 0.03734234918705364, 'fraction_numerical': 0.010370764321531683, 'mean_word_length': 4.3462632006498785, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 6, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 5, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Error Bounds for Variational Quantum Time Evolution

Variational quantum time evolution (VarQTE) allows us to simulate dynamical quantum systems with parameterized quantum circuits. We derive a posteriori, global phase-agnostic error bounds for real and imaginary time evolution based on McLachlan's variational principle that can be evaluated efficiently. Rigorous error bounds are crucial in practice to adaptively choose variational circuits and to analyze the quality of optimization algorithms. The power of the new error bounds, as well as, the performance of VarQTE are demonstrated on numerical examples.


I. INTRODUCTION
In 1981, Richard Feynman suggested the development of quantum computers with the following words, "Nature isn't classical, dammit, and if you want to make a simulation of nature, you'd better make it quantum mechanical, and by golly it's a wonderful problem, because it doesn't look so easy." In many cases the simulation of a quantum mechanical nature corresponds to quantum time evolution (QTE). Applications of QTE are numerous and range from simulating Ising models [1], to approximating quantum Gibbs states [2][3][4][5][6], to solving combinatorial optimization problems [7]. In order to implement QTE on a gate-based quantum computer, the respective evolution needs to be translated into quantum gates. This translation can, e.g, be approximated with Trotterization [3,8]. Depending on the evolution time and expected accuracy, this approach may lead to deep quantum circuits and is, thus, not well-suited for near-term quantum computers.
Variational quantum time evolution (VarQTE) [9,10] is a powerful and versatile approach to simulate quantum time dynamics with parameterized quantum circuits. Due to its compatibility with shallow, parameterized circuits, VarQTE displays a promising approach to utilize near-term devices for solving practically relevant tasks. The usage of short circuits results in a limited expressivity of the available parameterized unitaries and implies that VarQTE generally comes with an approximation error. It is crucial to quantify this error, to be able to interpret the results, and to possibly rerun simulations with more expressive parameterized circuits in case the error is too large.
In this work, we derive new a posteriori error bounds for variational quantum real and imaginary time evolution which we shall refer to as VarQRTE and VarQITE, respectively. The obtained error bounds allow us to efficiently, quantify the approximation error with respect to the optimal QTE. The bounds are phrased in terms of the Bures metric and are, hence, agnostic to physically irrelevant global phase mismatches -a feature that is crucial for practical applications. This represents an improvement compared to existing results [11]. Thus, they directly define lower bounds on the fidelity between prepared and target states. The power of the novel error bounds is demonstrated on various numerical examples.
We, thereby, also investigate their performance and illustrate the application to concrete settings.
The structure of this work is as follows. First, we explain the concepts of (variational) quantum time evolution in Sec. II. Then, Sec. III introduces the a posteriori error bounds for VarQRTE and VarQITE. Furthermore, methods used for the numerical experiments are described in Sec. IV and the respective results are presented in Sec. V. Finally, conclusions and outlook are given in Sec. VI.

II. VARIATIONAL QUANTUM TIME EVOLUTION
QTE describes the process of evolving a quantum state over time with respect to a Hamiltonian H. Real time evolution enables the study of unitary quantum dynamics described by e −iHt/ for t ∈ R, e.g., of fermionic models such as the Hubbard model [12]. If the time parameter t is replaced by an imaginary time it the system dynamics change to a non-unitary evolution. Suppose that the initial state has a non-zero overlap with the ground state of H, then all components that do not correspond to the ground state are damped exponentially in time during imaginary time evolution. This form of time evolution is, thus, a particularly useful tool to find the ground state of H [9]. Furthermore, imaginary time evolution can be used to solve partial differential equations [13][14][15] or to prepare quantum Gibbs states [2,10]. A generalized time evolution can be used to do matrix multiplications, solve systems of linear equations and combine real and imaginary time evolution [16].
VarQTE approximates the target state |ψ * t with a state |ψ ω t whose time dependence is projected onto the parameters ω t of a variational ansatz. To simplify the notation, the time parameter t is dropped from ω = (ω 0 , . . . , ω k ) ∈ R k+1 in the remainder of this work when referring to the ansatz parameters. More specifically, we consider a formulation for pure states based on McLachlan's variational principle [17] with a global phase agnostic evolution [10]. The state evolution described by this variational principle corresponds to an initial value problem where the underlying ordinary differential equation (ODE) [18] is derived from McLachlan's variational prin-ciple [17]. We simulate the time evolution by numerically solving the ODE for a set of initial parameter values.
In the following, real and imaginary time evolution, as well as, the variational implementations are introduced. The respective notation is simplified by setting = 1.

A. Variational Quantum Real Time Evolution
The time-dependent Schrödinger equation describes the change of a state |ψ * t under real time evolution where we write the time derivative as |ψ * t = ∂|ψ * t ∂t . The resulting time-dependence of the state reads Next, the variational implementation for the real time evolution of a parameterized state |ψ ω t is discussed. To that end, we employ a VarQTE approach which is agnostic to a potential time-dependent global phase [10]. The respective variational principle is derived in the following.
Consider the real time evolution of a parameterized state with an explicit time-dependent global phase parameter ν, i.e., |ψ ν t = e −iν |ψ ω t for ν = ν t ∈ R, where t represents the effective state gradient. McLachlan's variational principle now implies Since |ψ ω t is given by a parameterized quantum circuit, solving Eq. where ∂ωi H |ψ ω t and F Q ij denotes the (i, j)-entry of the Fubini-Study metric [19,20] given by We would like to point out that for pure states the Fubini-Study metric is proportional to the quantum Fisher Information matrix. The efficient evaluation of the terms in Eq. (12) is discussed in Appendix E.
Notably, the gradient |ψν t computed on the basis of this variational principle will not always be exact. Therefore, |e t > 0 where |e t := |ψν t + iH |ψ ω t (14) denotes the gradient error. This gradient error also enables an alternative definition of a VarQRTE ODE. More explicitly, we can define the ODE as optimization problem that searches for the minimizing argument of the squared gradient error norm, which can also be written as Since the time-dependence of |ψ ω t is encoded in the real parameters ω, Eq. (16) can, therefore, be rewritten as using and This reformulation enables the evaluation of the norm since the individual terms can be efficiently computed.
We would like to point out that solving Eq. (13) with a least square solver is analytically equivalent to solving Eq. (15). However, the simulation results in Sec. V show that the numerical behavior of the latter is more stable.

B. Variational Quantum Imaginary Time Evolution
Imaginary time evolution of a quantum state is mathematically described by the normalized, Wick-rotated Schrödinger equation where E * t = ψ * t | H |ψ * t corresponds to the system energy. In the remainder of this work, the notation for The state evolution reads Analogously to Sec. II A, we use a VarQITE implementation for |ψ ω t that simulates the existence of an explicit global phase e −iν [9,10]. The normalized, Wickrotated Schrödinger equation of an evolution of the state |ψ ν t = e −iν |ψ ω t reads where Thus, and division by e −iν leads to Application of McLachlan's variational principle gives Next, we evaluate the variational principle with respect toν and find thatν = −Im( ψω t |ψ ω t ). This facilitates a variational time evolution of |ψ ω t that simulates a global phase degree of freedom ν without actual implementation of e −iν , i.e., with the effective state gradient Rewriting the variational principle accordingly gives Since the time-dependence of |ψ ω t is encoded in the parameters ω, Eq. (30) leads to the following system of linear equations Further details on the evaluation of the terms in Eq. (31) are given in Appendix E. Solving Eq. (31) forω leads to an ODE which describes the evolution of the ansatz parameters with respect to Eq. (28) As for VarQRTE, the state gradients may be inexact such that |e t > 0 for the gradient error Eq. (33) motivates alternative VarQITE ODE which is given as the following optimization problem for Since the time-dependence of |ψ ω t is encoded in the parameters ω, we can rewrite Eq. (35) where it is used that as well as Eq. (19). This facilitates the efficient evaluation of |e t 2 2 .

III. ERROR BOUNDS
In this section, we prove new error bounds for Var-QTE. Let |ψ ω t be the state prepared by the variational algorithm at time t and denote the ideal target state by |ψ * t . To formalize an error bound, we want to use a metric which describes the distance between two quantum states. A popular distance measure is the fidelity [22] given by | ψ ω t |ψ * t | 2 . Unlike the 2 -norm, the fidelity is invariant to changes in the global phases. Since the global phase is physically irrelevant, this is a desired property for a meaningful quantum state distance measure. Although the fidelity itself does not correspond to a metric, it may be used to define metrics such as the Bures metric [23] defined as Unlike the 2 -norm, the Bures metric is invariant to changes in the global phases. Our goal is, now, to prove a bound of the form for an error term t that can be evaluated efficiently in practice. We would again like to point out the aforementioned relation of the Bures metric to the fidelity, which also can be written as and which implies that the relevant range of t is t ∈ 0, √ 2 for normalized |ψ ω t and |ψ * t . If the error bound estimate lies outside of this interval, then the fidelity and error can be clipped to 0 and √ 2, respectively.

A. Variational Quantum Real Time Evolution
An error bound for VarQRTE in terms of the 2 -norm has been derived in [11]. We extend this bound to the Bures metric and, thereby, avoid that a physically irrelevant mismatch in the global phase influences the bound. The proof is given in Appendix A.
Theorem 1. For T > 0, let |ψ * T be the exact solution to Eq. (10) and |ψ ω T correspond to the VarQRTE approximation. Then for T = T 0ε t dt with the error rate given by the gradient error, i.e.,ε It should be noted that the error bound is compatible with practical VarQRTE implementations which use, e.g., regularized least squares methods or pseudoinversion methods to solve the system of linear equations from Eq. (12).

B. Variational Quantum Imaginary Time Evolution
This section introduces an upper-bound to the Bures metric between the target state |ψ * t given by Eq. (20) and |ψ ω t prepared with VarQITE. To prove the error bound we need two preparatory lemmas. The first one quantifies the energy difference between E ω t and E * t . The proof is given in Appendix B. Lemma 2 (Energy difference). For t > 0, let |ψ * t be the exact solution to Eq. (28) and |ψ ω t be the variationally prepared state. Suppose that In practice, H ∞ may be replaced with an efficient approximation thereof. The second Lemma is proven in Appendix C. To shorten the notation, we use where ζ (ω t , t ) is defined in (45) and where The optimization problems given in Eqs. (45) and (48) can be solved efficiently in practice as they correspond to a one-dimensional search over a closed interval. Furthermore, we would like to point out that χ (ω t , t ) bounds the overlap between the two arguments of the objective function in Eq. (46).
We are finally ready to state the error bound for Var-QITE. The proof is given in Appendix D.
Theorem 4. For T > 0 and ε 0 = 0, let |ψ * T be the exact solution to Eq. (28) and |ψ ω T be the simulation implemented using VarQITE. Then with ζ (ω t , t ) and χ (ω t , t ) as given in Eq. (45) and Eq. (48), respectively, allows to definė This error bound is also independent of a potential physically irrelevant global phase mismatch between prepared and target state. Furthermore, the bound is compatible with implementations which use numerical techniques to solve the SLE given in Eq. (31). Moreover, we would like to point out that the more complex form of the VarQITE error bound -in comparison to the Var-QRTE error bound -is due to the non-unitary nature of imaginary time evolution.

IV. IMPLEMENTATION
To ensure a stable VarQTE implementation, it is vital to choose the correct settings. The possible choices with their advantages and disadvantages, respectively, are explained next.

A. ODE Solvers
The ODE underlying VarQTE is solved using numerical integration. This can lead to an additional error term.
Let |ψ * ODE solvers, such as the forward Euler method, which operate with a fixed step size may induce large errors in the numerical simulations if the time steps are not chosen sufficiently small. The forward Euler method evaluates the gradientω t and propagates the underlying variable for n T time steps according to a predefined step size, i.e., with t n T = T and the step-size δ t = t k+1 − t k . In contrast, Runge-Kutta methods evaluate additional supporting points and compute a parameter update using an average of these points, thereby, truncating the local update error. Combining two Runge-Kutta methods of different order but using the same supporting points allows to define efficient adaptive step-size ODE solvers which ensure that the local step-by-step error is small and, thus, that the dominant part of the error is coming from the variational approximation. The results in Sec. V illustrate this aspect on the example of the forward Euler method [24] with fixed step size and an explicit Runge-Kutta method of order 5(4) (RK54) method from SciPy [25] that uses additional interpolation points as well as an adaptive step size to minimize the step-by-step integration errors. We refer the interested reader to an introductory book on numerical ODE solvers such as [26].

B. ODE Definition
The SLE underlying McLachlan's variational principle, given in Eq. (12) and Eq. (31), are prone to being ill-conditioned and may, thus, only be solvable approximately with a numerical technique such as regularized least squares or pseudo-inversion. The commonly used regularization schemes, as well as, the pseudo-inversion can be seen as small perturbations which are not necessarily in accordance with the physics of the system. This in turn can lead to inappropriate parameter updates. In the following, we shall refer to the ODE definition based on f std as standard ODE. The alternative ODE definition f min -which shall be referred to as argmin ODE -is analytically equivalent to solving f std with a least square solver. However, the simulation results in Sec. V show that the numerical behavior differs. In fact, the experiments reveal that the argmin ODE can lead to significantly better numerical stability.
The simulations employ the SciPy COBYLA optimizer [25] to findω in f min where the initial point is chosen as the numerical solution to the SLE given in Eq. (12) and Eq. (31), respectively.

C. Error Bound Evaluation
To enable a reliable error bound evaluation, we jointly evolve the state parameters and the error bounds. More explicitly, we extend the parameter ODE to with ω 0 being set, 0 = 0 by assumption, and withε t from Eqs. (43) and (52) for the real and imaginary case, respectively. Furthermore, f (ω t ) is either chosen as f std (ω t ) or f min (ω t ). Note, that we need to use a finite difference approximation to evaluateε t for VarQITE, i.e., we evaluate ε t+δt for a small δ t > 0which is independent of the ODE solver's step size -according to Eq. (51). This formulation has the advantage that the error bound directly reflects the propagation of the evolution and that adaptive step size ODE solvers also consider the changes in the error bounds.

R Y
[0] R Y [1] R Y [2] R Z [3] R Z [4] R Z [5] R Y [6] R Y [7] R Y [8] R Z [9] R Z [10] R Z [11]  We next introduce three examples that we will use to demonstrate the efficiency of the error bounds derived in Sec. III, as well as, the impact of the implementation details discussed in Sec. IV. All experiments prepare |ψ ω t with an ansatz as shown in Fig. 1, adjusted to the number of qubits n given by the respective Hamiltonian: (i) An illustrative example is considered with Hereby, the evolution time is T = 1 and the initial parameters are chosen such that all parameters are set to 0 except for the parameters of the last layer of RY rotations which are chosen to be π/2. This gives |ψ 0 = |++ .
(ii) The well-studied Ising model with a transverse magnetic field on an open chain with 3 qubits is investigated, see, e.g., [28], i.e., where J = − 1 2 and g = − 1 2 . The evolution time is again set to T = 1 and the initial parameters are all 0 except for the parameters of the last layer of RZ gates which are chosen at random in (0, π 2 ] such that |ψ 0 = e −iγ |000 with γ ∈ R. Notably, we avoid the initial state |ψ 0 = |000 to circumvent getting stuck in a local minima. (iii) The two qubit hydrogen molecule approximation given in [9] is studied, with Again, the evolution time is set to T = 1 and the initial parameters are chosen such that the initial state is |ψ 0 = |++ , i.e., all parameters are 0 except for the last layer of RY rotations which are given as π/2. In the following, we present a set of numerical experiments and investigate the error bounds for VarQRTE with a particular focus on the comparison of different ODE formulations and solvers.
Firstly, we apply the forward Euler method with 100 time steps as well as an adaptive step size RK54 ODE solver to the illustrative example using the standard ODE. The resulting SLEs are solved using a least square solver provided by NumPy [29]. The results shown in Fig. 2 illustrate that the error bounds are very tight and, thus, relevant for practical accuracy estimations. Furthermore, one can see that RK54 achieves better error bounds as well as smaller fluctuations in the system energy while using significantly less time steps. The plateaus are due to exact local gradients, i.e., |e t 2 = 0. Furthermore, we would like to point out that the energy should actually be preserved for a real time evolution under a time-independent Hamiltonian but McLachlan's variational principle does not guarantee energy preservation.
Next, we compare the implications of the ODE formulation on the Ising model using RK54. The initial points for the optimization of the argmin ODE are chosen as the solution to the respective SLE at time t. Fig. 3 presents the Bures metrics, as well as, the respective bounds for the prepared |ψ ω t and the target state |ψ * t . The errors show that the argmin ODE leads to smaller errors than the standard ODE. Furthermore, it can be seen that also the system energy changes less for the former.
Lastly, the error bounds for the hydrogen Hamiltonian from Eq. (61) are compared the standard and argmin ODE as well as forward Euler and RK54 ODE solvers. The results are presented in Fig. 4. Notably, the experiment which uses RK54 and the argmin ODE leads to the best results, i.e., the smallest state error as well as error bound. In general, one can see that the argmin ODE achieves better errors compared to the standard ODE, the error seems to saturate for the former while it keeps increasing with the latter. Furthermore, RK54 improves the errors, as well as, the error bounds for both ODE definitions while using significantly less time steps. We would like to point out that the setting which gives to the smallest error t does not necessarily lead to the smallest discrepancy between E ω t and E * t , as can be seen when comparing the RK54 results.
To sum this up, the numerical results reveal that the error bounds represent good estimates for the actual errors. The experiments indicate further that an adaptive step size ODE solver such as RK54 significantly improves the simulation results while reducing the computational costs. Moreover, it was shown that replacing the standard ODE by the argmin ODE has also a a positive influence on the simulation accuracy. Lastly, the results reveal that the lack of energy conservation in McLachlan's variational principle can lead to significant energy fluctuations.

B. Variational Quantum Imaginary Time Evolution
Next, we investigate the power of the error bounds for VarQITE. To that end, the optimizations for ζ (ω t , t ) and χ (ω t , t ), see Lemmas 2 and 3, respectively, use a grid search which is viable since the problems are cheap to evaluate. Furthermore, we would like to point out that δ t , used to computeε t ≈ εt−εt−1 δt , does not need to correspond to the step size of the ODE solver but may be chosen such that a reasonable finite difference approximation is obtained. We set δ t = 10 −4 .
First, the outcomes using the standard ODE with forward Euler as well as RK54 are compared for H illustrative . The results shown in Fig. 5 provide an example of the potentially insufficient numerical integration accuracy of forward Euler. More explicitly, although the gradient errors and, thus, also the error bounds are all 0, the actual error between prepared and target state, i.e., B(|ψ * T ψ * T |, |ψ ω t ψ ω t |), shown in purple, is positive. The application of RK54 in comparison reduces the error in the integration. Furthermore, the plotted energies E ω t and E * t are very close and show a convergence behavior. Since the state error is sufficiently small and the energy variance Var(H) ψ ω t = ψ ω t | H 2 |ψ ω t − (E ω t ) 2 shown in Fig. 5 (d), (h) converges to 0, we can conclude that the VarQITE is run for a sufficiently long time and actually reached the ground state.
Moreover, the performance using RK54 and the stan-dard respectively argmin ODE formulation is compared on the example of H Ising . Fig. 6 illustrates the sensitivity of the error bounds for VarQITE with respect to the gradient errors |e t 2 . Since the gradient errors are rather large especially at the beginning of the evolution, the error bounds reach the maximum value of √ 2. At this point, they are not representative for the actual error B (|ψ * T ψ * T |, |ψ ω t ψ ω t |) anymore. Notably, for this example the argmin ODE only works marginally better than the standard ODE.
For VarQITE applied to H hydrogen , we focus on RK54 and the argmin ODE formulation. The results are visualized in Fig. 7. The SLE is solved with a least squares method from NumPy [29]. It can be seen that VarQTE is able to represent the state exactly and that all gradient errors |e t 2 are 0. This is directly reflected by the respective error bound t and fidelity bound (1 − 2 t /2) 2 . Furthermore, the energy with respect to the prepared state E ω t is equal to E * t at all times of the numerical ODE integration.
The presented experiments show that the error bounds are good approximations to the actual error if the gradient errors are small. In the case of larger gradient errors, the error bounds can grow fast and exceed the meaningful range. Moreover, the results reveal that the numerical integration error introduced by Forward Euler can easily exceed the error bounds, rendering them useless.

VI. CONCLUSION AND OUTLOOK
This work presents a posteriori error bounds for the Bures metric between a state prepared with VarQTE shows the corresponding fidelity bound 1 + 2 /2 2 , as well as, the actual fidelity | ψ ω practical applications. Furthermore, the novel bound is particularly simple to evaluate. The error bound for VarQITE, on the other hand, is more involved as it implicates solving two constrained optimization problems but can still be evaluated efficiently. The complexity of this error bound is largely due to the non-unitary characteristics of imaginary time evolution. The presented error bounds are insightful whenever the errors at the individual time steps remain sufficiently small. Otherwise, the error bounds can grow quite fast and loose their informative value. We leave it for future work to derive error bounds that are applicable for larger errors.
We argue and verify numerically that the error bounds are strongly dependent on the numerical integration method. An ODE solver which applies an adaptive step size scheme can increase the numerical stability and accuracy significantly. Furthermore, using an ODE formulation which is based on the minimization of the local gradient error |e t 2 also helps to reduce the simulation errors. The performance of the algorithm, the error bounds, related state fidelities, and system energies, are demonstrated on numerical examples.
An open question for future investigation, is the influence of quantum hardware noise on these error bounds. The device noise impacts the components used to evaluate the error bounds, as well as, the parameter updates. It is particularly interesting to what extend the error bounds are robust given a noisy sampling process. Moreover, we expect that a focused investigation of the behavior of VarQTE and the respective error bounds at critical points, such as phase transitions, can give us important insights into the limits and potentials of the QTE simulation technique. Finally, we suggest the application of physically motivated regularization methods, e.g., with respect to the changes in the system energy, instead of the standard regularization techniques which do not necessarily lead to physically relevant results. e iφ |ψ ω where the penultimate step uses Eq. (29).
The second term in Eq. (D2) is bounded from above by Lemma 3. It thus remains to bound the third term in Eq. (D2) With the help of Eq. (39) we find