Variational Quantum Computation of Excited States

The calculation of excited state energies of electronic structure Hamiltonians has many important applications, such as the calculation of optical spectra and reaction rates. While low-depth quantum algorithms, such as the variational quantum eigenvalue solver (VQE), have been used to determine ground state energies, methods for calculating excited states currently involve the implementation of high-depth controlled-unitaries or a large number of additional samples. Here we show how overlap estimation can be used to deflate eigenstates once they are found, enabling the calculation of excited state energies and their degeneracies. We propose an implementation that requires the same number of qubits as VQE and at most twice the circuit depth. Our method is robust to control errors, is compatible with error-mitigation strategies and can be implemented on near-term quantum computers.


Introduction
Eigenvalue problems are ubiquitous in almost all fields of science and engineering.Google's PageRank algorithm alone has had a significant impact on modern society, and at its core solves an eigenvalue problem associated with a stochastic matrix describing the World Wide Web [28].Another important example is Principal Component Analysis (PCA) [13,29], which has widespread applications in bioinformatics, neuroscience, image processing, and quantitative finance.
The time-independent Schrödinger equation provides yet another example of a fundamental eigenvalue problem.Its numerical solution enables properties of atoms, molecules and materials to be predicted, with farreaching applications in materials design, drug discovery and fundamental science [38].Characterisation of excited state energies of molecules is required to predict charge and energy transfer processes in photovoltaic Oscar Higgott: oscar.higgott@gmail.commaterials, or to understand some chemical reactions, such as those that involve photodissociation.However, classical methods such as density functional theory are often unable to determine excited states, even for materials where ground state energy calculations are possible.
Quantum computers have the potential to solve these and other problems significantly faster than any known methods using classical computers [1,11,19,36].However many quantum algorithms will require quantum error correction, limiting their usefulness in the near future [31].Here we study hybrid quantum-classical algorithms, which dramatically reduce the required gate depth to run and somewhat mitigate errors, by closely integrating classical and quantum subroutines [2,9,14,15,21,23,26,40].
The variational quantum eigensolver (VQE), introduced in Ref. [30], is the first algorithm designed to find the lowest eigenvalue of a Hamiltonian on a nearterm, non-fault-tolerant quantum computer.VQE is based on the variational principle and utilises the fact that quantum computers can store quantum states using exponentially fewer resources than required classically.VQE uses parameterised quantum circuits to prepare trial wavefunctions and compute their energy, and a classical computer to find the parameters minimising this energy.The low circuit depth of VQE has led to the hope that it may enable near-term quantum-enhanced computation.
Since its introduction, modifications have been suggested to enable VQE to find excited state energies: e.g. a folded spectrum method [30] which requires finding the expectation of the squared Hamiltonian with quadratically more terms, or symmetrybased methods which are non-systematic [23].Such suggestions have been more recently superseded by two proposals: a method that minimises the von Neumann entropy [35] and the quantum subspace expansion method [5,24].However, the von Neumann entropy method ("WAVES") requires a large number of highdepth controlled-unitaries, and the quantum subspace expansion method requires a large number of additional samples compared to VQE and introduces a new approximation.
Our algorithm extends VQE to systematically find excited states at almost no extra cost.We achieve this by adding "overlap" terms onto the optimisation function in order to exploit the fact that Hermitian matrices admit a complete set of orthogonal eigenvectors.Exploiting further the fact that VQE retains the classical parameters of ansatz states that enable their repreparation, low-depth quantum circuits can then be readily used to calculate these overlap terms.

Variational quantum deflation algorithm
In VQE, the real parameters λ for the ansatz state |ψ(λ) are classically optimised with respect to the expectation value: (1) of the Hamiltonian H = c j P j , computed using a lowdepth quantum circuit.As a result of the variational principle, finding the global minimum of E(λ) is equivalent to finding the ground state energy of H. VQE has been implemented on many experimental platforms, and has been shown to be more resilient to control errors than the quantum phase estimation algorithm [27].
Our method extends VQE to calculate the k-th excited state by instead optimising the parameters λ k for the ansatz state |ψ(λ k ) such that the cost function: (2) is minimised.This can be seen as minimising E(λ k ) subject to the constraint that |ψ(λ k ) is orthogonal to the states |ψ(λ 0 ) , ..., |ψ(λ k−1 ) .In the next section, we show how choosing sufficiently large β 0 , ..., β k−1 means the minimum of F (λ k ) is guaranteed to be the energy of the k-th state, provided that the ansatz is sufficiently expressive.
While the first term in Eq. ( 2) is E(λ k ), and can be computed using the same quantum circuits as used for VQE, the second term is a sum of overlaps of the ansatz state with states 0 to k − 1, and can be computed efficiently on a quantum computer using one of the methods given in Section 4.

Classical adder calculates
Classical optimiser updates l a t e x i t > < l a t e x i t s h a 1 _ b a s e 6 4 = " Y P 8 1 5 q o E 3 q u 0 P C W 3 l 0 R z 7 0  calculated by minimising F in Eq. ( 2) for k = 1, after which λ 2 can be determined using the same procedure with the known λ 0 and λ 1 , and so on until λ k is determined.
A schematic of our variational quantum deflation (VQD) algorithm is shown in Fig. 1.An initial guess of λ k is used to generate a state preparation circuit R(λ k ) that prepares the state |ψ(λ k ) when applied to the fiducial state |0 .This circuit is used repeatedly to compute each of the expectation values ψ(λ k )| P j |ψ(λ k ) (see Refs. [30,40]) and overlap terms | ψ(λ k )|ψ(λ i ) | 2 for i < k.The overlap terms are computed using circuits described in Section 4 or Appendix B or by following the method in Ref. [17].
A classical computer then uses the results of these quantum computations to calculate the objective function F (λ k ) of Eq. ( 2) and update λ k using a classical optimiser.The new λ k is then used to prepare a new ansatz state on the quantum computer, and the whole process is repeated until some stopping criterion is reached.
As shown in Appendix A, the total number of samples M (k) required to measure the VQD objective function to precision when finding the k th excited state (assuming states 0 . . .k − 1 can be perfectly prepared) is bounded above by: . For well-chosen β i , we expect this additional sampling cost relative to VQE to be very small, as explained in more detail in Appendix A.

Overlap weighting
An equivalent viewpoint of our optimisation procedure is that we are finding the ground state of the effective Hamiltonian at stage k: where |i is the (previously found) i-th eigenstate of H with energy E i := i| H |i1 .It can be easily verified that for an arbitrary state |ψ := a i |i : where d is the total number of eigenvectors of H. Therefore, if the ansatz is sufficiently powerful, then to guarantee a minimum at E k , it suffices to choose it suffices to possess an accurate estimate of ∆, e.g. by using VQE to find E 0 and then E d−1 (using the Hamiltonian −H to find the latter).When we readily have a specification of H = c j P j as a linear combination of Pauli matrices, e.g. when H is the electronic structure Hamiltonian, then we have the upper bound ∆ ≤ 2 H ≤ 2 |c j |.In this case, we can readily choose β i to guarantee the validity of our procedure.
Choosing valid β i can also be self-correcting.For example, if we incorrectly chose for all i, we will discover that we have set β i too small since we will eventually find a minimum at F (λ k ) = γ.However, by repeating the algorithm with a larger γ until an energy strictly less than γ is found (doubling γ each time, say), we can pick a large enough γ after O(log (E k − E 0 )) runs of the algorithm.

Low-depth implementations
A low-depth method for overlap estimation, proposed in Ref. [12], can be seen by writing the overlap We can prepare the state R(λ i ) † R(λ k ) |0 using the trial state preparation circuit followed by the inverse of the preparation circuit for the i-th previously-computed state.The overlap is then estimated to precision by the fraction of all-zero bitstrings when measuring this state O(1/ 2 ) times in the computational basis.This method requires knowing the inverse of the preparation circuit for each previously-computed state, R(λ i ) † .While this inverse is often known in theory by inverting gates in a decomposition of the original preparation circuit, device errors may mean that the implementation is inaccurate in practice.If we define λ * i to be the optimal parameters originally found to prepare the i-th state R(λ * i ) |0 using VQD, then its inverse can be found by fixing λ * i and varying the trial state parameters λ i such that the overlap maximised.This technique enables VQD to retain the robustness to control errors that is characteristic of VQE [27].
This implementation of VQD requires the same number of qubits as VQE and around twice the circuit depth.In Appendix B, we describe an alternative method which uses the destructive SWAP test and requires almost the same circuit depth as VQE but twice the number of qubits.If a larger gate-depth is available, then α-QPE [40] can be used to reduce the total runtime of overlap estimation from O( 12 ) up to O( 1 ).

Numerical simulation: H 2
We simulated VQD on H 2 in the STO-3G basis for a range of internuclear separations and compared it to exact diagonalisation, as shown in Fig. 2. Using β i = 3 Ha for all i and a generalised unitary coupled cluster singles and doubles (UCCGSD) ansatz, the median error of our method relative to exact diagonalisation is less than 4×10 −6 Ha for all energy levels, significantly better than chemical accuracy of 1.6 × 10 −3 Ha (the precision required to determine reaction rates to within an order of magnitude at room temperature using the Eyring equation [8]).Our method finds all 6 eigenstates systematically, including all those in the 3-dimensional degenerate subspace spanned by the 1st, 2nd and 3rd excited states.The ability to find degenerate states is another key advantage of our method; the folded spectrum and WAVES methods rely on the energies of states to differentiate between them and have no systematic way of determining the degeneracy of the eigenvalues.Further discussion of our simulation, including optimiser and ansatz used, can be found in Appendix C.

Error accumulation
In general, we cannot assume perfect state preparation for states i < k.In Appendix D we show that, provided we set β 0 > E1−E0 1− 0 , the ground state energy of the inexact deflated Hamiltonian is bounded by terms linear in 0 : In reality we will not find the exact ground state of the deflated Hamiltonian H1 and will incur an additional error 1 as was the case for the ground state of the original Hamiltonian H.However, provided 1 ≈ 0 , our total error 1 = O( 0 β 0 + 2 1 ||H||) in the energy is still linear in our original ground state error.An alternative analysis of error accumulation is provided by Lee et al. [18].
We analysed this accumulation of errors further through numerical simulations of VQD in the presence of sampling error, shown in Fig. 3.We analysed three different sampling rates: M = 10 6 , 10 7 and 10 8 samples per Hamiltonian subterm and overlap term, running 225 simulations of VQD (with random initial parameters) for each of these three scenarios.Of these runs, ∼ 20% of the simulations found the eigenstates in the incorrect order and were discarded for consistency Figure 3: Median error using VQD to determine each energy level k in the spectrum of H2 at bond distance (0.7414 Å) in the STO-3G basis.Red, blue and green lines show results using 10 6 , 10 7 and 10 8 samples (per Hamiltonian subterm and overlap term) respectively.For the solid lines, the standard VQD algorithm was used, whereas for dashed lines states i < k in H k were computed exactly for comparison.Chemical accuracy (1.6 × 10 −3 Ha) is also shown for reference (black solid line).Error bars show 1σ standard errors for the median estimates (calculated using bootstrap resampling [6]).
in the analysis.The median errors for the remaining ∼ 180 runs for each state k are shown in Fig. 3.For comparison, we also simulated 130 runs (dashed lines) using 'exact' states i < k in H k (< 10 −7 energy error in each state i < k).For all three sampling rates, the median error in the first excited state is similar in magnitude to the error in the ground state, as expected from our analysis earlier in this section and in Appendix D. Furthermore, the median errors for all states k < 4 are very similar (for a given M ) to the errors when using an exact H k , and are all below chemical accuracy, demonstrating that error accumulation is negligible for these states.For k = 4 and k = 5 the accumulated error is substantially higher than the error using an exact H k , however, showing that VQD is most effective for lowlying states.Achieving chemical accuracy for k = 5 requires 10 7 samples, instead of 10 6 for 0 < k < 4.
One way to address this accumulation of errors within VQD to find higher excited states may be to use the alternative effective Hamiltonians discussed in Section 7. Another solution is to use a hybrid approach, using VQD instead of excitation operators in the WAVES protocol [35].Here, VQD may provide a more effective method of approximating excited states than the excitation operators proposed in WAVES, whereas the von-Neumann entropy "eigenstate witness" used in WAVES does not have the same problem of error accumulation, and could help refine the energy estimate.Both of these alternative approaches require a larger gate depth than the version of VQD we have studied here, but may be a good approach to finding higher excited states in the era of fault-tolerant quantum computing.

Choice of effective Hamiltonian
The form of our effective Hamiltonian in Eq. ( 4) is only one choice within the broad category of deflation methods.Such methods are typically employed to find eigenvalues and eigenvectors of positive semi-definite matrices, often covariance matrices in the context of PCA, starting from the largest eigenvalues.
To make direct use of deflation methods for positive semi-definite matrices, note that the Hamiltonian H := −H + E for some E ≥ E d−1 , e.g.E = H , is positive semi-definite.Under this transformation, we find that Hotelling's deflation corresponds to our method and would set β i = E − E i in Eq. ( 4).
Other deflation methods exist such as projection deflation or Schur complement deflation which are designed to address the problem of not obtaining true eigenstates at each stage.These two methods, in contrast to Hotelling's, ensure that the true ground state of the effective Hamiltonian at each stage does not overlap with the previously found eigenstate estimate irrespective of its accuracy.Empirically, these two methods have been found to perform better than Hotelling's in the context of PCA on some datasets [20].
For example, in projection deflation, the effective Hamiltonian at stage k is defined as: where: and the last approximation holds when the previously found eigenvectors |i are truly orthogonal.With this approximation, writing H again as a linear combination of Pauli matrices P j , the value of ψ| H k |ψ for an ansatz |ψ is a linear combination of terms of forms: ψ| P j |ψ , | ψ | i | 2 as in Hotelling's deflation, but now additionally ψ | i , ψ| P j |i and i| P j |l (for i, l < k).Without this approximation, we also need to calculate i | l .The important point now is that all these additional terms can still be quantum computed, e.g.following the method in Ref. [17].

Discussion
We have introduced a new method-variational quantum deflation (VQD)-for calculating low-lying excited state energies of quantum systems using a quantum computer.Our method requires the same number of qubits as the variational quantum eigensolver (VQE) for ground state methods, at most twice the maximum circuit depth (for any given ansatz) and a negligible increase in the number of required measurements.By contrast, existing methods for quantum computing excited states require a large overhead in resources compared to ground state methods.
While we used a Nelder-Mead optimiser and UCCSD ansatz in our simulation of molecular Hydrogen here, we note that many other optimisers and ansatz circuits can also be used for VQD.After the first version of this paper was released, interesting work by Jones et al. compared the use of two different optimisation methods as applied to our protocol to calculate the spectrum of a Lithium Hydride molecule [15].More recently, work by Lee et al. showed that using a multi-determinental reference state or their k-UpCCGSD ansatz can improve the precision of finding the first excited state of N 2 using VQD [18].Further work could include numerical analysis of different optimisers and ansatz circuits for use within VQD in the presence of noise, as well as the effectiveness of the alternative effective Hamiltonians presented in Section 7.
Given its low resource requirements and compatibility with error-mitigation techniques, we hope that VQD may enable the quantum-enhanced computation of excited state energies in the near-future.

A Sampling cost
In VQE, the variance 2 in the energy expectation value H after using M j samples for the measurement of each subterm P j in the Hamiltonian H = c j P j is bounded by [30,33]: where σ 2 j = Var [ P j ] = P 2 j − P j 2 is the intrinsic variance of the projective measurement of P j .Using the method of Lagrange multipliers, Rubin et al. [33] showed that the optimal choice of M j to minimise the total number of samples M = j M j used to achieve precision is: which leads to a total number of samples Assuming perfect state preparation for states i < k in VQD, we find that the variance of the energy expectation value H k of the deflated Hamiltonian H k is instead given by: where M k j is the number of samples used for measuring P j , M k i is the number of samples used to estimate the overlap of the ansatz with the i th previously found state and σi is the intrinsic variance of this overlap measurement.From a straightforward extension of the Lagrange multiplier approach used by Rubin et al. [33], we now find the optimal M k j and M k i for the deflated Hamiltonian H k to be: This leads to a total number of samples M (k) given by: From a comparison of M (k) with M we expect the sampling overhead of VQD relative to VQE to be very small, since the sum of the L = O(N 4 ) Hamiltonian coefficients will likely be far larger than the sum of wellchosen weights β i for low-lying excited states in practice.Furthermore, the variances σi 2 tend to zero at convergence.However, if we require precision throughout the optimisation rather than just at convergence, and if we choose β i = 2 L−1 j=0 |c j | since this always guarantees β i is large enough, then we find M (k) = (1 + k) 2 M (where we have used the upper bounds for both M (k) and M ).

B Destructive SWAP test
The SWAP test enables the overlap | φ|ψ | 2 of two states |ψ and |φ to be determined to precision using O(1/ 2 ) repeated measurements after applying a circuit to a quantum register in the state |ψ ⊗ |φ .While the original SWAP test acting on two N -qubit states required an ancilla and a controlled-SWAP gate, leading to a 2N + 1-qubit circuit with depth O(N ), it was shown in Refs.[4,10] that the same outcome distribution can be attained more efficiently without an ancilla, using parallel Bell-basis measurements and classical logic.This so-called "destructive SWAP test" (shown in Fig. 4) requires just 2N qubits and depth O(1), achieving significant savings compared to the original SWAP test. |0i < l a t e x i t s h a 1 _ b a s e 6 4 = " J w g i 2 J X X Z l l V J h I U 8 e x P H u A Q H / k k P O 4 V P g P P P H F 5 5 S P w B X D S D X p J t T F 2 p K r / n u P j 4 9 / x S R N m j E r l e d / n 5 q 9 c r d If the ansatz used can be implemented on a linear chain of qubits with nearest neighbour connectivity, e.g.parameterised adiabatic state preparation using the fermionic SWAP network Trotter step [16], then the SWAP test to compare two ansatz states can be implemented on a N × 2 nearest-neighbour grid quantum computer architecture with a depth-one circuit that is subgraph isomorphic to the architecture (i.e.no routing of quantum information required).This implementation makes the assumption that the same ansatz state can be prepared with the same parameters on two separate registers of qubits.If this cannot be assumed (e.g. if qubit errors are inhomogeneous), then the SWAP test can be used to "copy" the state from the first register to the second register, by maximising the overlap of the two states, with the parameters of the state on the second register allowed to vary.This technique allows the SWAP test implementation of VQD to maintain robustness to control errors.

C Methods for numerical simulation
The standard UCCSD ansatz [32] is defined relative to a reference state |ψ 0 by: where T := T 1 + T 2 with: for some parameters t l i , t lk ij ∈ R and occ and vir are the sets of occupied and virtual orbitals of |ψ 0 .
We instead use a generalised unitary coupled cluster ansatz (UCCGSD) with |ψ 0 = |HF set to the Hartree-Fock state but with the cluster operator T = T 1 + T 2 now using the definitions: where p, q, r, s can now index any orbital (irrespective of its occupation in the reference state).A variant of this ansatz was suggested by McClean et al. [23] in the context of VQE, and UCCGSD has since been investigated numerically [18,41].Lee et al. found UCCGSD to perform significantly better than UCCSD in VQE for a number of small molecules [18].Since we are only interested in the parameterisation of T − T † , and fermionic operators obey the anticommutation relations: it can be directly verified that there are only 6 and 3 independent parameters for T 1 (e.g.t 1 0 , t 2 0 , t 3 0 , t 2 1 , t ) respectively.The results in Fig. 2 were simulated using ProjectQ and FermiLib [25,37].A tolerance of 10 −2 was used with a Nelder-Mead optimiser (xatol=fatol=10 −2 , as implemented in the scipy Python scientific library), and the best of two consecutive (randomly initialised) runs was used for each bond length and energy level.We note that other optimisers, such as LGO, have been shown to offer improved performance in VQE [23], and possible further work includes analysis of alternative optimisation strategies in the context VQD.
While we initialised the UCCGSD parameters randomly in this work, choosing a good initial guess for the parameters can significantly reduce the number of iterations required for the optimiser to converge.For ground state VQE problems, second order Møller-Plesset perturbation theory (MP2) has previously been proposed as a UCC ansatz initialisation method [32].Another method, for either ground or excited states, initialises a UCC ansatz with optimised expectation values that are classically estimated using a truncated BCH expansion [18].
We also note that the overlap terms | ψ(λ k )|ψ(λ i ) | 2 in Eq. ( 2) of the state k with a known state i are similar to the overlap terms | ψ(λ t s )|ψ(λ i ) | 2 of the same known state i with another previously-computed state s (where i < s < k) in the t-th iteration of the VQD optimisation procedure used to compute that state.It may therefore be advantageous to cache the outputs of these | ψ(λ t s )|ψ(λ i ) | 2 terms, and use them to inform and improve the optimisation procedure for the k-th state, hopefully reducing the number of optimisation steps and quantum circuits required.

D Bounds for error accumulation
In Section 6 we stated that, to assess the accumulation of errors, we would like to find upper and lower bounds for the ground state energy min ψ [ ψ| H1 |ψ ] of the inexact deflated Hamiltonian H1 = H + β 0 | ψ0 ψ0 |, where ψ0 is the (inexact) estimate of the ground state found in the first iteration of VQD.
Using the same notation as in Section 6, and writing states in the eigenbasis of the Hamiltonian, for compactness, we find the lower bound to be: where the first inequality is Cauchy-Schwarz, the second inequality follows from , and the third inequality follows by minimising a quadratic over |b 0 | (assuming β 0 > E1−E0 1− 0 ).From the Taylor series expansion in 0 of the second inequality we find: from which it is clear that, for any fixed β 0 > E1−E0 1− 0 , we have a lower bound of:

E Symmetry constraints
It is often the case that the Hilbert space of the Hamiltonian being considered is larger than the Hilbert space relevant to the particular problem of interest.For example, consider the electronic structure Hamiltonian in second quantised form: where a † i and a i are the fermionic creation and annihilation operators for an electron in the i-th spin orbital, and where the coefficients h ij and h ijkl denote the one-and two-electron integrals, respectively.After the Hamiltonian is transformed through the Jordan-Wigner or Bravyi-Kitaev transformation, converting creation and annihilation operators into qubit operators, the dimension of the Hilbert space remains 2 N , where N is the number of spin orbitals.However, if one is interested only in states with a particular symmetry, the dimension of the Hilbert space restricted only to these states can be much smaller, e.g.N η = O(N η ) instead of 2 N if only η-electron states are of interest.
If we wish to apply VQD to find excited states of a molecular Hamiltonian with a particular symmetry, it is necessary that the ansatz state for a desired excited state, at the global minimum of Eq. ( 2), be contained entirely within the restricted Hilbert space of interest.One way of ensuring this is to use an ansatz that always conserves the correct symmetry.For example, the fermionic unitary coupled cluster ansatz we use in Section 5 conserves the desired number of electrons (η = 2) of neutral molecular Hydrogen for all input parameters.
Alternatively, penalty terms can be included in the objective function such that the ansatz state has the desired symmetry at the global minimum of the objective function [23,34].This leads to a modified objective function: where Ĉi are symmetry constraining operators (e.g.Ne , Ŝ2 , Ŝz ) and c i are constants corresponding to their desired expectation values.
Clearly, by incorporating any of these techniques, we can find the excited states of a Hamiltonian constrained to any particular symmetry of interest.

F Error mitigation
In Refs.[3,22,34], an error-mitigating post-processing procedure was introduced that uses the operators Ĉi (defined in Appendix E) to detect and discard all measurements that violate a required symmetry for energy expectation circuits in VQE-type algorithms.This procedure can produce more accurate expectation values in the presence of bit-flip errors and some combinations of two-qubit errors.
After the first version of this paper was released, Ref. [15] incorporated our VQD technique to calculate excited states using imaginary time evolution.The authors also proposed a method to detect symmetrybreaking errors when using the ancilla-based SWAPtest, by performing symmetry measurements on the ansatz registers while measuring the overlap with the ancilla.However, using the low-depth overlap estimation circuit given in Section 4, we can detect and discard any error that does not commute with a symmetry operator Ĉi using classical post-processing alone, provided that Ĉi is diagonal in the computational basis and commutes with the ansatz.In the Jordan-Wigner and Bravyi-Kitaev encodings, the operators for the number of electrons Ne , spin up electrons N↑ and spin down electrons N↓ are diagonal in the computational basis, allowing these quantities to be computed classically in post-processing for both encodings.For example, starting from |0 , the UCC ansatz is prepared by R UCC (λ) = V (λ)R HF , where R HF prepares the Hartree-Fock state |HF and V := e T −T † is the UCC operator.Now, rather than measuring the fraction of all-zero bitstrings after performing R UCC (λ i ) † R UCC (λ k ) |0 = R † HF V (λ i ) † V (λ k )R HF |0 , we can instead measure the fraction of bitstrings corresponding to |HF after performing V (λ i ) † V (λ k )R HF |0 .Since V conserves electron number, we know that all measured bitstrings that do not correspond to the correct electron number can be discarded as per the post-processing procedure.Therefore, this method for error-mitigated overlap estimation is more efficient than the ancilla-based method proposed in Ref. [15] if Ĉi is diagonal in the computational basis.We also note that the error-mitigation techniques proposed in Refs.[7,39] can be readily applied to our algorithm.

9 b 2 1 n e 7
x + 4 e i X H 8 B / S t 6 m v V v 4 v 2 D + l j p c 7 e n e 0 7 f 3 A h I l U t W V r P z s d v Z n Z m d t 0 K P C q V Y f x 1 5 u w n n 3 5 2 7 v y F z 5 e + + P K r r y 9 e W r 6 8 L 3 k o H L L n c I + L l y 0 s i U c Z 2 V N U e e R l I A j 2 W x 5 5 0 e p t 6 v 0 X b 4

Figure 1 :
Figure 1: A schematic of our variational quantum deflation method for finding the k-th excited state of a Hamiltonian H.

Figure 2 :
Figure2: All ground and excited state energy levels of H2 in the STO-3G basis, calculated using exact diagonalisation (blue dotted line) and our variational quantum deflation (VQD) method (red filled circles) over a range of internuclear separations.
Suppose a state | ψ0 (with energy Ẽ0 ) is prepared instead of the true ground state |ψ 0 such that ψ0 |ψ 0 2 = 1 − 0 , leading to an error in the ground state energy 0 = Ẽ0 − E 0 = O(2 0 ||H||).If we now use this ground state estimate along with VQD to find the first excited state |ψ 1 using a new trial state | ψ1 , the lowest-energy state of the deflated Hamiltonian no longer corresponds to the exact excited state energy E 1 .The inexact deflated Hamiltonian is now given by H1 = H + β 0 | ψ0 ψ0 | and, to assess the accumulation of errors, we wish to find upper and lower bounds for min ψ1 [ ψ1 | H1 | ψ1 ].
R a e 3 e x v U W V Z Y k L T 9 M r P A N n b s C V R + A F 8 G 5 a y M d G L a U j R f l n x u P x b z y b D T P O l P a 8 7 3 P z V 6 7 W 6 t c W r j d u 3 L x 1 + 8 7 i 0 t 0 9 l e a S 0 F 2 S 8 l Q e h F h R z h K 6 q 5 n m 9 C C T F I u Q 0 / 0 w 3 i j i + 4 d U K p Y m b / R R R g O B + w n r M Y K 1 c 3 W X a g / Q N m G S 5 E z D 9 s a 6 1 1 q j A r Z 3 1 v 2 W 5 4 R p Q I i 4 0 o z E B s V U G 8 9 a 2 I R I 5 F y z P t b U P L N m Z w U J r A c E c 4 M O K T G I u / I R t r b L H p e r i Z b c P C 9 l m b N Z y O b O C s k A S 0 x c s 8 a r h M I x l B u Z 0 x e H b b g u + Z M 9 m R Z 7 q y 3 f a / n b 3 n L 7 F R j a A r g P H o I V 4 I M X o A 0 2 w R b Y B a T 2 s X Z c + 1 T 7 X D + u f 6 1 / q / 8 Y L p 2 f O 8 m 5 B 8 a s / v M 3 b t w m n g = = < / l a t e x i t > < l a t e x i t s h a 1 _ b a s e 6 4 = " h 0 8 s x 1 2 T 1