# BQ-Chem: A Quantum Software Program for Chemistry Simulation Based on the Full Quantum Eigensolver Algorithm

Authors: Hang Li; Pan Gao; Jiang Zhang; Zhiyuan Liu; Hai Wei; Kai Wen; Shijie Wei; Gui-Lu Long
Journal: Quantum Engineering
 (2022)

---

## Abstract

We describe a quantum chemistry simulation software programBQ-Chem, which can calculate the low-energy spectrum and potential energy surface of molecules on a quantum computer. BQ-Chem is based on the full quantum eigensolver (FQE), which is implemented with a quantum gradient descent algorithm. Benefiting from FQE, BQ-Chem can perform all the calculations on a quantum computer. Compared with the classical optimization methods which encounter the optimization difficulty of high-dimensional and multivariable functions in dealing with multielectron orbitals of macromolecules, FQE provides an exponential speedup. FQE works fully on a quantum computer; thus, BQ-Chem can be smoothly transited to future large-scale quantum computers.


---

## Body

## 1. Introduction

Quantum chemistry is also called molecular quantum mechanics, where quantum mechanics is applied to the field of chemistry to obtain the chemical properties of molecules at the atomic level. A central challenge in the field of quantum chemistry is to determine the low-lying molecular energies and electronic structures of a chemical system with high precision, and its electronic Hamiltonian usually can be obtained with a set of nuclear geometries under the Born–Oppenheimer approximation. Moreover, by varying nuclear positions of a chemical system, a potential energy surface (e.g., ground-state energy) can be determined as a function of the bond length or bond angle of interest, which is key to understanding chemical reactivity, product distributions, and reaction rates.Conventionally, the number of classical bits needed to simulate a multiatom molecule increases exponentially as the number of atoms. And in the worst case, quantum simulation of a chemical system is exponentially hard on classical computers. Despite the great success of approximation methods, tackling the problem accurately with conventional computers is still a difficult task. On the other hand, the chemistry of molecules is accurately described with quantum mechanics; thus, the quantum simulation of a chemical system with a quantum simulator or quantum computer has natural advantages in the sense of computational resources needed [1, 2].However, the problem of estimating the ground state and its energy of Hamiltonian is in general QMA-hard [3] and even quantum computers are not expected to efficiently solve it. In the past few decades, various quantum algorithms are harnessed to address this issue. The main idea of these methods is to prepare a state which extremely approximates to the desired ground state instead of preparing the exact ground state which is computationally expensive. Based on the well-known adiabatic theorem [4, 5] and quantum phase estimation algorithm [6], Aspuru-Guzik et al. [7, 8] constructed an adequate quantum circuit to evolve the system adiabatically in the ground state, i.e., adiabatic state preparation. The quantum imaginary time evolution algorithm [9, 10], which uses the linear combination of unitaries (LCU) [11] formalism, is another approach as a heuristic method to approximate the ground state.Despite developments in quantum algorithms and optimization of resource requirements, many of the algorithms have hardware requirements far beyond the capability of near-term quantum computers. In 2014, a quantum-classical hybrid algorithm called variational quantum eigensolver (VQE) [12, 13] was proposed by Peruzzo et al. VQE can prepare a class of ansatz states with a variational quantum circuit and optimize its parameters, leading the state approximating to the ground state step by step. VQE requires fewer quantum gates and a shallower circuit, making it more feasible on noisy intermediate-scale quantum (NISQ) [14] devices. In 2020, Wei et al. developed a full quantum eigensolver (FQE) [15] scheme which attracted much attention in recent years [16–21]. Compared with VQE where its optimization step is completed on a classical computer, FQE, using the quantum gradient descent algorithm in the LCU paradigm, is a fully quantum algorithm where the calculation of the expectation value of Hamiltonian and the optimization process is fully conducted on quantum computers, enabling it an advantage of providing a smooth transition to future large-scale quantum computers.


## 2.BQ-Chem

Here, we give an introduction to a newly designed quantum chemistry simulation software programBQ-Chem (https://biwonq.baqis.ac.cn/#/pages/chemistry), which is based on FQE. This quantum chemistry simulation module supports multitask parallel computing, and users can edit their specific contents after adding projects on the main page.


### 2.1. Specifying a Molecule and Its Parameters

In order to simplify the process and improve the user’s experience of the program, we preinstalled the specific molecular configures of about 50 common molecules for users as default inBQ-Chem, including the atomic type, the x, y, and z coordinate of each atomic nucleus, and the bonding properties between them. The default data of chemical compositions and their parameters about our preinstalled molecules are extracted from the National Institute of Standards and Technology (NIST) Chemistry WebBook (https://webbook.nist.gov/chemistry/) of the United States. In addition, users are also allowed to build their own molecular models flexibly by adding more atoms and changing atomic coordinates and corresponding bonding properties, as shown in Figure 1, where we take NH3 molecule as an example of specifying a molecule and its parameters in BQ-Chem.Figure 1
Input interface of theNH3 molecular data as an example in the BQ-Chem simulation module. One can select a molecule structure from a preset database and modify the structure by changing the coordinates of its element. One can also construct another molecule structure by adding or deleting an atom from the selected molecular structure.


### 2.2. Two Calculation Modes

After specifying a molecule and its parameters from the last step, users can calculate the chemical properties of the molecule of their interest. TheBQ-Chem simulation module supports two calculation modes for users to choose from: the static single-point energy spectrum (SES) calculation mode where all molecular geometry parameters given are fixed and the dynamic potential energy surface (PES) calculation mode where some molecular parameters of the user’s interest range around the given geometry. As the following shows, the SES mode supports calculating the ground and excited energies sequentially, while the PES mode supports calculating the ground energy around the given geometry by varying the bond length or bond angle of a molecule. In both modes, one should first set the preprocessing information, including basis set choice, fermion-spin transformation model choice, and the initial state choice.


#### 2.2.1. Single-Point Energy Spectrum (SES) Mode

In the mode of SES, one can choose to calculate the ground-state energy with FQE and up to 15 excited-level energies one by one by subtracting the ground-state energy part from the system Hamiltonian and calculating the new ground-state energy of the subtracted Hamiltonian.BQ-Chem provides several classical methods for preprocessing molecular electronic structures for users. As depicted in Figure 2, the following steps are taken:(1)
Choosing the single-electron atomic orbital basis set from the option of “sto-3g” and “sto-6g.” Here, we take “sto-ng” atomic orbitals instead of the original “sto” or “gto” basis, which means the basis functions are expressed as sums of Gaussian functions rather than the original Slater-type orbitals to enhance the efficiency of integral evaluation. More details are described in Appendix A.(2)
Choosing the Fermi-spin transformation method from Jordan–Wigner or Bravyi–Kitaev transformation. The Jordan–Wigner transformation directly maps the fermionic occupation state of a particular atomic orbital to a state of qubits, while the Bravyi–Kitaev transformation is a compromise between the Jordan–Wigner transformation and the parity encoding transformation, which is more efficient in operational complexity. More details are described in Appendix C.(3)
Choosing the initial state of the full quantum eigensolver solution process from the option of the Hartree–Fock approximation state or the uniform superposition state. The Hartree–Fock approximation state usually is a better choice for faster convergence. More details are described in Appendix B.Figure 2
Input interface of the SES mode in theBQ-Chem simulation module. One can modify the configuration and setting to specify the spectrum calculation mode.We takeNH3 molecule as an example; its configuration and setting of the SES mode are shown in Figure 2, i.e., Hartree–Fock state as the initial state, “sto-6g” as the basis, Jordan–Wigner transformation method as the chosen Fermi-spin transformation, and the goal is to obtain the ground energy and up to three excitation energies.After executing the process, a resultant spectrum of 4 energy levels is presented in Figure3, where we can see as the iteration of the quantum gradient descent algorithm increases, the simulated ground-state and up to three excitation energies have a convergence to the theoretical energies of the interested Hamiltonian, respectively. To be noted, the ground-state energy can be obtained directly from the original Hamiltonian with FQE, while the 1st excitation energy is acquired from a new Hamiltonian by reducing the ground-state energy part of the original Hamiltonian with the same FQE process. By repeating the above process, one can reach any excited-level energy one after the other.Figure 3
The resulting energy spectrum of the ground state (blue dotted line) and up to the 3rd excitation state (green, yellow, and red dotted line) ofNH3 in BQ-Chem. Each dotted line converges monotonically to the theoretical value of the exact Hamiltonian diagonalization energy (red-solid line), respectively. To be noted, the 1st excitation energy curve (green) is covered by the 2nd excitation energy curve (yellow) of molecule NH3 due to their degeneracy; thus, the green line cannot be seen directly.


#### 2.2.2. Potential Energy Surface (PES) Mode

In the mode of PES, one can choose the scanning mode from “bond length” and “bond angle”; moreover, one can set the scanning number and scanning field, as depicted in Figure4. If the “bond length” option is selected, one is further required to provide which set of chemical bonds is going to be modified. Otherwise, if the “bond angle” option is selected, one is further required to specify two chemical bonds which share a common atom (as the vertex of two connected edges).Figure 4
Input interface of potential energy surface calculation in theBQ-Chem simulation module. One can modify the configuration and setting to specify the potential energy surface calculation mode.We takeNH3 molecule as an example again. Its configuration and setting of the PES mode are shown in Figure 4, i.e., “bond length” as the scanning option, all chemical bonds of NH3 are specified, and 11 scanning points of chemical bond length set ranging from 50% to 150% of the original chemical bond length and its setting are maintained the same with the SES mode.PES can help search for the most stable structure of the interested molecule by ranging the length and angles of the chemical bonds, which is very useful in the field of biomedicine, materials, and chemical industry. In the example of calculating PES of theNH3 molecule, the resultant PES as presented in Figure 5 shows that the molecule with the original set of chemical bond lengths has the lowest energy which is the most stable structure of NH3 molecule under the fixed chemical bond angles.Figure 5
The resultant potential energy surface ofNH3 based on FQE corresponding to different chemical bond length sets ranging from 50% to 150% of the original chemical bond length. The energy corresponding to the 5-th scanning point (the exact original chemical bond length set) has the lowest value, suggesting the most stable structure of NH3 molecule.


## 2.1. Specifying a Molecule and Its Parameters

In order to simplify the process and improve the user’s experience of the program, we preinstalled the specific molecular configures of about 50 common molecules for users as default inBQ-Chem, including the atomic type, the x, y, and z coordinate of each atomic nucleus, and the bonding properties between them. The default data of chemical compositions and their parameters about our preinstalled molecules are extracted from the National Institute of Standards and Technology (NIST) Chemistry WebBook (https://webbook.nist.gov/chemistry/) of the United States. In addition, users are also allowed to build their own molecular models flexibly by adding more atoms and changing atomic coordinates and corresponding bonding properties, as shown in Figure 1, where we take NH3 molecule as an example of specifying a molecule and its parameters in BQ-Chem.Figure 1
Input interface of theNH3 molecular data as an example in the BQ-Chem simulation module. One can select a molecule structure from a preset database and modify the structure by changing the coordinates of its element. One can also construct another molecule structure by adding or deleting an atom from the selected molecular structure.


## 2.2. Two Calculation Modes

After specifying a molecule and its parameters from the last step, users can calculate the chemical properties of the molecule of their interest. TheBQ-Chem simulation module supports two calculation modes for users to choose from: the static single-point energy spectrum (SES) calculation mode where all molecular geometry parameters given are fixed and the dynamic potential energy surface (PES) calculation mode where some molecular parameters of the user’s interest range around the given geometry. As the following shows, the SES mode supports calculating the ground and excited energies sequentially, while the PES mode supports calculating the ground energy around the given geometry by varying the bond length or bond angle of a molecule. In both modes, one should first set the preprocessing information, including basis set choice, fermion-spin transformation model choice, and the initial state choice.


### 2.2.1. Single-Point Energy Spectrum (SES) Mode

In the mode of SES, one can choose to calculate the ground-state energy with FQE and up to 15 excited-level energies one by one by subtracting the ground-state energy part from the system Hamiltonian and calculating the new ground-state energy of the subtracted Hamiltonian.BQ-Chem provides several classical methods for preprocessing molecular electronic structures for users. As depicted in Figure 2, the following steps are taken:(1)
Choosing the single-electron atomic orbital basis set from the option of “sto-3g” and “sto-6g.” Here, we take “sto-ng” atomic orbitals instead of the original “sto” or “gto” basis, which means the basis functions are expressed as sums of Gaussian functions rather than the original Slater-type orbitals to enhance the efficiency of integral evaluation. More details are described in Appendix A.(2)
Choosing the Fermi-spin transformation method from Jordan–Wigner or Bravyi–Kitaev transformation. The Jordan–Wigner transformation directly maps the fermionic occupation state of a particular atomic orbital to a state of qubits, while the Bravyi–Kitaev transformation is a compromise between the Jordan–Wigner transformation and the parity encoding transformation, which is more efficient in operational complexity. More details are described in Appendix C.(3)
Choosing the initial state of the full quantum eigensolver solution process from the option of the Hartree–Fock approximation state or the uniform superposition state. The Hartree–Fock approximation state usually is a better choice for faster convergence. More details are described in Appendix B.Figure 2
Input interface of the SES mode in theBQ-Chem simulation module. One can modify the configuration and setting to specify the spectrum calculation mode.We takeNH3 molecule as an example; its configuration and setting of the SES mode are shown in Figure 2, i.e., Hartree–Fock state as the initial state, “sto-6g” as the basis, Jordan–Wigner transformation method as the chosen Fermi-spin transformation, and the goal is to obtain the ground energy and up to three excitation energies.After executing the process, a resultant spectrum of 4 energy levels is presented in Figure3, where we can see as the iteration of the quantum gradient descent algorithm increases, the simulated ground-state and up to three excitation energies have a convergence to the theoretical energies of the interested Hamiltonian, respectively. To be noted, the ground-state energy can be obtained directly from the original Hamiltonian with FQE, while the 1st excitation energy is acquired from a new Hamiltonian by reducing the ground-state energy part of the original Hamiltonian with the same FQE process. By repeating the above process, one can reach any excited-level energy one after the other.Figure 3
The resulting energy spectrum of the ground state (blue dotted line) and up to the 3rd excitation state (green, yellow, and red dotted line) ofNH3 in BQ-Chem. Each dotted line converges monotonically to the theoretical value of the exact Hamiltonian diagonalization energy (red-solid line), respectively. To be noted, the 1st excitation energy curve (green) is covered by the 2nd excitation energy curve (yellow) of molecule NH3 due to their degeneracy; thus, the green line cannot be seen directly.


### 2.2.2. Potential Energy Surface (PES) Mode

In the mode of PES, one can choose the scanning mode from “bond length” and “bond angle”; moreover, one can set the scanning number and scanning field, as depicted in Figure4. If the “bond length” option is selected, one is further required to provide which set of chemical bonds is going to be modified. Otherwise, if the “bond angle” option is selected, one is further required to specify two chemical bonds which share a common atom (as the vertex of two connected edges).Figure 4
Input interface of potential energy surface calculation in theBQ-Chem simulation module. One can modify the configuration and setting to specify the potential energy surface calculation mode.We takeNH3 molecule as an example again. Its configuration and setting of the PES mode are shown in Figure 4, i.e., “bond length” as the scanning option, all chemical bonds of NH3 are specified, and 11 scanning points of chemical bond length set ranging from 50% to 150% of the original chemical bond length and its setting are maintained the same with the SES mode.PES can help search for the most stable structure of the interested molecule by ranging the length and angles of the chemical bonds, which is very useful in the field of biomedicine, materials, and chemical industry. In the example of calculating PES of theNH3 molecule, the resultant PES as presented in Figure 5 shows that the molecule with the original set of chemical bond lengths has the lowest energy which is the most stable structure of NH3 molecule under the fixed chemical bond angles.Figure 5
The resultant potential energy surface ofNH3 based on FQE corresponding to different chemical bond length sets ranging from 50% to 150% of the original chemical bond length. The energy corresponding to the 5-th scanning point (the exact original chemical bond length set) has the lowest value, suggesting the most stable structure of NH3 molecule.


## 2.2.1. Single-Point Energy Spectrum (SES) Mode

In the mode of SES, one can choose to calculate the ground-state energy with FQE and up to 15 excited-level energies one by one by subtracting the ground-state energy part from the system Hamiltonian and calculating the new ground-state energy of the subtracted Hamiltonian.BQ-Chem provides several classical methods for preprocessing molecular electronic structures for users. As depicted in Figure 2, the following steps are taken:(1)
Choosing the single-electron atomic orbital basis set from the option of “sto-3g” and “sto-6g.” Here, we take “sto-ng” atomic orbitals instead of the original “sto” or “gto” basis, which means the basis functions are expressed as sums of Gaussian functions rather than the original Slater-type orbitals to enhance the efficiency of integral evaluation. More details are described in Appendix A.(2)
Choosing the Fermi-spin transformation method from Jordan–Wigner or Bravyi–Kitaev transformation. The Jordan–Wigner transformation directly maps the fermionic occupation state of a particular atomic orbital to a state of qubits, while the Bravyi–Kitaev transformation is a compromise between the Jordan–Wigner transformation and the parity encoding transformation, which is more efficient in operational complexity. More details are described in Appendix C.(3)
Choosing the initial state of the full quantum eigensolver solution process from the option of the Hartree–Fock approximation state or the uniform superposition state. The Hartree–Fock approximation state usually is a better choice for faster convergence. More details are described in Appendix B.Figure 2
Input interface of the SES mode in theBQ-Chem simulation module. One can modify the configuration and setting to specify the spectrum calculation mode.We takeNH3 molecule as an example; its configuration and setting of the SES mode are shown in Figure 2, i.e., Hartree–Fock state as the initial state, “sto-6g” as the basis, Jordan–Wigner transformation method as the chosen Fermi-spin transformation, and the goal is to obtain the ground energy and up to three excitation energies.After executing the process, a resultant spectrum of 4 energy levels is presented in Figure3, where we can see as the iteration of the quantum gradient descent algorithm increases, the simulated ground-state and up to three excitation energies have a convergence to the theoretical energies of the interested Hamiltonian, respectively. To be noted, the ground-state energy can be obtained directly from the original Hamiltonian with FQE, while the 1st excitation energy is acquired from a new Hamiltonian by reducing the ground-state energy part of the original Hamiltonian with the same FQE process. By repeating the above process, one can reach any excited-level energy one after the other.Figure 3
The resulting energy spectrum of the ground state (blue dotted line) and up to the 3rd excitation state (green, yellow, and red dotted line) ofNH3 in BQ-Chem. Each dotted line converges monotonically to the theoretical value of the exact Hamiltonian diagonalization energy (red-solid line), respectively. To be noted, the 1st excitation energy curve (green) is covered by the 2nd excitation energy curve (yellow) of molecule NH3 due to their degeneracy; thus, the green line cannot be seen directly.


## 2.2.2. Potential Energy Surface (PES) Mode

In the mode of PES, one can choose the scanning mode from “bond length” and “bond angle”; moreover, one can set the scanning number and scanning field, as depicted in Figure4. If the “bond length” option is selected, one is further required to provide which set of chemical bonds is going to be modified. Otherwise, if the “bond angle” option is selected, one is further required to specify two chemical bonds which share a common atom (as the vertex of two connected edges).Figure 4
Input interface of potential energy surface calculation in theBQ-Chem simulation module. One can modify the configuration and setting to specify the potential energy surface calculation mode.We takeNH3 molecule as an example again. Its configuration and setting of the PES mode are shown in Figure 4, i.e., “bond length” as the scanning option, all chemical bonds of NH3 are specified, and 11 scanning points of chemical bond length set ranging from 50% to 150% of the original chemical bond length and its setting are maintained the same with the SES mode.PES can help search for the most stable structure of the interested molecule by ranging the length and angles of the chemical bonds, which is very useful in the field of biomedicine, materials, and chemical industry. In the example of calculating PES of theNH3 molecule, the resultant PES as presented in Figure 5 shows that the molecule with the original set of chemical bond lengths has the lowest energy which is the most stable structure of NH3 molecule under the fixed chemical bond angles.Figure 5
The resultant potential energy surface ofNH3 based on FQE corresponding to different chemical bond length sets ranging from 50% to 150% of the original chemical bond length. The energy corresponding to the 5-th scanning point (the exact original chemical bond length set) has the lowest value, suggesting the most stable structure of NH3 molecule.


## 3. Full Quantum Eigensolver

In this section, we will give a detailed description of the underlying algorithm in theBQ-Chem module, FQE. A diagram of FQE for solving the ground-state energy of a molecule is depicted in Figure 6. As discussed above, the word “full” for FQE [15] means that all computations of FQE are realized on quantum computers, while other eigensolvers require a sequence of data transformation between quantum computers and classical computers. The reason why FQE can be fully completed on a quantum computer is that it takes advantage of the technology of linear combination of unitary operators (LCU) which is proposed by Long in 2002 [11]. LCU can realize the four arithmetic operations, addition, subtraction, multiplication, and division of unitary operators.Figure 6
Schematic diagram for the process of solving the ground state energy of a molecule. The molecular Hamiltonian is obtained through quantum chemistry software, such as OpenFermion. And then, the ground state energy of the Hamiltonian is calculated through the FQE. By changing the interatomic distances or angles between chemical bonds of a molecule, the method can calculate the most stable structure of the molecule and its corresponding potential energy surface.After the secondary quantization, the fermion Hamiltonian of the molecule is transformed into the qubit Hamiltonian in the Hilbert space through mathematical mapping. The ground state of the Hamiltonian can be obtained by applying the FQE. In a specific quantum computing system, we shall choose a suitable initial quantum state, then construct a quantum circuit realizing the quantum gradient descent process, and measure the final quantum state to obtain the information that the next loop is required. In the process of continuous iteration of the quantum circuit, the final state converges to the ground state of our interested Hamiltonian. On the other hand, searching for the most stable structure of a molecule is very difficult in quantum chemistry and requires massive classical computation. Similar to solving the ground state energy problem, FQE can also be used to find the state with the lowest energy by changing the distance between atoms or angles between chemical bonds in a molecule and obtain the most stable structure of the molecule.A molecular system containing nuclei and electrons can be described by its molecular Hamiltonian. Through Jordan–Wigner (JW) or Bravyi–Kitaev (BK) transformation, the molecular Hamiltonian can be mapped to the Hamiltonian in a qubit form.(1)H=∑i,αωαiσαi+∑i,j,α,βωαβijσαiσβj+…,where the Roman indices i,j denote the qubit on which the operators act and Greek indices α,β refer to the type of Pauli operators; for example, σxi means Pauli matrix σx acting on the i-th qubit. Apparently, H in equation (1) is a linear combination of unitary Pauli matrices. We can calculate the ground-state energy by minimizing the expected value of the Hamiltonian.(2)fX⟶=X⟶THX⟶.The following methods for finding the molecular ground state and its energy are all based on it.In classical computing, we usually use the gradient descent algorithm to obtain the minimum value of the objective functionfX⟶. We start from the initial state X⟶0∈RN and evolve along the object function’s gradient direction to the next state:(3)X⟶t+1=X⟶t−γ0∇fX⟶t.In the case of solving the ground-state energy of the Hamiltonian problem with FQE, the gradient offX⟶ can be expressed as follows:(4)∇fX⟶=2HX⟶.And, the iterative process of classical gradient descent can be mapped into a quantum version, which can be considered as the evolution of the quantum stateX⟶ under the operator H.(5)X⟶t+1=X⟶t−γHX⟶t,where γ=2γ0.We define a new Hamiltonian as follows:(6)Hg=I−γH=∑i=1MβiHig,where M is the number of Pauli terms of operator Hg. The process of the quantum gradient descent algorithm can be expressed as follows:(7)X⟶t+1=HgX⟶t=∑i=1MβiHigX⟶t.sHg is an LCU operator, which is a nonunitary evolution and can be realized on a quantum computer by adding auxiliary qubits to convert it into a unitary evolution in a larger Hilbert space. The entire quantum circuit diagram described by equation (7) is divided into four parts as shown in Figure 7:Wave division: The entire quantum system is composed of a work system and an ancillary system. Firstly, we encode the initial vectorX=x1,…,xNT into the initial state xt of the work system. In the field of quantum chemistry, the Hartree–Fock (HF) state is often adopted as an initial state. The ancillary system is initialized from 0〉m, where m=log2M, to a specific superposition as follows:(8)ψs〉=1C∑i=0M−1βi|i.Here,C=∑i=0M−1βi2 is a normalization constant and i is the computational basis. We denote the composite state of the whole system as Φ〉=ψsx⟶t.Entanglement: A series of ancilla-controlled operations∑i=0M−1ii⊗Hig on the work qubits are implemented, the work qubits and the ancillary qubits are now entangled, and the state is transformed into(9)Φ〉⟶1C∑i=0M−1βii〉Higx⟶t.Wave combination: After performingm Hadamard gates on the ancillary register, the state of the whole system in the subspace where the ancillary system in state 0 is(10)Φ0〉=1C2m0〉∑i=0M−1βiHig|x⟶t.Measurement: Here, we make measurements on the ancillary register. If0 is detected, our algorithm succeeds and we obtain the state 1/C2m0〉∑i=0M−1βiHig|x⟶t∝|x⟶t+1, which is proportional to the next iterative state. The probability of success in detecting the ancillary state in 0 is(11)Ps=Hg|x⟶t2C2M.Figure 7
Quantum circuit for realizing the quantum gradient descent algorithm.ψs and xx⟶t are the initial states of the ancillary system and the work system, respectively, the controlled operations of the ancillary system acting on the work system are ∑i=0M−1ii⊗Hig, and HM denotes m=log2M Hadamard gates. At the end of the circuit, the final state of the ancillary register is measured. If all ancillary qubits are measured in 0, then the work system collapses in x⟶t+1.After successfully obtaining0 in the ancillary system, we can continue the gradient descent process by repeating the above four steps. We can preset a threshold of ε=x⟶tHx⟶t−x⟶t+1Hx⟶t+1/x⟶tHx⟶t as the criterion for stopping the iteration. After enough iterations, the final state of work system X will converge to our interested Hamiltonian H’s ground state and XHX is the corresponding ground state energy.The successful probability aftern-time measurements is 1−C2M−Hg|x⟶t2/C2Mn, which is an exponential function of n. The number of measurements is C2M/Hg|x⟶t2, which shows its complexity will grow exponentially with respect to the number of iteration steps [22], which is a relatively large limitation and should be solved in future work.


## 4. Summary

In this paper, we present a quantum chemical simulation software program based on FQE andBQ-Chem. With BQ-Chem, we can calculate the single-point energy spectrum (SES) and potential energy surface (PES) after specifying the configuration and setting of a molecule. In the SES mode, we can obtain the ground-state energy directly with FQE. In addition, we can calculate the excited states and energies by replacing the interested Hamiltonian with the original Hamiltonian after reducing the part corresponding to its ground state following the same procedure. In PES mode, by varying the distances between atoms or angles between the chemical bonds in a molecule, we can search for the lowest energy and the corresponding most stable structure of a molecule with a set of distances or angles, from its potential energy surface corresponding to different distances or angles.



---

*Source: 5872283-2022-12-07.xml*