This site uses cookies. By continuing to use this site you agree to our use of cookies. To find out more, see our Privacy and Cookies policy.
Paper The following article is Open access

Quantum Davidson algorithm for excited states

, , , , and

Published 22 April 2024 © 2024 The Author(s). Published by IOP Publishing Ltd
, , Focus on Recent Progress in Quantum Computation and Quantum Simulation Citation Nikolay V Tkachenko et al 2024 Quantum Sci. Technol. 9 035012 DOI 10.1088/2058-9565/ad3a97

2058-9565/9/3/035012

Abstract

Excited state properties play a pivotal role in various chemical and physical phenomena, such as charge separation and light emission. However, the primary focus of most existing quantum algorithms has been the ground state, as seen in quantum phase estimation and the variational quantum eigensolver (VQE). Although VQE-type methods have been extended to explore excited states, these methods grapple with optimization challenges. In contrast, the quantum Krylov subspace (QKS) method has been introduced to address both ground and excited states, positioning itself as a cost-effective alternative to quantum phase estimation. However, conventional QKS methodologies depend on a pre-generated subspace through real or imaginary-time evolutions. This subspace is inherently expansive and can be plagued with issues like slow convergence or numerical instabilities, often leading to relatively deep circuits. Our research presents an economic QKS algorithm, which we term the quantum Davidson (QDavidson) algorithm. This innovation hinges on the iterative expansion of the Krylov subspace and the incorporation of a pre-conditioner within the Davidson framework. By using the residues of eigenstates to expand the Krylov subspace, we manage to formulate a compact subspace that aligns closely with the exact solutions. This iterative subspace expansion paves the way for a more rapid convergence in comparison to other QKS techniques, such as the quantum Lanczos. Using quantum simulators, we employ the novel QDavidson algorithm to delve into the excited state properties of various systems, spanning from the Heisenberg spin model to real molecules. Compared to the existing QKS methods, the QDavidson algorithm not only converges swiftly but also demands a significantly shallower circuit. This efficiency establishes the QDavidson method as a pragmatic tool for elucidating both ground and excited state properties on quantum computing platforms.

Export citation and abstract BibTeX RIS

Original content from this work may be used under the terms of the Creative Commons Attribution 4.0 license. Any further distribution of this work must maintain attribution to the author(s) and the title of the work, journal citation and DOI.

1. Introduction

Computing the ground and excited state properties of intricate many-body systems is a cornerstone of quantum physics and chemistry. Despite the importance, this endeavor demands substantial computational power due to the factorial growth of the full many-body wavefunction's solution space as the system size (represented by the number of electrons and basis functions) [13]. As a result, classical quantum chemistry techniques such as Hartree–Fock (HF), density functional theory [4, 5], tensor network methods [6, 7] that optimize the wavefunction in the form of a matrix product states, selected configuration interaction (CI) [8, 9] that iteratively expands the CI spaces, and coupled-cluster theory truncated at finite orders [10] have been conceived to bypass the direct formulation of full many-body wavefunctions. However, these techniques invariably employ truncations or approximations and are limited to a certain size.

Since the 1980s, quantum computers (QCs) that leverage the power of quantum entanglement have been proposed as the ideal platforms for simulating quantum mechanics [11, 12]. Advancing into the noisy intermediate-scale quantum (NISQ) era [13], quantum computing has shown its potential with the demonstration of quantum advantages in well-defined tasks [14]. Electronic structure problems, crucial to various scientific disciplines, emerge as one of the most promising and immediate applications of QCs [13, 15]. Numerous quantum algorithms have been proposed for calculating the ground state of quantum many-body systems on QC since the advent of quantum phase estimation [16, 17]. However, the inherently noisy nature of NISQ devices necessitates hybrid quantum–classical algorithms with shallower circuits. To this end, the variational quantum eigensolver (VQE) that leverages the power of variational principle and classical optimization was conceived accordingly [18]. The VQE scheme deploys the parameterized wavefunction(or ansatz) and the corresponding energy measurement on QCs and then uses classical algorithms for variational energy minimization. VQE algorithm has been performed on various quantum architectures such as photons [18], superconducting qubits [19, 20], and trapped ions [21]. Since then, many algorithms have been proposed to improve the performance further or reduce the quantum resource requirements of VQE [2234].

Despite the extensive development of quantum algorithms for electronic structure problems, the majority pivots on ground state properties. However, many photophysical and photochemical critical processes, including energy transfer [35], bond dissociation [36], light emission and nonadiabatic dynamics [37, 38], revolve around electronically excited states. Which necessitates the development of quantum algorithms for excited states. One straightforward way is to extend VQE for excited states by introducing certain constraints [3945]. Despite the success and impact of VQE algorithms, they suffer from optimization problems. The optimization process in VQE is challenging due to the high nonlinearity of the energy and stochastic errors [46] and is compounded by the inclusion of multiple excited states.

Alternatively, the other emerging direction for calculating excited states on QC is based on the quantum subspace, showcased by quantum subspace expansion [43, 4750], non-orthogonal VQE [51], equation of motions [52, 53], and the quantum Krylov subspace (QKS) framework inspired by its classical analogs [5458]. Current QKS methods utilize either real or imaginary time [55, 56] evolutions to generate the Krylov subspace, which then is used to sample the low-lying spectrum of the Hamiltonian $\hat{H}$. In particular, the quantum Lanczos (QLanczos) algorithm [56] that engages a basis of correlated states generated from the imaginary-time propagation [59, 60] has been proposed. Even though the QKS methods remove the optimization problems of the VQE algorithms, the current QKS usually requires a relatively deep circuit due to the trotter expansion of the real/imaginary time evolution and a larger number of iterations for convergence. Moreover, the pre-generated Krylov subspace from the time evolution is not necessarily compact.

This research introduces the Quantum Davidson (QDavidson) algorithm, an economic QKS method that efficiently crafts a compact Krylov subspace. By harnessing the Residue and a pre-conditioner, Davidson's algorithm restricts the subspace search near the exact state, guaranteeing brisk convergence [61]. Compared to its classical counterpart, our strategy offloads subspace expansion to the QC, eliminating the explicit construction of full many-body wavefunctions on classical computers, leading to the speedup in the subspace projection. Compared to the existing QKS method, QDavidson's rapid convergence results in a much shallower circuit, making it potentially more noise resilient.

2. Theory

2.1. Krylov subspace and classical Davidson algorithm

In linear algebra, an order-r Krylov subspace generated by a matrix H and a reference vector b is the linear subspace spanned by the images of b under the first r powers of H [62]. This subspace is denoted as $\mathcal{K}_r(H,b) \equiv \{b, Hb, H^2b, \cdots, H^{r-1}b\}$. The Krylov subspace has been extensively utilized in numerical algorithms for finding solutions to high-dimensional matrices, such as the generalized minimal residual method, Davidson, and quasi-minimal residual algorithms [61].

In quantum chemistry, the iterative Krylov subspace $\mathcal{K}_r(\hat{H},\vert \psi\rangle)$ is especially valuable for identifying low-lying states in electronic structure theory since the number of such states is typically much smaller than the size of the solution space. Various versions of the Davidson algorithm have been developed to enhance convergence by designing efficient pre-conditioners [6365]. Furthermore, the Davidson algorithm has been generalized to use non-orthogonal Krylov spaces [66]. The flowchart of a standard classical Davidson algorithm is presented in algorithm S1 of the supplementary information (SI). Despite its computational efficiency, the generation of the subspace $\hat{H}^r\vert \psi\rangle$ remains a significant bottleneck in the Davidson algorithm and becomes computationally intensive on classical computers as the dimension of $\hat{H}$ grows.

2.2. QDavidson algorithm

In this study, we introduce a quantum counterpart of the Davidson algorithm, termed QDavidson, that harnesses QCs to mitigate the scaling challenges of generating the Krylov subspace. Compared to the traditional Krylov method, the QKS scheme encodes arbitrarily complex states on quantum circuits, where the matrix's projection into the subspace is measured. The benefits of QKS methods over VQE-based techniques for computing low-lying excited states include (1) an independent ansatz for each reference state with a streamlined quantum circuit and (2) the elimination of the intricate optimization process. In [56], quantum imaginary time evolution (QITE) is conducted using the Trotter decomposition of the evolution operator $\mathrm{e}^{-\hat{H} t}$ and mapping each Trotter step into a unitary. Subsequently, the QLanczos algorithm is introduced in the Krylov space derived from QITE snapshots. However, the QKS arising from sequential time evolution lacks compactness. Here, we develop the QDavidson algorithm to create a compact QKS set, yielding a more efficient and numerically stable realization of the QKS approach.

Instead of pre-generating the subspace through real or imaginary-time evolution, the QDavidson framework adaptively expands the QKS, keeping the subspace growth closely with the true eigenspace. Initially, orthogonal states serve as the reference. HF $\vert \phi_0\rangle$, single-excitation configurations $\vert \phi^a_i\rangle = a^\dagger_a a_i\vert \phi_0\rangle$, and CI single (CIS) states $\{\sum_{ia}C_{ia}\vert \phi^a_i\rangle\}$, which are efficiently computed on classical computers, are natural choices for initial reference states. The set of these initial reference states is denoted as $\{\vert \psi_k\rangle\}$. Within the QKS framework, each basis (subsequently called a Krylov vector) within the Krylov subspace of the jth Davidson iteration assumes the following ansatz,

Equation (1)

Here, multiple reference states (i.e. a linear combination of HF/CIS states) are utilized where $\vert \phi_I\rangle$ denote a single determinant. The entanglers $\hat{U}^j_\mathrm{K}$ arise from the Krylov space expansion and introduce correlations that extend beyond the initial states. In the case of QDavidson, the entanglers take the form $\hat{U}^{j}_\mathrm{K} = \mathrm{e}^{-\mathrm{i}\hat{A}^{j}_\mathrm{K}\delta\tau}$, where the operator $\hat{A}^{j}_\mathrm{K}$ is determined by mapping the non-unitary operator $\mathrm{e}^{-(\hat{H}-E_\mathrm{K}^j)\delta\tau}$ into a unitary form. The further details of $\hat{U}^j_\mathrm{K}$ will be elaborated later, with $\hat{U}^1_\mathrm{K} = 1$ for the initial iteration.

The general ground and excited states, denoted $\vert \Psi_\mathrm{I}\rangle$, can be expressed as linear combinations of the Krylov vectors,

Equation (2)

Therefore, the challenge of finding the ground state and low-lying excited states, represented by the equation $\hat{H}\vert \Psi\rangle = E\vert \Psi\rangle$, can be recast as the generalized eigenvalue problem HV = ESV within the Krylov subspace. Here, H denotes the Hamiltonian matrix within the Krylov subspace, as described by equation (1),

Equation (3)

Additionally, S represents the overlap matrix among Krylov vectors, with individual elements given by,

Equation (4)

Considering each Krylov vector may contain distinct entanglers and reference states, the matrix elements of both H and S are measured on QCs using an ancillary qubit and the Hadamard test [51, 55], as illustrated in figure 1. Once the elements of H and S are measured, the generalized eigenvalue problem HV = ESV can be trivially solved on classical computers due to the small dimensionality of the Krylov subspace.

Figure 1.

Figure 1. Schematic diagram of modified Hadamard test for measuring off-diagonal elements of H and S matrices. The expectation value of $2\sigma_{+} = X + \mathrm{i}Y$ operator is measured. For the overlap matrix the unitary entanglers are of the form $\hat{U}_{\alpha} = \mathrm{e}^{-\mathrm{i}\hat{A}_{\alpha}\delta\tau}$ and $\hat{U}_{\beta} = \mathrm{e}^{-\mathrm{i}\hat{A}_{\beta}\delta\tau}$, while for Hamiltonian matrix $\hat{H} = \sum_{i}{C_i\hat{P}_i}$ the $\hat{P}_i$ should be included into one of the unitary entangler.

Standard image High-resolution image

After solving for the approximate excited states in the current subspace, the residues of these approximate states can be computed as

Equation (5)

The norm of the residue can be measured on QCs similarly to the $H_\mathrm{KL}$ measurement,

Equation (6)

Hence, the measurement of $|\vert R_\mathrm{I}\rangle|$ is akin to the $H_\mathrm{KL}$ measurement but with the Hamiltonian $\hat{H}$ in equation (3) replaced by $(\hat{H}-E^2_\mathrm{I})^2$. The norm indicates the convergence of each eigenstate. If $|\vert R_\mathrm{I}\rangle|$ exceeds ε (where ε denotes the convergence criterion), a new Krylov vector, based on the normalized counterpart of $\vert R_\mathrm{I}\rangle$, should be incorporated into the Davidson algorithm, provided it is linearly independent within the existing Krylov subspace.

The classical Davidson employs the Krylov subspace $\mathcal{K}_r((\hat{H}-E),\vert \Phi_\mathrm{I}\rangle)$ to solve the eigenvalue problem. However, it is non-trivial to create the $\hat{H}\vert \Psi_\mathrm{I}\rangle$ state on quantum circuits with the non-unitary $\hat{H}$. As an alternative, within the QDavidson algorithm, a correction vector defined by

Equation (7)

is employed to expand the Krylov subspace. In other words, the QDavidson algorithm uses the subspace of $\mathcal{K}_r(\mathrm{e}^{-\Delta\tau(\hat{H}-E)},\vert \Phi_\mathrm{I}\rangle)$ to derive the eigenstates. Because $\vert \delta_\mathrm{I}\rangle = [1-\Delta\tau(\hat{H}-E)]\vert \Phi_\mathrm{I}\rangle+\mathcal{O}(\Delta\tau)$, it can be verified that $\mathcal{K}_r(\mathrm{e}^{-\delta\tau(\hat{H}-E)},\vert \Phi_\mathrm{I}\rangle)$ is equivalent to $\mathcal{K}_r((\hat{H}-E),\vert \Phi_\mathrm{I}\rangle)$ when $\Delta\tau\rightarrow 0$. The evolution detailed in equation (7) is subsequently mapped to unitary operators $\mathrm{e}^{-\mathrm{i}\hat{A}}$ as proposed in [56],

Equation (8)

where $n_\mathrm{I}$ is the normalization factor and $\hat{A} = \sum_\alpha a_\alpha\hat{P}_\alpha$. The coefficients aα are obtained by solving a system of linear algebra equations associated with the mapping (more details can be found in appendix A). An alternative method involves directly mapping the preconditioned residue $\frac{1}{\bar{H}-E_i}(\hat{H}-E)$ into $\mathrm{e}^{-\mathrm{i}\hat{A}}$, represented by $\vert \delta_\mathrm{I}\rangle = \frac{1}{\bar{H}-E_i}(\hat{H}-E) \vert \Phi_\mathrm{I}\rangle \approx C\mathrm{e}^{-\mathrm{i}\hat{A}} \vert \Phi_\mathrm{I}\rangle$ where $\bar{H}$ is the diagonal part of the Hamiltonian matrix in the Krylov subspace. We note that the investigation of the effects of different preconditioners on QDavidson's performance is beyond the scope of the current paper.

After mapping the residue operator to unitaries, the QDavidson algorithm determines if the new Krylov vectors (or the correction vector) are linearly dependent within the current subspace by introducing $\vert \delta^\prime_{\mathrm{K}^{\prime}}\rangle$

Equation (9)

Here, $d_\mathrm{KJ} = \langle \Psi_\mathrm{J}\vert\delta_\mathrm{I}\rangle$ and the norm $|\vert \delta^{\prime}_\mathrm{I}\rangle|$ is measured is measured on QCs. If the ratio $\frac{|\vert \delta^{\prime}_\mathrm{I}\rangle|}{|\vert \delta_\mathrm{I}\rangle|}\gt\epsilon$, it implies that the new Krylov vector $\vert \delta_\mathrm{I}\rangle$ is linearly independent within the current subspace, and hence, it should be incorporated into the subspace. As the inclusion of a new Krylov vector into the Krylov space introduces additional correlations, the next iteration will draw the results nearer to the exact solutions. The flowchart of the QDavidson algorithm is summarized in figure 2.

Figure 2.

Figure 2. Flowchart of the QDavidson algorithm. The orange (blue) box represents the part of the algorithm that is performed on QPU (CPU).

Standard image High-resolution image

Since the size of the Krylov subspace $N_\mathrm{K}$ is small, computing the generalized eigenvalue problems on classical computers is cheap. The primary complexity of the QDavidson algorithm stems from mapping the residue vectors into unitaries. Hence, its main bottleneck is the formation of S, b, and the resolution of the linear system to obtain unitary $\hat{A}$. Earlier research has shown that mapping non-unitary exponential operators into unitaries scales exponentially with correlation domain D [56]. But, a local approximation can be applied to eliminate the exponential dependence on D [56], leading to polynomial complexity, which is also utilized in the QDavidson method.

3. Numerical experiments

In this section, we present numerical results for the proposed algorithm. To demonstrate the performance of the QDavidson algorithm, we conducted exact quantum simulations of various systems, such as one-dimensional (1D) Heisenberg models and molecular systems, using a noiseless state-vector simulator.

3.1. 1D Heisenberg models

Both long-range (LR) and short-range (SR) 1D Heisenberg models, analogous to the models described in [56], were tested in this work. The SR models account only for nearest-neighbor interactions between spins, characterized by $C_{ij}(\hat{X}_i\hat{X}_j+\hat{Y}_i\hat{Y}_j+\hat{Z}_i\hat{Z}_j)$ terms. In contrast, the LR models consider pairwise interactions among all spins, encompassing a larger number of terms in a qubit Hamiltonian. Explicitly, the LR and SR Hamiltonians are given by

Equation (10)

and

Equation (11)

where $D_{ij} = \min(1+|j-i|, 1+N-|j-i|)$. N denotes the number of spins in the system. For the SR Hamiltonians, the index i is cyclic; thus, when it reaches N + 1, it reverts to 1. The QDavidson algorithm is state-dependent, necessitating the definition of initial reference states. We initiated the algorithm with the anti-ferromagnetic product state, which corresponds to the alternating $\vert 01..\rangle$ state in a computational basis. In order to benchmark the QDavidson algorithm against other QKS methods, a QLanczos algorithm with identical initial parameters was also implemented.

The results of the QDavidson and QLanczos algorithms for the 1D-Heisenberg models are shown in figure 3. For the initial four low-lying solutions, the QDavidson algorithm achieved convergence within 4 and 7 iterations for four-spin and six-spin systems, respectively (figures 3(E)–(H)). This performance surpasses the recently proposed QLanczos [56] algorithm (figures 3(A)–(D)), which not only converges slower but also displays numerical instability as the resultant states quickly become linearly dependent. By implementing root convergence criteria and a linear dependency check, the QDavidson algorithm exhibits enhanced numerical stability. The full results for the QLanczos algorithm are provided in the SI (figure S3). This algorithm was executed until an iteration produced a linearly dependent state. Notably, while the QLanczos managed to compute exact energy values for all four-spin models within six iterations (figures S3(A) and (B)), it did not converge for six-spin systems, and the final energy estimations showed a considerable deviation (figures S3(C) and (D)).

Figure 3.

Figure 3. Energy differences of the 1D Heisenberg models as a function of algorithm iteration. The energy difference is defined as $E_{\text{algorithm}} - E_{\text{exact}}$. Results for different states are represented by different colors: black for the ground state, blue for the first excited state, green for the second excited state, and red for the third excited state. Graphs (a)–(d) present the results of the QLanczos algorithm, while graphs (e)–(h) depict the results of the QDavidson algorithm obtained with the same QITE expansion parameters. Graphical representations of each system are provided in the bottom-left corner of each graph. The small circles with numbers symbolize spins, and the lines connecting these circles denote $C_k\hat{S}_i\hat{S}_j$ terms. Different Ck coefficients are illustrated by lines of varying colors and widths.

Standard image High-resolution image

As each iteration appends a new entangler after mapping the imaginary time evolution operator into unitaries, the circuit depth increases monotonically with iterations within the QITE, QLanczos, and QDavidson frameworks. Hence, faster convergence translates to more compact circuits. Compared to QITE algorithms, QLanczos converges faster in finding the ground state [56]. Our QDavidson algorithm substantially improves convergence by employing the residue operator to narrow the subspace search near the exact state, resulting in a significantly reduced circuit depth. Although this improvement may not be evident for smaller systems, it becomes remarkably advantageous for larger systems. To elucidate this, we examined how the lowest-state energy's accuracy varies with the resulting circuits' maximum depth for both QLanczos and QDavidson. The results are shown in figure 4. QDavidson reproduces the exact solution for six-spin systems when the subspace comprises circuits with maximum gate depths of approximately 400 and 900 for the SR and LR models, respectively. In contrast, QLanczos results are less accurate, and deeper circuits are required to perform the algorithm. For instance, the accuracy attained by QLanczos after eight iterations (gate depth of 480) for the six-spin SR model can be achieved by QDavidson using circuits with a peak gate depth of just 120. Given the iterative expansion of the subspace, each QDavidson algorithm iteration contains states characterized by circuits of various depths. Consequently, tracking solely the longest circuit within the subspace is sufficient. The circuit depth was analyzed based on the Pauli words present in the operator $\hat{A}$ in the $\mathrm{e}^{-\Delta\tau (\hat{H}-E)}\vert \Psi_I\rangle \rightarrow \mathrm{e}^{-\mathrm{i}\hat{A}}\vert \Psi_I\rangle$ expansion. Recognizing the elements of $\hat{A} = \sum_i \theta_i \hat\sigma_i$, a standard unitary evolution circuit could be constructed for $\mathrm{e}^{-\mathrm{i}\hat{A}}$ (assuming one Trotter step).

Figure 4.

Figure 4. Energy differences of the lowest states for six-spin 1D Heisenberg models as a function of a maximum circuit depth (A) SR model; (B) LR model.

Standard image High-resolution image

3.2.  π-conjugated hydrocarbons

In addition to the 1D Heisenberg models, we also examined our algorithm on chemical systems. As expected, molecular Hamiltonians are notably more complex than the 1D Heisenberg models due to the intricate entanglement between numerous orbitals. To highlight the advantage of the QDavidson algorithm for molecular systems, we studied three molecular systems: ethylene, cyclopropene cation, and benzene. The Cartesian coordinates of the investigated molecular systems are provided in the SI (see table S1). An active space representing the π-conjugated system was selected for all the systems. The detailed active orbitals can be found in the SI (see figure S1). Therefore, the (2e, 2o) active space was considered for the $\mathrm{C_2H_4}$ molecule, (2e, 3o) for $\mathrm{C_3H_3^+}$, and (6e, 6o) for $\mathrm{C_6H_6}$. The Jordan–Wigner transformation [67] was utilized to map the second-quantized Hamiltonian into the qubit Hamiltonian. Consequently, the largest system examined in this study is the benzene molecule, comprising six electrons and 12 spin-orbitals in the active space (which corresponds to a 12 qubit Hamiltonian with 407 terms).

Taking into account that the electronic structure problems in molecular systems maintain particle-preserving and total spin-preserving symmetries, it is beneficial to establish a symmetric pool of Pauli terms for the correction vector $\vert \delta_\mathrm{I}\rangle$ mapping. Therefore, a set of all possible spin projection-preserving single and double excitation operators was selected and then transformed into qubit operators employing the Jordan–Wigner (JW) scheme [67]. All unique Pauli terms with an odd number of $\hat{Y}$ operators were selected into the pool. This results in 12, 40, and 828 unique Pauli terms for the ethylene, cyclopropene cation, and benzene, respectively.

The performance of the QDavidson algorithm depends on the defined initial state. Multiple simulations were conducted using varying initial configurations ($\vert \phi_0\rangle, \vert \phi^a_i\rangle = a^\dagger_a a_i\vert \phi_0\rangle$). In particular, the HF, the first excited singlet, and the first triplet product states were taken into consideration. The QDavidson algorithm converges to exact energy values for the smallest molecular systems within several iterations. For $\mathrm{C_2H_4}$, starting from the HF product state, the QDavidson algorithm obtained the exact ground state energy (−77.115 18 Hartree) and the exact second excited singlet state energy (−76.375 41 Hartree) after just one iteration. Similar results were acquired for the $\mathrm{C_3H_3^+}$ system, where the exact ground state (−113.649 29 Hartree) and the first three singlet excited states were determined. Table 1 presents results for other initial states. Intriguingly, the eigenstates identified for the $\mathrm{C_3H_3^+}$ system maintain particle preservation and do not coincide with a neutral state solution with three electrons instead of two, even though they are lower in energy.

Table 1. Results of QDavidson algorithm for $\mathrm{C_2H_4}$ and $\mathrm{C_3H_3^+}$ molecules. The initial state and number of iterations for the algorithm convergence are given. Different eigenstates are denoted in parenthesis as the following: S0—ground singlet state, T1—the lowest triplet state, Si ith excited singlet state, Ti ith excited triplet state. The Sz denotes the spin projection of the obtained state.

MoleculeInitialNumber ofEnergies
stateiterations
$\mathrm{C_2H_4}$ $\vert 0011\rangle$ 1−77.115 18 (S0), Sz = 0
   −76.375 41 (S2), Sz = 0
  $\vert 1001\rangle$ 1−76.922 18 (T1), Sz = 0
   −76.582 76 (S1), Sz = 0
  $\vert 0101\rangle$ 0 a −76.922 18 (T1), Sz = 1
$\mathrm{C_3H_3^+}$ $\vert 000011\rangle$ 2−113.649 29 (S0), Sz = 0
   −113.198 54 (S1), Sz = 0
   −112.759 64 (S2), Sz = 0
   −112.681 41 (S3), Sz = 0
  $\vert 001001\rangle$ 2−113.352 09 (T1), Sz = 0
   −113.198 54 (S1), Sz = 0
   −112.968 18 (T2), Sz = 0
   −112.759 64 (S2), Sz = 0
  $\vert 000101\rangle$ 0 a −113.352 09 (T1), Sz = 1

a The initial product state is already an exact solution.

For the more extensive $\mathrm{C_6H_6}$ system, the QDavidson algorithm also accurately located the energies of several low-lying states (within chemical accuracy). However, as depicted in figures 5(A)–(C), many more iterations were needed. This is presumably due to the limited operator pool chosen, which only includes Pauli words from JW-mapped single and double excitation operators. Consequently, multi-electron systems (with electron count exceeding 2) might lack sufficient flexibility in the $\mathrm{e}^{-\Delta\tau (\hat{H}-E)}$ operator mapping. Regardless, the algorithm yielded meaningful results even with this restricted operator pool. For the benzene molecule, the algorithm found the first excited singlet and triplet states within 10−2 Hartree after approximately 30 iterations (see figures 5(B) and (C)). For comparison, the QLanczos algorithm tends to get trapped in linearly dependent solutions after approximately 30 iterations, and the precision of the energies obtained is inferior to that in the QDavidson case. Consequently, when initiating the algorithm with the $\vert \mathrm{HF}\rangle$ state, the energy error for the ground state was found to be $5\times10^{-3}$ Hartree, while the first excited singlet and triplet states could not be accurately reproduced, as illustrated in figure S2. With initialization with the excited state determinant, the algorithm successfully reproduced the energy of the first excited triplet within 10−1 Hartree. However, this accuracy is an order of magnitude lower than that achieved with QDavidson.

Figure 5.

Figure 5. Energies and errors of the first four low-lying states (S0, T1, S1, T2) of $\mathrm{C_6H_6}$ molecule obtained from the QDavidson procedure as a function of algorithm iteration. Results for different states are given in different colors. The algorithm was initialized with different product states: $\vert 000000111111\rangle$ (A) and (E); $\vert 000010011111\rangle$ (B) and (F); $\vert 000001011111\rangle$ (C) and (G); a combination of three product states mentioned above (D) and (H). Black dashed horizontal lines show the exact energies obtained from a direct diagonalization of the corresponding Hamiltonian. The geometry of the molecule is shown in the inset of (E).

Standard image High-resolution image

For larger systems, it becomes evident that initiating the algorithm from a singular initial state is not the optimal strategy to capture the first few low-lying excited states, as illustrated in figures 5(A)–(C). Even though the algorithm can locate states of interest, the accuracy is far from the desired precision of 10−3 Hartree. Even initiating the algorithm with the first excited singlet (figure 5(F)) or triplet (figure 5(G)) determinants leads to quicker convergence compared to using the HF initial state. However, the energy convergence remains slow and often diverges from the exact values. Additionally, the initialization of the QDavidson with the entangled triplet CIS state was performed. Although the initial rapid convergence toward the exact excited energy was observed as illustrated in figure S3 (the accuracy of 10−2 Hartree was achieved already at the third iteration), the convergence slows down and the desired accuracy of 10−3 Hartree was not achieved even after 30 iterations. In turn, the generalization of the algorithm with multiple initial states results in faster convergence and higher accuracy (see figure 5(H), highlighting the significance of multireference states. Notably, chemically accurate energies for S0, T1, and T2 states could be obtained after just 11 iterations. Therefore, to efficiently find the low-lying excited states of a large molecular system, it is advised to begin with multiple initial states to expedite energy convergence. Nevertheless, it is anticipated that the convergence will be affected by different initial states, and we expect a more significant overlap between the initial states and true ground state will accelerate the convergence as is in classical Davidson algorithms.

3.3. Effects of statistical shot-noise

Owing to the finite number of quantum measurements (shots), exact measurements of the Hamiltonian matrix and overlap matrix elements within the Krylov subspace are unattainable. A limited shot count may introduce numerical instabilities into the QDavidson procedure. In general, to estimate the expectation value of a Hamiltonian with respect to a single state $\vert \psi\rangle$ with precision p, it is required to perform $O(|h_{\max}|^2 Mp^{-2})$ measurements, where $h_{\max}$ is the largest coefficient in the Hamiltonian decomposition $\hat{H} = \sum_i{h_i\hat{P}_i}$, and M denotes the number of Hamiltonian terms [18]. Similar conclusions apply when evaluating Hamiltonian matrix elements within the Krylov subspace. Since $\langle \Psi_\mathrm{I}\vert \hat{H} \vert \Psi_\mathrm{J}\rangle = \sum_i{h_i\langle \Psi_\mathrm{I}\vert \hat{P}_i \vert \Psi_\mathrm{J}\rangle} = \sum_i\sum_\mathrm{KL}V^*_\mathrm{KI}V_\mathrm{LJ}$ $\langle \psi_K\vert \hat{P}_i\vert \psi_\mathrm{L}\rangle$ and each element $\langle \psi_\mathrm{K}\vert \hat{P}_i\vert \psi_\mathrm{L}\rangle$ can be evaluated according to figure 1, the cost of evaluating the Hamiltonian matrix element is $O(|h_{\max}|^2 Mp^{-2}N^2_\mathrm{K})$ where NK is a size of the Krylov subspace. Although this measurement process can be complex, in practice, only a small subspace is typically spanned, and the growth of the subspace is linear with respect to the number of iterations, making the $N^2_\mathrm{K}$ factor relatively insignificant compared to $|h_{\max}|^2 Mp^{-2}$. Likewise, the overlap matrix's measurement incurs a cost of $O(p^{-2}N^2_K)$ shots. The procedure for mapping residual vectors to unitaries also requires quantum measurements. The required shot count here depends on the size of the operator pool (P) chosen for the mapping and is in order of $\max[O(|h_{\max}|^2 Mp^{-2}N^2_\mathrm{K} P),O(p^{-2}N^2_\mathrm{K} P^2)]$. Another procedure necessitating quantum measurements involves checking for root convergence and assessing linear dependency. The root convergence check, as introduced in equation (6), incurs a cost of $O(|h_{\max}|^4 M^2p^{-2}N^2_\mathrm{K})$ measurements. This is considered affordable since size of Krylov subspace $N_\mathrm{K}$ is small and M grows polynomially with the system size. For linear dependency, if it is realized through the ratio $\frac{|\vert \delta^{\prime}_\mathrm{I}\rangle|}{|\vert \delta_\mathrm{I}\rangle|}\gt\epsilon$ the number of measurements required would be $O(p^{-2}(N_\mathrm{K}+1)^2)$. Alternatively, linear dependency can be assessed by computing the determinant of the new overlap matrix (checking $\det(S) \lt \epsilon$) obtained by including $\vert \delta^{\prime}_\mathrm{I}\rangle$ in the Krylov subspace, with the same number of measurements. It is noteworthy that QLanczos formally requires fewer measurements per iteration as it does not involve checking for root convergence and linear dependency. However, its performance is significantly hampered by numerical instability, which might be deteriorated with the presence of shot noise. Besides, according to our numerical comparison, the QLancocs require more iterations to converge, eventually leading to more measurements. Additionally, it is noteworthy that the shots needed for QDavidson to converge are fewer than for the VQE procedure since the latter's ansatz optimization involves a substantial number of energy evaluations.

To illustrate the number of shots required to perform the algorithm on a real-world example, we incorporated the shot-noise into the calculations for the $\mathrm{C_2H_4}$ molecule. The desired precision p was determined after examining the algorithm's noise robustness by introducing the random error to each element of Hamiltonian matrix, (off-diagonal) overlap matrix element, Sαβ and bα (appendix A). It was found that an evaluation precision of 10−4 is sufficient to guarantee the algorithm's numerical stability. With this level of precision, energy values of $-77.115\pm0.001 (S_0)$ and $-76.375\pm0.001 (S_2)$ were replicated. The algorithm, when initiated with a HF reference state, converged after one iteration. The estimated shot count per circuit evaluation was set to 108, and the total number of shots was found to be ${\sim}10^{10}$. This experiment underscores the QDavidson algorithm's capability to reproduce the low-lying spectra of the evaluated Hamiltonian even in the presence of statistical shot noise.

4. Summary

In this study, we developed an efficient QKS algorithm, QDavidson, to compute ground states and low-lying excited states by harnessing the Krylov subspace's power and the Davidson algorithm's rapid convergence. Unlike other QKS methodologies that employ real or imaginary time to pre-generate a subspace, QDavidson uses residues from previously approximated states to expand the subspace and capitalizes on the pre-conditioner to narrow the subspace search near the exact state, ensuring rapid convergence. Our numerical simulations confirm that the QDavidson algorithm surpasses other QKS methods like QLanczos in terms of convergence speed. Since the circuit depth increases with iterations, QDavidson's rapid convergence results in less complex quantum circuits, enhancing its resilience against noise. Future research could delve into advanced pre-conditioners for the QDavidson method [63, 65], potentially further trimming the iterative steps and circuit depth. Moreover, simulation accuracy is bound by the chosen basis set. While a large basis set is essential for achieving chemical accuracy, increasing the basis set size in quantum algorithms is not NISQ friendly, which requires a significantly larger number of qubits and deeper circuits [68]. However, by employing a trans-correlated Hamiltonian, one can attain accuracy at the cc-pVTZ basis even with a minimal basis set [68].

Acknowledgments

The research presented in this article was supported by the Laboratory Directed Research and Development program of Los Alamos National Laboratory (LANL) under Project Number 20200056DR. We thank the LANL Institutional Computing program for access to HPC resources. S T acknowledges the support from the Center of Integrated Nanotechnologies, a US Department of Energy and Office of Basic Energy Sciences User Facility. LANL is operated by Triad National Security, LLC, for the National Nuclear Security Administration of the US Department of Energy (Contract No. 89233218CNA000001). AIB and NVT acknowledge funding from the subcontract with LANL (Award ID: 203369-00001). AIB acknowledges financial support from the R Gaurth Hansen Professorship Fund.

Data availability statement

The data cannot be made publicly available upon publication due to legal restrictions preventing unrestricted public distribution. The data that support the findings of this study are available upon reasonable request from the authors.

Please wait… references are loading.

Supplementary data (2.7 MB PDF)

10.1088/2058-9565/ad3a97