Projective Measurement-Based Quantum Phase Difference Estimation Algorithm for the Direct Computation of Eigenenergy Differences on a Quantum Computer

Quantum computers are capable of calculating the energy difference of two electronic states using the quantum phase difference estimation (QPDE) algorithm. The Bayesian inference-based implementations for the QPDE have been reported so far, but in this approach, the quality of the calculated energy difference depends on the input wave functions being used. Here, we report the inverse quantum Fourier transformation-based QPDE with Na of ancillary qubits, which allows us to compute the difference of eigenenergies based on the single-shot projective measurement. As proof-of-concept demonstrations, we report numerical experiments for the singlet–triplet energy difference of the hydrogen molecule and the vertical excitation energies of halogen-substituted methylenes (CHF, CHCl, CF2, CFCl, and CCl2) and formaldehyde (HCHO).


Introduction
Quantum computing is one of the most innovative research fields in current science, and it is anticipated to bring breakthroughs in quantum chemical calculations.Quantum chemical calculations are based on the Schrödinger equation, which governs the dynamics of quantum particles, and accurate quantum chemical calculations can potentially open the door to predictive quantum chemistry.However, as Dirac noted, "The underlying physical laws necessary for the mathematical theory of a large part of physics and the whole of chemistry are thus completely known, and the difficulty is only that the exact application of these laws leads to equations much too complicated to be soluble.". 1 The computational cost of the full configuration interaction (full-CI) method, which is the variationally best possible wave function in the Hilbert space spanned by the basis set used, scales exponentially with system size, and it is impractical except for small molecules with medium-size basis set.
Since quantum chemical calculation deals with the dynamics of electrons in atoms and molecules, it is a potentially amenable problem for quantum computers.In fact, in 2005 Aspuru-Guzik and coworkers reported a method for performing the full-CI calculation on a quantum computer, 2 using a quantum phase estimation (QPE) algorithm. 3The QPE is a quantum algorithm that is capable of computing the eigenvalues and corresponding eigenvectors of a unitary operator U .By using the time evolution operator exp(−iHt) for U , one can calculate the full-CI energies on a quantum computer.However, because QPE utilizes the projective measurement of the quantum state to obtain the eigenfunction and the corresponding eigenvalue, it is probabilistic, and which electronic state is obtained from the QPE depends on the overlap between the approximate wave function used as the input and the exact eigenfunction.Importantly, the QPE itself does not guarantee an exponential speedup of quantum chemical calculations, 4 and connecting theoretical methods to generate sophisticated approximated wave function is necessary.
Quantum chemical calculations can afford to compute total energies of atoms and molecules, but total energies are generally not available from experiments.Chemical phenomena relevant to quantum chemical calculations are usually discussed in terms of the energy gaps between different geometries or electronic states.Thus, accurate prediction of the energy gaps is crucial for the practical use of quantum chemical calculations in chemistry research and development.
Because quantum computers can use quantum superposition states as their computational resources, it is possible to compute the energy gaps directly on a quantum computer.
4][15] In particular, the BPDE algorithm reported by us is an extension of the Bayesian phase estimation (BPE) [16][17][18] to the quantum phase difference estimation using the quantum superposition of two electronic states.BPDE is in principle applicable to arbitrary electronic states and it is free from the controlled-time evolution requited in conventional QPE algorithms for total energy calculations.The BPDE algorithm has been applied to the direct calculation of ionization energies, singlet-triplet energy gaps and valence excitation energies, 9 total energies by using the quantum superposition of the desired electronic state and the vacuum state, 10 finite difference based numerical energy gradients, 11 and relativistic energy gaps (fine-structure splitting). 12The BPDE algorithm is a powerful tool for studying the energy gap of atoms and molecules, but it has two major weaknesses.
(1) It requires many circuit executions to compute the energy gaps and the calculated energy gaps suffer from shot noise, and (2) it is not projective, and the calculated energy gap depends on the approximated wave functions used as the input.The second drawback can be clearly seen in the total energy calculations of the transition state between trans-and iso-isomers of the N 2 H 2 molecule. 10It is desirable to extend the quantum phase difference estimation (QPDE) algorithm to the projective methods.
In this work, we propose a projective QPDE algorithm with N a of ancillary qubits.
Hereafter we denote the proposed approach as the "N -qubit QPDE" algorithm.The N -qubit QPDE is a natural extension of the N -qubit QPE to the phase difference estimation, and it is able to compute the eigenenergy difference even if we use approximated wave functions as inputs.Similar to the N -qubit QPE for total energy calculations, which eigenenergy gap is obtained in the N -qubit QPDE depends on the overlap between the approximated wave functions and the eigenfunctions.To our knowledge, all other approaches for the direct calculation of the energy gap reported so far are neither projective nor single-shot protocols, and this is the first attempt to perform the eigenenergy gap calculation on a quantum computer without repetitive quantum circuit executions.As the demonstrations, we report numerical quantum circuit simulations for the singlet-triplet energy gap of H 2 molecule, and the vertical excitation energies of halogen-substituted methylenes (CHF, CHCl, CF 2 , CFCl, and CCl 2 ) and formaldehyde (HCHO).We also report the application of an algorithmic error mitigation (AEM) 19 to remove the Trotter-Suzuki decomposition error and to improve the calculated energy differences.

Theory
First, we briefly discuss the BPE [16][17][18] and the BPDE 9 algorithms.The quantum circuits for the BPE and the BPDE algorithms are shown in Figure 1.Here, H is an Hadamard gate, P r(g) is an approximate ground state preparation gate defined in eq 1, U is a time evolution operator given in eq 2, P is a phase shift gate defined in eq 3, Ex is a quantum circuit that generates an approximated excited state wave function |Φ 1 from the approximated ground state wave function |Φ 0 as in eq 4, ε and ∆ε are estimators of the total energy and the energy gap, respectively.Throughout this paper we have used {|Φ } for approximated wave functions and {|Ψ } for eigenfunctions.N s in eq 1 is the number of qubits used to store the wave functions.In conventional fermion-qubit mapping methods such as the Jordan-Wigner transformation (JWT) 20 and the Bravyi-Kitaev transformation (BKT), 21 N s is equal to the number of spin orbitals included in the active space.Roughly speaking, the QPDE can be implemented by replacing the controlled-time evolution operation in the QPE by controlledexcitation and subsequent time evolution and controlled-deexcitation operations.

P r(g)|0
By expanding the approximated wave functions by eigenfunctions as given in the right hand side of eqs 1 and 4, the probability of obtaining the |0 state in the measurement of an ancillary qubit, P rob(0), can be calculated as in eqs 5 and 6 for the BPE and the BPDE, respectively.
These equations insist that if the approximated wave functions |Φ have sufficiently large overlaps with the eigenfunctions of the target electronic states, P rob(0) becomes maximum at ε = E j and ∆ε = ∆E jk for the BPE and the BPDE, respectively.In the BPE and the BPDE algorithms, total energies and energy differences are computed by searching for the ε and ∆ε, respectively, that give maximum P rob(0), using Bayesian inference.
From eqs 5 and 6, it is clear that the accuracy of the calculated total energies and energy gaps in the framework of the BPE and the BPDE algorithms strongly depends on the quality of the approximated wave functions being used as the inputs.If the approximated wave functions are expressed by linear combinations of many eigenstates, and contributions from electronic states other than the target state to P rob(0) become non-negligible, the peak position of P rob(0) may be shifted from that corresponding to the true eigenvalues.
For typical closed-shell singlet molecules in their equilibrium geometries, the Hartree-Fock wave function |Φ HF is a reasonably good approximation of the ground state wave function.
However, the overlap squared value | Φ HF |Ψ full−CI | 2 can decrease exponentially with the system size, and therefore using |Φ HF as the input wave function is only valid for small molecules.In addition, the excited state wave function is usually more complicated than that of the ground state, hence generating a good approximated wave function for the excited state is in general a difficult task.One possible solution is to adopt an adiabatic state preparation (ASP) algorithm to generate correlated wave functions. 2,22-24However, the quantum circuit for the ASP is usually deep and it is unsuitable for the BPE and BPDE frameworks which need repetitive quantum circuit executions.
In the total energy calculations, single-shot projective calculations are possible by using the QPE algorithm with N a of ancillary qubits. 2 The quantum circuit for the N -qubit QPE is shown in Figure 2(a).Here, QFT † represents the quantum circuit for the inverse quantum Fourier transformation. 25By assuming eq 1, the quantum state before the measurement of ancillary qubits in Figure 2(a) is calculated as in eq 7.
Thus, the measurement of ancillary qubits yields an eigenphase φ j = 0. this assumption is not generally true.This difficulty can be avoided by starting from the |0 ⊗Ns state and using the controlled-P r gate given in eq 8 instead of using the controlled-Ex gate, as shown in Figure 2(c).
Here, P r(g)|0 ⊗Ns = |Φ 0 and P r(e)|0 ⊗Ns = |Φ 1 .Since the |0 ⊗Ns state in JWT and BKT corresponds to the vacuum state with no electrons, applying U does not change the state, U |0 ⊗Ns = |0 ⊗Ns .As a result, the quantum circuit for the N -qubit QPDE is slightly deeper than that for the N -qubit QPE.Nevertheless, the N -qubit QPDE-based direct calculation of the energy gap is still advantageous than the putative approach based on the N -qubit QPE for total energy calculations of individual electronic states, as long as the controlled-P r gate can be realized by shallow quantum circuit.In the present study, the approximated wave functions are expressed by a linear combination of at most two Slater determinants, and thus the quantum circuits for controlled-P r are sufficiently shallow.
In the implementation described in Figure 2(c), the bit string obtained from the measurement of ancillary qubits corresponds to the eigenphase difference ∆φ jk = 0.x 1 x 2 x 3 ...x Ns , and the eigenenery gap can be calculated as ∆E jk = −2π∆φ jk /t.The probability of which eigenenergy gap is obtained is proportional to It should be noted that the energy gap can be positive or negative, but the ∆φ jk obtained from the N -qubit QPDE quantum circuit does not contain information about the digits above the arithmetic point.Therefore, ∆φ jk and ∆φ jk − k, where k is an arbitrary integer, cannot be distinguished in the N -qubit QPDE.This means that there is a possibility to assign a wrong sign to the energy gap.To avoid such a misassignment, we can appropriately set the evolution time length t so that cos(2π∆φ jk ) > 0, and use ∆φ jk when 0 ≤ Φ jk ≤ 1/4 and ∆φ jk − 1 when 3/4 ≤ φ jk < 1.

Computational conditions
As a proof-of-concept demonstration of the proposed N -qubit QPDE algorithm, here we report numerical simulations for the direct calculation of the singlet-triplet energy gap of H 2 molecule, and the vertical excitation energies of halogen-substituted methylenes (CHF, CHCl, CF 2 , CFCl, and CCl 2 ) and formaldehyde (HCHO).We computed the singlet-triplet energy gap as the excitation energy of the spin-triplet state from the spin-singlet state.Because all the molecules under study have the spin-singlet ground state, the singlet-triplet energy gap ∆E ST = E(T 1 ) − E(S 0 ) is positive.Note that numerical simulations of the BxB and the BPDE-based energy gap calculations have been reported 8,9 for some of the compounds under study.In our previous publications, the singlet-triplet energy gap of H 2 was defined as ∆E = E(S 0 ) − E(T 1 ), and therefore definition of the energy gap is differ-ent.The one-and two-electron integrals required to construct the electronic Hamiltonian were computed by using the GAMESS-US program package. 26The full-CI and the CAS-CI calculations as the references were also performed with GAMESS-US.Numerical quantum circuit simulations were performed by using our in-house Python code developed with Open-Fermion 27 and Cirq 28 libraries.
The singlet-triplet energy gap of H 2 molecule with the atom-atom distance from 0.7 to 3.0 Å was studied by using the 6-31G basis set.The wave function is encoded in 8 qubits using JWT, and 12 ancillary qubits were used for the phase readout.The evolution time length in the U = exp(−iHt) operator was set to t = 10, and the second-order Trotter-Suzuki decomposition given in eq 9 was adopted to construct the quantum circuit.We examined three different time lengths for the single Trotter steps, ∆t = t/M = 0.5, 1.0, and e −iHt = e −i( j ω j P j )t = J j=1 e −iω j P j t/2M Here, P j is a Pauli string described by a direct product of Pauli operators {I, X, Y, Z}, and ω j is the corresponding coefficient.It is known that the Trotter-Suzuki decomposition error depends on the term ordering. 29,30In this study we used a magnitude ordering 29 where the Pauli string is applied in decreasing order of |ω j |.
As discussed in the previous section, the probability of which energy gap can be obtained  diradical character y.As reported in our precedent paper, 31 the |Φ 2c defined as in eq 10 can be a qualitatively good approximated wave function of diradical systems with a large overlap with the full-CI wave function.The diradical character y was calculated from the occupation number of the lowest unoccupied natural orbital (n LUNO ) constructed from the spin-unrestricted broken-symmetry Hartree-Fock wave function for the M S = 0 state, as given in eq 11. 32 Here, |2000 is the Hartree-Fock configuration and |0200 is the HONO-LUNO two-electron excited determinant from the Hartree-Fock configuration in the H 2 molecule with 6-31G basis set (4 molecular orbitals and 2 electrons).For the spin-triplet state we used the spinrestricted open-shell Hartree-Fock configuration |Φ 1 = |αα00 , where α indicates that the molecular orbital is singly occupied by a spin-α electron.The controlled-P r gates used for the calculations are depicted in Figure 3.
The numerical simulations of halogen-substituted methylenes were carried out at the CAS-CI/6-31G* level, using the B3LYP/6-31G* optimized geometry.Geometry optimizations were performed using Gaussian 09 software. 33We used (6e, 4o) active space for CHF and CHCl, and (10e, 6o) for CF 2 , CFCl, and CCl 2 , and the vertical excitation energies of the lowest spin-triplet excited state (1 3 B 1 state) were calculated.Here, (k e, l o) specifies that the active space contains k -electrons and l -molecular orbitals.We used ten ancillary qubits for the phase readout, and the evolution time length was set to be t = 10.The RHF and ROHF-like single determinant wave functions were used for |Φ 0 and |Φ 1 , respectively, and the quantum circuit given in Figure 3 with θ = 0 is used for the controlled-P r gate.
For the direct calculations of the vertical excitation energies of formaldehyde (HCHO), we focused on the three low-lying excited states (1 1 A 2 , 1 1 B 1 , and 2 1 A 1 states).We used the same geometry and active space as our previous publication. 9The CAS-CI active space    Vertical lowest-triplet excitation energies of halogen-substituted methylenes.
Next, we focused on the vertical excitation energy of the lowest spin-triplet state (1 3 B 1 state) of halogen-substituted methylenes (CHF, CHCl, CF 2 , CFCl, and CCl 2 ).Note that in the precedent paper we reported the direct calculation of the vertical excitation energies of CF 2 and CCl 2 molecules using the BPDE algorithm. 9 The results of the N -qubit QPDE simulations are plotted in Figure 6.b] Ref. 9 2 1 A 1 states.As discussed in the Computational conditions section, these excited states can be approximated by the spin symmetry adapted (2b 2 → 2b 1 ), (5a 1 → 2b 1 ), and (1b 1 → 2b 1 ) one-electron excitations, respectively, from the |Φ HF state.Note that direct calculations of the excitation energies of these states have been reported by us using the BPDE algorithm. 9The results are summarized in Figure 7. Again, the Trotter-Suzuki decomposition causes systematic error in the excitation energies, but the error can be efficiently removed by applying the AEM.The calculated excitation energies and those obtained from the BPDE simulations 9 are listed in Table 1.Importantly, in the all excited states under study, the excitation energies obtained from the N -qubit QPDE in conjunction with the AEM agreed with the CAS-CI values with less than 0.006 eV = 0.138 kcal mol −1 of deviation, which is smaller than that of the ∆E BPDE values listed in Table 1.Note that the BPDE simulations 9 were carried out using t/M = 0.50.The excitation energies calculated by using the N -qubit QPDE and the BPDE methods with the same t/M = 0.50 value are very close to each other.
The differences in the excitation energies between two calculations are mainly due to the shot noise in the BPDE simulations and the non-projective nature of the BPDE algorithm.

Conclusions
In this work, we have developed a quantum phase difference estimation algorithm with N a of ancillary qubits for the direct calculations of energy gaps on a quantum computer.Although the number of ancillary qubits required to run the algorithm is larger than the previously proposed Bayesian inference-based implementations, [9][10][11][12] the proposed approach is based on the projective measurement and therefore it is able to calculate the difference of energy eigenvalues of two electronic states with the approximated wave functions as inputs.The quality of the approximated wave functions only affects the success probability of the calculation, and the calculated energy gap value is independent of the input wave functions.The calculated energy gaps show systematic errors mainly caused by the Trotter-Suzuki decomposition.We demonstrated that the error is effectively reduced by applying the algorithmic error mitigation technique.For all the molecules being studied, the error-mitigated energy gap agreed to the full-CI or CAS-CI reference value with less than 1 kcal mol −1 of deviations.Since sophisticated wave function preparation methods such as an adiabatic state preparation require deep quantum circuit, the single-shot protocol developed in this work is suitable to connect with such approaches.The N -qubit QPDE method with the input wave functions generated by using ASP is in progress and will be discussed in the forthcoming paper.

Figure 1 :
Figure 1: Quantum circuits for (a) the BPE and (b) the BPDE algorithms.The definition of quantum gates is given in the main text.

Figure 2 :
Figure 2: Quantum circuits for (a) the N -qubit QPE algorithm, (b) the N -qubit QPDE algorithm in a naive implementation, and (c) the N -qubit QPDE algorithm used in this work.
x 1 x 2 x 3 ...x Ns in binary fraction with the probability proportional to |c j | 2 , and the wave function is projected onto the corresponding eigenfunction |Ψ j .Here, {x j } are the measurement outcome of the jth ancillary qubit.The eigenenergy E can be calculated by using the equation E = −2πφ/t, which is derived from the equation e −iHt |Ψ = e −iEt |Ψ = e 2iπφ |Ψ .From an analogy of the extension of the BPE algorithm to the BPDE, we can construct the quantum circuit for the N -qubit QPDE algorithm by replacing the controlled-U gates with the sequence of controlled-Ex, U , and controlled-Ex † gates, as in Figure 2(b).Note that the quantum circuit in Figure 2(b) contains control-free time evolution operations, and therefore this implementation implies that |Φ 0 is an eigenfunction of the time evolution operator.Unfortunately, where c j and d k are the coefficients defined in eqs 1 and 4, respectively.This means that the accuracy of the approximated wave functions only affects the success probability, and if success, the energy gap obtained from the N -qubit QPDE does not depend on the quality of the wave functions.To study the input wave function dependence in H 2 molecule with the 6-31G basis set, we used two different wave functions for the ground state spin-singlet wave functions.One is the Hartree-Fock wave function |Φ HF , and the other is the two-configurational wave function |Φ 2c constructed by using a

Figure 3 :
Figure 3: The controlled-P r gate used for the N -qubit QPDE calculations of H 2 and halogensubstituted methylenes.Qubits corresponding to doubly occupied (HONO−1 and below) and unoccupied (LUNO+1 and above) orbitals are omitted for clarity.The Pauli-X gate should be applied to the qubits corresponding to the doubly occupied orbitals those do not appear in the Figure.The rotation angle of the R y gate is set to be θ = −2 arccos 1 − y 2 /2, where y is the diradical character calculated using eqn 11.

2b 2 (
in-plane 2p lone pair of O), 2b 1 (C-O π * ), and 9a 1 (C-O σ * ) orbitals.The excited state wave functions are approximated by the spin symmetry adapted (2b 2 → 2b 1 ), (5a 1 → 2b 1 ), and (1b 1 → 2b 1 ) one-electron excitations from the |Φ HF for the 1 1 A 2 , 1 1 B 1 , and 2 1 A 1 states, respectively.The simulations were carried out using ten ancillary qubits and t = 10.4 Results and discussionEffect of input wave function in H 2 molecule.First, we checked the effect of the approximated wave functions on the success probability of the N -qubit QPDE and the calculated eigenphase difference value, by using |Φ HF and |Φ 2c as the input wave functions for the spin-singlet electronic ground state of H 2 molecule.We used two different geometries R(H − H) = 2.0 and 3.0 Å as the representative examples of an intermediate bond-breaking and a bond-dissociation regions, respectively.The ground state wave function exhibits sizable diradical character (y = 0.4398 and 0.8648 for R(H − H) = 2.0 and 3.0 Å, respectively), and

Figure 4 :
Figure 4: The phase value vs. probability plot obtained from the N -qubit QPDE simulations of H 2 molecule with different input wave functions for the S 0 ground state.

Figure 4
Figure4summarizes the relationship between the phase value obtained from the measurement of the ancillary qubits and the probability of occurrence.The plots have two major peaks when the |Φ HF is used as the input wave function for the singlet ground state.By converting the phase values of the peaks at the geometry R(H − H) = 2.0 Å to the energy unit, we obtained the energy gaps as 0.023163 and −0.363553 Hartree for the major and minor peaks, respectively.These values correspond to the (T 1 − S 0 ) and the (T 1 − S 2 ) energy gaps (∆E(full-CI/6-31G) = 0.027980 and −0.361740 Hartree, respectively).Importantly, the difference in the input wave functions only affects the success probability, and the phase value giving a peak remains unchanged.These results support the projective nature of the N -qubit QPDE algorithm.The singlet-triplet energy gap of H 2 molecule with different bond lengths and application of the algorithmic error mitigation.Next, we carried out the N -

Figure 5 :Figure 6 :
Figure 5: The N -qubit QPDE simulation results of H 2 molecule with different time lengths of the single Trotter step t/M .(a) The singlet-triplet energy gap.Inset is the plot of ∆E at the geometry R(H − H) ≥ 2.5 Å.(b) Differences between the singlet-triplet energy gaps from the quantum circuit simulations and from the full-CI/6-31G calculations.AEM stands for the energy gap calculated using the algorithmic error mitigation technique (see text).

Figure 7 :
Figure 7: The N -qubit QPDE simulation results of the vertical excitation energies of formaldehyde with different time lengths of the single Trotter step t/M .AEM stands for the excitation energies obtained by applying the algorithmic error mitigation, and Dotted horizontal lines indicate the CAS-CI excitation energies.

Table 1 :
Vertical excitation energies of formaldehyde calculated by using the N -qubit QPDE and the BPDE algorithms, and at the CAS-CI level of theory.State∆E QPDE /eV ∆E BPDE /eV[b]∆E CAS−CI /eV t/M = 1.25 t/M = 1.00 t/M = 0.50 AEM[a]