Block Lanczos method for excited states on a quantum computer

The method of quantum Lanczos recursion is extended to solve for multiple excitations on the quantum computer. While quantum Lanczos recursion is in principle capable of obtaining excitations, the extension to a block Lanczos routine can resolve degeneracies with better precision and only costs $\mathcal{O}(d^2)$ for $d$ excitations on top of the previously introduced quantum Lanczos recursion method. The formal complexity in applying all operators to the system at once with oblivious amplitude amplification is exponential, but this cost can be kept small to obtain the ground state by incrementally adding operators. The error of the ground state energy based on the accuracy of the Lanczos coefficients is investigated and the error of the ground state energy. It is demonstrated to scale linearly with the uncertainty of the Lanczos coefficients. Extension to non-Hermitian operators is also discussed.


I. INTRODUCTION
For quantum computation to lead to new discoveries [1], efficient means of solving for the ground state must be understood and implemented.Some near term algorithms that have been used in the era of noisy quantum devices have led to an increased interest in results obtained from variational quantum eigensolvers [2][3][4][5][6][7][8] which ultimately face noise and other limitations [9].Looking to the long term capabilities of a quantum computer when error correction is available, other algorithms are useful to investigate.
By far the longest studied algorithms to obtain ground states is the implementation of real time evolution.In this algorithm, an initial Hamiltonian H 0 is defined and an initial state Ψ 0 is prepared on the quantum computer.The time dependent Hamiltonian is with interaction term H I , constant C, and time dependent coupling constant (or similar form) λ(t) at time t.By adiabatically (slowly) increasing the interaction term in time, the wavefunction will eventually arrive at the ground state for the fully interacting Hamiltonian.However, this solution strategy is known to be extremely slow for quantum chemical systems [10,11].In order to apply the Hamiltonian, a time evolution operator of the form exp(−iH(t)δt) must be applied to the wavefunction.The Trotter-Suzuki decomposition of the time evolution operator must be decomposed into many terms, O(N 4 ) to capture the full electron-electron interaction term, although this can be reduced as N → ∞ to O(N 2 ) for the case of local basis functions [12].However, since the time step δt must be very small depending on the strength of correlation in the system, the resulting number of operations makes the time necessary to solve for even small molecules extremely long.This is true of other classical solution techniques such as Hartree-Fock [13].This is expected based on the complexity of solving quantum chemistry systems [14].
The question of how to obtain excited states is one that has been investigated in recent papers [6,[15][16][17][18][19][20][21][22][23][24][25], and a direct solution would provide a means to fully manipulate the wavefunction.If this can be accomplished without the use of time evolutions, then avoiding the small time step necessary for those methods could be possible.
In addition to ground state solvers, obtaining excited states is a highly valuable quantity for quantum chemistry systems.Historically, excited states have been more difficult to obtain.So, if a quantum algorithm could reliably obtain the excitations, then this would represent a major improvement over existing classical techniques [26][27][28].
Recently, Lanczos methods have been investigated in the context of solving quantum systems.One variety of Lanczos on the quantum computer, uses even vectors of a Krylov subspace and imaginary time evolution techniques to obtain the ground state and other quantities of interest [21,29].
Another recently introduced variety of Lanczos algorithms [30] uses oblivious amplitude amplification (OAA) [31][32][33]-an algorithm similar to Grover's search but run on auxiliary qubits [34][35][36]-to apply operators directly onto wavefunctions.Since OAA applies operators onto wavefunctions, all the necessary operations for Lanczos can be implemented directly.The full Lanczos recursion can be implemented to find the ground state or the continued fraction representation of the Green's function [30].This second Lanczos technique called quantum Lanczos recursion (QLR) avoids the use of a time evolution operator and therefore bypasses the computational bottleneck in terms of the number of terms in the Trotter-Suzuki decomposition.
One other advantages of the QLR is that the traditional limitations of Lanczos on the classical computer are entirely circumvented [37], and only one number of wavefunctions.The only limitation is how accurately the operations can be applied to the wavefunction in practice, and this has recently been investigated on a quantum computer [38].
This paper uses similar techniques as QLR to show that the traditional Lanczos recursion can be replaced by a block Lanczos routine to resolve several excitations, leading to quantum block Lanczos recursion (QBLR), although "block" can be replaced by "banded" or some other name corresponding to a trivial change of gauge of the unitary matrices involved.While it is trivially demonstrated from QLR that excitations can be found, the performance of block Lanczos will allow for the resolving of degeneracies with greater ease.This was recently demonstrated in tensor network algorithms [39,40].
The algorithm here in the can also be performed with the preparation of a single initialization of starting wavefunctions.A full collapse of the eigenstates is avoided, meaning that a wavefunction can be preserved for the next computation.This is accomplished by use of a statepreserving quantum counting algorithm [30], referred to in some works as QMA-sampling [41,42].
Some additional discussion on how errors in the Lanczos coefficients will affect the ground state energy and otherwise are also considered.The method of slowly introducing terms into the Hamiltonian is also discussed in the context of Lanczos to show that the OAA algorithm does not need to scale exponentially for limited additional terms.

II. EXCITATIONS FROM QUANTUM LANCZOS RECURSION
The Lanczos algorithm from Ref. 30 can be used to find excitations of a given model by a simple alternative of coefficients.In this section, QLR will be reviewed and an extension to finding excited states will be shown.
A Lanczos recursion relation to find subsequent elements of the Krylov subspace, {ψ 0 , ψ 1 , . . ., ψ N } is where the resulting Hamiltonian in the basis of the Krylov subspace forms a tridiagonal matrix.When diagonalized, the ground state is found to a high accuracy even if only a few n are determined.a. Applying operators to wavefunctions.-Theonly ingredient that is necessary for this form of the ground state solution is to ensure that the operators could be applied to the wavefunction.The method to do this was introduced in Refs.31?where an oblivious amplitude amplification (OAA) algorithm [32,33] was used to improve on repeat-until-success methods which have the same goal [43,44].Essentially, when an operator is applied to a wavefunction as in a repeat-until-success strategy, the operation is controlled on some auxiliary qubits that give 0 if the application of an operator is successful and 1 if it is not.OAA searches for a state on some auxiliary qubits corresponding to all 0s.By searching over the auxiliary qubit states, the algorithm remains oblivious to the wavefunction itself.This essentially guarantees the outcome from the related method of repeat-until-success to apply the operator in one step [43,44].For how to construct the operators, see the discussion in Ref. 45. b.Minimal measurements of the wavefunctions.-Inorder to sample the coefficients α n and β n without completely measuring (and therefore destroying) the wavefunction, a state-preserving quantum counting algorithm can be used.The algorithm applies a generic operator A as in the form which signifies a superposition of eigenstates.The operator A is normalized and represented as a unitary such that it can be represented on the qubits [12,30].The resulting probability p is the expectation value of A. All states orthogonal to the original state are marked with a ⊥ symbol.The basis of the superposition chosen here is that of the eigenbasis because this will be the natural basis to pick for quantum phase estimation (QPE) [1,45,46].
The key to finding p is to count the number of transitions from Ψ to Ψ (wavefunction to same wavefunction) after the application of A by OAA or some other algorithm.To verify that the same state is obtained after this procedure, the energy of the state can be computed with QPE at the start of the algorithm and stored on a register.After the operator is applied, the energy is then computed on a separate register.The two registers are compared and represented on a single qubit, called a pointer qubit.The pointer qubit is then measured.If the energies match, one value is returned and the original wavefunction is recovered.This is counted as a "success" in the algorithm.The ratio of successes to the total times the algorithm is run is p.Once p is found, the expectation value of A can be determined.
If the pointer qubit demonstrates that the wrong state was recovered, then a recovery procedure is used to find the original state [12,30,42,44].In essence, the unitary of all operations applied onto the wrong wavefunction and the process above is repeated until the correct wavefunction is found [42].
c. Operators for Lanczos recursion.-Tofind the Lanczos coefficients, the following relations hold [30] and therefore provide a means to use state-preserving quantum counting to obtain the coefficients.The map between the Krylov states and the original ground state is crucial but can be summarized as where some examples of these operators are shown in Ref. 30.The coefficient α n can be regarded as applying quantum counting on the state Ψ with the operator ( Ĝ † n H Ĝn ).Each operator Ĝn depends on coefficients from {0, 1, . . ., n − 1} iterations and therefore the algorithm discovers the coefficients iteratively.To find β n , the operator ( Ĝ † n−1 H Ĝn ) is used instead.
d. Energies from QLR.-Once the Lanczos coefficients are obtained, the Hamiltonain matrix in its tridiagonal form is then known.Diagonalizing this matrix and retaining both the energies and eigenvectors makes the new ground state in terms of the Krylov basis chosen.
Defining an operator Ŷ (g) for an excitation g ∈ Z + , the operator for the gth excitation would be defined as n Ĝn (6) in terms of coefficients γ n found from the diagonalization.The summation over n is over as many elements in the Krylov basis as kept.
Thus, the QLR algorithm can access ground states (g = 0) or excited states (g ≥ 1) by simply selecting different coefficients from the diagonalization of H.At the end of this procedure, the ground state is recovered and can be used without fully re-preparing it.
A. Reduced computational complexity of applying operators a.First strategy: apply interaction incrementally.-Whenapplying an operator to a wavefunction, several auxiliary qubits are used.OAA is a Grover search over auxuiliary qubits, so it will scale exponentially, O( √ 2 q ) for q qubits, in terms of the number of auxiliary qubits.While Grover's algorithm promises a square root speedup over classical search methods, the size of the database on the quantum computer is exponentially large in terms of the number of qubits.This calls into question whether operators can actually be applied to wavefunctions in the manner prescribed earlier in total, but the particular details of the algorithm will show that this can be done efficiently.This clearly will not present an issue for finding quantities necessary for density functional theory [12], since the required operators are small (q = 2 for coefficients of the one-body reduced density matrix).
By applying operators from the full Hamiltonian incrementally in groups of size D, the cost can be reduced to O(D2 q/D 2 ).Thus, the OAA is feasible here since the Hamiltonian can be expressed as a linear combination of unitaries, this strategy applies to any system of interest [32].The minimal size of a group of operators is the same as a single term in the Hamiltonian.For many-body problems, this will be q = 2 or 4 terms for the quadratic single-body terms or the quartic electroninteraction terms [12].
b. Second strategy: decrease strength of interaction.-Notethat the operator applied onto the original wavefunction Ψ does not need to be an operator whose eigenvalues include Ψ.This means that starting from some known state Ψ with associated operator H 0 , can be defined as a new Hamiltonian.This form of the Hamiltonian has a similar form as the the adiabatic evo- lution in Eq. ( 1), except that the λ coefficient can be much larger than the step size in time evolution.
The interaction term, H I , can be the full interaction term or one term of that interaction.By adding the terms incrementally, the final state is closer to the initial state provided and will allow for the algorithm to find the new ground state.It is crucial that each step of this procedure begins with an eigenvector so that the QPE can be applied correctly in the quantum counting procedure.

B. Demonstration on model systems
A full demonstration on real systems by implementing a linear combination of unitaries will be delayed for a future work, but it will be shown here taht Lanczos can be applied iteratively according to the suggestions in the previous paragraphs.
In order to demonstrate that only a limited number of Lanczos steps can be used to solve a model that includes a small number of extra terms from the starting wavefunction's Hamiltonian, a numerical study on a 10-site XXZ model of the form where J xy = J z is the Heisenberg Hamiltonian and spin matrices S = ( Ŝx , Ŝy , Ŝz ) = 1 2 σ (with = 1) for the Convergence in energy (E) while adding a large interaction term ĴzS z i • Ŝz i+1 with Jxy Jz.The parameters are the same as FIg. 1.By using 4 Lanczos steps instead of 2, the accuracy is greatly improved in this case.Decreasing the incremental interaction strength, dλ (here, 0.5 with two rounds of NLanczos = 2), would require more than doubleprecision (see text).
vector of Pauli matrices σ [47].To start, an XY model, will be solved for the initial wavefunction and a single interaction term of the form Ŝz i Ŝz i+1 will be added.In all, 9 terms will be added to the Hamiltonian.Computations were made with the DMRjulia library using the density matrix renormalization group (DMRG), Lanczos, and exact diagonalization (ED) routines [48][49][50].
There are three cases of study here: J xy = J z (small perturbations), J xy J z (large perturbations), and when the initial ψ 0 is far from the starting state.
1. Small perturbations (Jxy = Jz) Figure 1 shows how the energy converges to the energy of the full Heisenberg model with increasing numbers of terms.In each case, using the initial wavefunction provided from the previous iteration, only one Lanczos iteration must be run to obtain a highly accurate energy with the new interaction term included.The small difference in energies between the DMRG solution and the Lanczos solution is shown in the inset of Fig. 1.There is also the possibility to add in a partial term by using a small term dλ for each of N times such that N dλ = λ.This would require more applications of the Lanczos algorithm with new Hamiltonians and may be useful for long-range interactions or other cases.
In this one-dimensional example, the convergence is aided by only adding one term.In realistic systems, the random ψ 0 FIG. 3.
Convergence in energy (E) similar to Fig. 1 except that a random starting state was used.Tests on larger systems or with more Lanczos recursion steps quickly suffer from precision errors that will not be present on the quantum computer.
same strategy of adding interaction terms piecemeal will both allow the Lanczos algorithm to converge quickly and also to reduce the time spent applying the operator with OAA.Still, this should be expected in general due to the rapid convergence of Lanczos techniques.

Large perturbations (Jxy
Jz) In this case, 100J xy = J z to simulate a large perturbation.For the example here, increasing the number of Lanczos iterations to 4 for each new interaction term added allows for the energy to be obtained to a good accuracy here.This is a large improvement over using only 2 Lanczos iterations as shown by comparing the curves in Fig. 2.
It is possible to use only 2 Lanczos updates if one adds portions of the interaction term.In this case, J z /2 is added to the Hamiltonian twice with 2 Lanczos steps each (total 4 Lanczos steps).The results could be improved if more Lanczos iterations were used here, but this would require greater precision in the coefficients than is available here with a double-precision classical implementation.
Note that tests with coefficients found on the classical computer will be subject to numerical instabilities that will eventually degrade the accuracy of the resulting ground state, so a full solution with this method will generate imprecise answers.For example, when increasing the number of Lanczos iterations to 10 for each step, this can occur in this example.

Arbitrary starting wavefunction
So far, eigenstates for the starting wavefunction were used.The natural question is whether the starting states could be replaced by some arbitrary state and how the convergence of the algorithm is affected.When implementing this type of initialization on the quantum computer, the only key is to determine the energy of the wavefunction.If using QPE to do this, then the starting state must have an associated Hamiltonian.
For demonstration purposes, the initial state of alternating spins here is is taken as the initial state with J xy = J z in the Hamiltonian.While the Hamiltonian which has an eigenstate of Eq. ( 10) is not known and would therefore prevent the use of this state in the quantum algorithm, it is instructive to observe the convergence in this case where the initial state is not close to the final problem to solve.Figure 3 shows the convergence for this starting wavefunction.The first Lanczos iteration will be the most difficult since it must change the wavefunction the most.Subsequent iterations converge more easily to the true ground-state just as in the previous cases.
These examples demonstrate that applying operators incrementally is possible and will yield a large cost reduction on the quantum computer.The examples here were on the ground-state, but higher excited states can be found similar to the discussion around Eq. ( 6) once the Lanczos coefficients are known.In this example, the precision that can be found from the classical simulation is restricted [37].The quantum computer is only limited is not a limitation on the quantum computer assuming perfect application of the operators.

III. QUANTUM BLOCK LANCZOS RECURSION
In principle should be able to discover all excitations from QLR as described above [51], but the extension of this method to a block or banded Lanczos algorithm is known to resolve degeneracies to a higher degree and aid convergence generally [39].Block Lanczos is used in quantum chemistry [52] but also in physics, particularly for dynamical mean field theory computations [53].The scalar coefficients of the Lanczos recursion are extended to a matrix of coefficients.
To formulate the problem, consider a set of wavefunctions grouped as a supervectors Ψ is a vector of d excitations, (11) and therefore the task is to find matrices A and B which are of dimension d×d block such that Lanczos can be performed.This means that d registers, each with a wavefunction are also available.
Extending the 3-term recursion from Eq. 2 to a block or banded (or other) Lanczos scheme with more terms in the recursion would be possible to prepare more than one excitation at a time [53].The expanded Lanczos recursion relation appears as [54] for a vector of wavefunctions Ψ with matrices and B n defined recursively from as can be most immediately seen from the tensor network diagrams in Ref. 39.It should be understood that when applying H onto the wavefunction supervector that the Hamiltonian is applied onto each wavefunction in the vector.The implication of Eqs. 13 and 14 is that there are simply d 2 applications of QLR to obtain QBLR.
Because the coefficients can be obtained by an operator acting on a ground state of an initial Hamiltonian, this implies that the coefficients of both A and B can be recovered by performing a state-preserving quantum counting operation on each term of the matrix.This was also true in the scalar case, and this establishes that the block Lanczos case is in the RWMP category of algorithms thus avoiding repeated wavefunction preparation [12].Each coefficient must be obtained individually: one quantum counting process for each operator.However, If operations can be performed in parallel on the quantum computer, then this could improve performance to find all coefficients of a block simultaneously.
On the classical computer, the blocks can be represented as a block diagonal super-matrix representing the Hamiltonian which can be diagonalized to find the energies of the excitations.From the coefficients of the eigenvectors of H (denoted as γ n still here too), the excitation wavefunctions can also be obtained.
In order to understand how best to apply the operators on the quantum computer, the block Lanczos equation can be written as for a single row i of the left hand side.This form makes clear that the d registers containing the d excitations can be acted on with the appropriate operators (sum over j) and added with the wavefunction on other registers with the appropriate operators.Note that the elements of A and B are stored classically and therefore the inverse of each matrix can be found.If this is done, then apply B −1 n+1 once the coefficients are found from Eq. ( 14).
The operators from Eq. ( 6) will be denoted as G n for a given level and are extended from the scalar Lanczos case as Ĝn → G n .Similarly, ψ → Ψ for the wavefunction.One additional operation is included G, compared with the operators listed in Ref. 30, that of the inverse B −1 operator.Since the operators can be determined on the classical computer, the operators can simply be prepared in a slightly different way.Again, the inverse is converted to a unitary as is standard for applying operators [12,[30][31][32]43].
In all, the algorithm costs a practical amount of d 2 over the scalar Lanczos case.Each element of the matrix equations is simply one application of a set of equations slightly modified from QLR.Note that the effort expended to apply operators onto wavefunctions is not wasted at the end with a single measurement.The statepreserving quantum counting algorithm can be used to obtain the correct expectation values without completely measuring the wavefunction.

A. Algorithm summary
The following summarizes the previous discussion to demonstrate how to implement block Lanczos on the quantum computer.
Quantum block Lanczos recursion: Algorithm for multiple excited-states 1.A set of starting eigenfunctions {|Ξ } is prepared on ν registers (one for each wavefunction).
2. Start a counter at n = 0.
3. Construct the operator G n representing the appropriate step from Eq. ( 12).This operator spans several excitations.
4. G n is applied onto the current state and quantum counting is used to determine the Lanczos coefficients, given by Eq. ( 13) and (13).
5. With the new coefficient(s), the algorithm returns to step 2, increments n, and finds the next step of coefficients.
6. Storing the coefficients classically, the block diagonal Hamiltonian from Eq. ( 15) can be formed and diagonalized.A set of coefficients γ n can then be used to determine the energies.The scaling of the method is no worse than the application of the operators at each step, albeit the number of times this must be run for d excitations is O(d 2 ).As pointed out in Sec.II A, the incautious application of OAA will scale exponentially, but to aid convergence and avoid large computations of operations the interaction term can be applied in smaller pieces.This drastically reduces the number of Lanzcos steps required to obtain the next wavefunction and limits the time necessary to run the OAA algorithm.It is also possible to use a repeat-until-success strategy here [30,43,44], but the guaranteed result from application of OAA probably will save time in the long run.
It is not known beforehand the coefficients of the next step, so each step must be performed iteratively.Once the coefficients are obtained with the quantum counting process, then they can be stored classically and used without obtaining them again, although the d 2 coefficients of a given block can be parallelized.Note also that the algorithm can be restarted at any time since the coefficients are stored classically.
The ground state energy can be checked when diagonalizing Eq. ( 15) on the classical computer.If the ground state energy is converged within the accuracy needed for QPE, then there are sufficient Lanczos steps run to find an accurate ground state energy.

B. Error analysis
In this section, a careful analysis of the relevant parameters of the system will show how uncertainty in the Lanczos coefficients will influence the resulting energies.
To investigate the effects of noise on the resulting energies, a block Hamiltonian of a particular size a is created for b such blocks.When a = 1, the QLR algorithm is used.When a > 1, QBLR is represented.A set of matrices are generated with values between [0, 1] to mimic the values on the operators for the quantum computation.A noise term selected from a Gaussian distribution of width η is selected for each element.
The energies with noise E are computed with respect to the true energies without noise E 0 to find the mean absolute error (MAE) Ē defined as for a number of eigenvalues M .The MAE is shown in Fig. 4. As expected, as the noise decreases in each of the parameters, the accuracy of the energy eigenstates increases.In both cases, the error decreases linearly with the noise applied to each term.This is a straightforward but useful result.If the quantum counting obtains coefficients to a precision δ, then the resulting energy is also obtained to an error of roughly δ.The change in this trend for other parameters that could have been picked (larger block sizes, more blocks, etc.) is very stable.
What this implies is that for a QPE to obtain the correct eigenvalue, the Lanczos coefficients must be sufficiently accurate (i.e., δ is a threshold for how accurate the coefficients will be).This is a crucial aspect to know how much precision must be obtained from the quantum counting algorithm.

C. Discussion
The advantages of many excitations being discovered is chiefly one of stability.The ability to resolve degeneracies and generate orthogonal wavefunctions that is valuable in a variety of contexts and now available for the quantum computer.That this method is rapidly convergent [55,56], resolves degeneracies, and avoids repeated wavefunction preparation means that this method could be a valuable alternative to time evolution methods.
Note that unlike in Ref. 39, a singular value, QR, or LQ decomposition [57] was not used.This is primarily because it was not necessary here, but it has several advantages.First, many of these algorithms on the quantum computer require a quantum memory, which may be far off in terms of development [58,59], particularly with the growing consensus that probably approximately correct (PAC) learning on the quantum computer is not likely to be the best way forward for quantum machine learning [12,60].Although, expanding the definition has been suggested to lead to a logarithmic dependence on the number of measurements for tomography in terms of the total Hilbert space size [61,62], finding the initial state for the tomography could be accomplished with QLR or QBLR.
The goal of QBLR is to retain the accuracy of the wavefunction, which is controlled directly through the gate fidelities and other quantities on the quantum computer.The quantum advantage sought here is for an exponential reduction in memory, which is a property that quantum computers exhibit under the extended Church-Turing thesis which asks if an algorithm can be computed with significantly less memory resources over classical computing [63].Lanczos techniques do have this property when applied on a quantum computer theoretically if perfect application of gates is assumed and with sufficient time to sample the coefficients.The typical errors on a classical computer [37,51,[63][64][65] do not appear since values are retained to quantum precision.
The opportunity to obtain ground states from QLR places added emphasis on the development of statepreserving quantum counting and methods of applying operators to wavefunctions such as the linear combination of unitaries (and included subroutines such as OAA) to obtain both the Green's function and ground-state.
The possibility to discover ground states or excited states deserve more consideration since these methods are free of time steps and Trotter-Suzuki decompositions, a common feature in many other proposals.The Lanczos algorithms also do not need any notion of locality to aid convergence as would be expected for a matrix product state's relationship to local Hamiltonians [49,66,67], particularly for time-evolving block decimation (TEBD) [48].The only instance where locality plays any role is in the writing of the application of the operators to the wavefunction, which could play a role in near-term implementation.It is not clear how many Lanczos coefficients would need to be obtained to find accurate ground states from this method for phase-estimation to give accurate results.Further discussion would require specialization to a specific problem and is deferred to a future study.
Note that extensions to a fitting function for the remaining coefficients is possible in principle [68].

IV. NON-HERMITIAN OPERATORS
The previous discussion was for the block Lanczos algorithm that is formulated for the problem of a Hermitian operator.The extension of the above methods to non-Hermitian operators is possible without introducing too much additional computational cost.Instead, only one additional set of matrices (or in the case of scalar Lanczos, one additional set of coefficients) should be found.The procedure will be define for the block-matrix case, but it can be reduced to the scalar case when the block size is of size 1.
Given a non-Hermitian operator H with eigenvalue E, a set of two eigenvalues can be defined.One is known as the left-eigenvectors (a transpose is used even if there are complex valued entries) [65] and the other is for the right-eigenvectors, where block matrices Ψ L and Ψ R have the orthogonality relation [65] Ψ T L Ψ R = I d×d (20) with an identity matrix I d×d of dimension d × d.
The final term is an identity matrix to ensure that the dimension of the resulting matrix is consistent with all terms in the recursion.Only the last block of the matrix is non-zero where blocks of zero matrices, 0 d×d .Writing out the explicit terms of the recursion relation in the style of the G operators from earlier is lengthy, but a single operator can be written to be applied on the starting wavefunction just as for QLR [30].The only additional cost is the determination of an extra block matrix, C, and double the number of registers to represent both the left-and right-eigenvectors.
The extension of the block Lanczos algorithm to the non-Hermitian case has therefore only introduced an extra matrix C n which must also be found with the other two sets of matrices.However, this does not increase the overall computational cost of the algorithm presented here.The same forms for the operators connecting the original wavefunction provided to the algorithm can be derived similarly as for the Hermitian case.

V. CONCLUSION
Lanczos recursion methods on the quantum computer were extended to solve for many excitations simultaneously.This uses a block Lanczos technique that is good at resolving degeneracies in quantum states.This comes at only a cost of the number of excitations squared sought on the quantum computer.The use of the quantum counting algorithm here allows for the wavefunction to not be collapsed at each step, cutting out a major cost of many other algorithms.Further, interaction terms can be applied in small groups to aid convergence and keep the process of applying those operators to the wavefunction less than exponentially long.The error of diagonalizing the Hamiltonian in the Krylov basis was demonstrated to scale linearly with the noise of the coefficients.The method can also be applied onto non-Hermitian operators with a moderate additional cost.Due to the feasible cost of this algorithm and the rapid convergence of Lanczos techniques, it is expected that quantum block Lanczos recursion could be an alternative to existing methods to find the ground and excited states.

J
FIG. 1. Convergence in energy (E) while adding one interaction term Ŝz i • Ŝz i+1 to an XY model on a 10 site lattice (9 interaction terms to add).Two solvers are used at each step.DMRG is shown as a solid blue line and a Lanczos solver is shown as a red dashed line.The initial wavefunction for the Lanczos algorithm is taken from the previous iteration.A black dashed line shows the energy of the full Heisenberg model.An inset shows the difference between the DMRG and Lanczos solutions.Only one Lanczos iteration was used for each added term.Inset: energy differences from the exact value, ∆E.

FIG. 4 .
FIG. 4. Mean average error for a system of block size d = 20 for various numbers of iterations {4, 5, 6, . . ., 20}.All lines are nearly the same in magnitude.The general linear trend is mostly unchanging with the input parameters.
are two recursion relations for each of the left and right eigenvectors.They take the form of[69,70] Ψ T L,(n) H = Ťn Ψ T L,(n) + I n C n+1 Ψ T L,(n+1)