Variational Quantum Algorithm for Molecular Geometry Optimization

Variational Quantum Algorithm for Molecular Geometry Optimization

Variational quantum algorithm for molecular geometry optimization Alain Delgado,∗ Juan Miguel Arrazola, Soran Jahangiri, Zeyue Niu, Josh Izaac, Chase Roberts, and Nathan Killoran Xanadu, Toronto, ON, M5G 2C8, Canada Classical algorithms for predicting the equilibrium geometry of strongly correlated molecules re- quire expensive wave function methods that become impractical already for few-atom systems. In this work, we introduce a variational quantum algorithm for finding the most stable structure of a molecule by explicitly considering the parametric dependence of the electronic Hamiltonian on the nuclear coordinates. The equilibrium geometry of the molecule is obtained by minimizing a more general cost function that depends on both the quantum circuit and the Hamiltonian parameters, which are simultaneously optimized at each step. The algorithm is applied to find the equilibrium + geometries of the H2,H3 , BeH2 and H2O molecules. The quantum circuits used to prepare the electronic ground state for each molecule were designed using an adaptive algorithm where excita- tion gates in the form of Givens rotations are selected according to the norm of their gradient. All quantum simulations are performed using the PennyLane library for quantum differentiable pro- gramming. The optimized geometrical parameters for the simulated molecules show an excellent agreement with their counterparts computed using classical quantum chemistry methods. I. INTRODUCTION rithm for finding the equilibrium geometry of a molecule. We recast the problem as a more general variational In variational quantum algorithms for quantum chem- quantum algorithm where the target electronic Hamil- istry, a quantum computer is programmed to prepare the tonian is a parametrized observable that depends on the wave function of a molecule and to measure the expec- nuclear coordinates. This implies that the objective func- tation value of the electronic Hamiltonian. A classical tion, defined by the expectation value of the Hamilto- optimizer is then used to adjust the circuit parameters in nian computed in the trial state, depends on both the order to minimize the total electronic energy [1{4]. Con- circuit and the Hamiltonian parameters. The proposed siderable attention has been placed on extending varia- algorithm minimizes the cost function using a joint op- tional algorithms to compute excited-state energies [5{7] timization scheme where the analytical gradients of the and to mitigate the numerical errors inherent to noisy cost function with respect to circuit parameters and the devices [8,9]. nuclear coordinates are computed simultaneously at each Extending the scope of quantum algorithms is crucial optimization step. Furthermore, this approach does not to study other molecular properties linked to the deriva- require nested optimizations of the circuit parameters for tive of the total energy with respect to external param- each set of nuclear coordinates, as occurs in the analo- eters entering the electronic Hamiltonian [10{12]. For gous classical algorithms. The optimized circuit param- example, computing the derivative of the energy with eters determine the energy of the electronic state pre- respect to the nuclear coordinates and external electric pared by the quantum circuit, and the final set of nuclear fields allows us to simulate the quantum vibrations of coordinates is precisely the equilibrium geometry of the molecules and to predict their signature in experimental molecule in this electronic state. Raman and infrared spectra [13, 14]. The manuscript is organized as follows. In Sec. II In particular, finding the equilibrium geometry of a we define the optimization problem and the methods to molecule in a given electronic state is one of the most compute the quantum gradients of the cost function. Sec. important tasks in computational quantum chemistry. III describes each step of the quantum algorithm includ- Classical algorithms for molecular geometry optimization ing its implementation using the PennyLane library for are computationally very expensive. They typically rely quantum differentiable programming [17]. In Sec.IV we report numerical results on the geometry optimization of arXiv:2106.13840v2 [quant-ph] 11 Aug 2021 on the Newton-Raphson method requiring access to the nuclear gradients and the Hessian of the energy at each different molecules. The main conclusions are summa- optimization step while searching for the global minimum rized in Sec.V. along the potential energy surface [15]. As a consequence, using accurate post-Hartree-Fock methods [15] to solve the molecule's electronic structure at each step is com- II. THEORY putationally intractable even for medium-size molecules. Instead, density functional theory methods [16] are used We start by defining the parametrized Hamiltonian. to obtain approximated geometries. For a molecule, this is the second-quantized electronic In this work, we introduce a variational quantum algo- Hamiltonian for a given set of parameters x: X y 1 X y y H(x) = hpq(x)cpcq + hpqrs(x)cpcqcrcs: (1) ∗ 2 Electronic address: [email protected] pq pqrs 2 The indices of summation in Eq. (1) run over the basis of The derivatives @H(x) of the Hamiltonian can be eval- @xi molecular orbitals computed in the Hartree-Fock approx- uated analytically or using finite differences. Analytical imation [18]. The operators cy and c are respectively the derivatives of the molecular Hamiltonian can be obtained @hpq (x) electron creation and annihilation operators, and hpq(x) in terms of the derivatives of the electron integrals @xi and hpqrs(x) are the one- and two-electron Coulomb in- and @hpqrs(x) . For example, if the parameters x refer @xi tegrals [15] computed in the molecular orbital basis. to the nuclear coordinates, the expressions to evaluate In variational quantum algorithms, the expectation these derivatives have been established [22] and they re- value of the target Hamiltonian is evaluated using a quire solving the coupled-perturbed Hartree-Fock equa- quantum computer, which is programmed to prepare a tions [14]. trial electronic wave function. To that aim, the Jordan- Wigner transformation [19, 20] is typically applied to de- compose the fermionic Hamiltonian in Eq. (1) into a lin- III. QUANTUM ALGORITHM ear combination of Pauli operators, N In this section we describe the quantum algorithm to X Y j solve the optimization problem of Eq. (4). Without loss H(x) = hj(x) σi ; (2) j i of generality, the algorithm is described for the problem of molecular geometry optimization where the Hamil- where hj(x) are the expansion coefficients inheriting the tonian parameters x are the nuclear coordinates of the dependence on the parameters x. The operators σi rep- molecule. The workflow of the algorithm is shown in resents the Pauli group fI; X; Y; Zg and N is the number Fig.1. The algorithm takes as input the initial set of of qubits nuclear coordinates x0 of the molecule we want to opti- Let jΨ(θ)i denote the N-qubit trial state encoding the mize. A good guess for the initial molecular geometry can electronic state of the molecule that is implemented by be the geometry of the molecule optimized at the level a quantum circuit for a given set of parameters θ. The of the Hartree-Fock (HF) approximation which can be expectation value of the parametrized Hamiltonian H(x) efficiently computed using classical quantum chemistry packages. g(θ; x) = hΨ(θ)jH(x)jΨ(θ)i; (3) We also need to define the variational quantum circuit to prepare the correlated electronic state jΨ(θ)i of the defines the cost function g(θ; x) for this problem, which molecule. To that aim, the state of the N qubits encod- can be optimized with respect to both the circuit and ing the occupation number of the active spin-orbitals is the Hamiltonian parameters. This is a generalization of initialized to encode the HF state. That is, the first Ne the usual paradigm where only the state is parametrized. qubits, with Ne being the number of active electrons, are The variational quantum algorithm applied for solving set in the state j1i while the other N − Ne qubits remain the optimization problem in the state j0i. The N-qubit system is then prepared in a superposition of the HF state with other doubly- and E = min g(θ; x); (4) singly-excited configurations. In this work, this is done fθ;xg by applying excitation gates implemented in the form of can be implemented to jointly optimize the circuit and Givens rotations, as proposed in Ref. [23]. Eq. (6) is an Hamiltonian parameters θ and x, respectively. Crucially, example of a Givens rotation: the results of this optimization allow us to simultaneously 01 0 0 01 find the lowest-energy state of the molecular Hamiltonian 0 cos(θ) − sin(θ) 0 ^ G(θ) = B C ; (6) H(x) and the optimal set of parameters x. For example, @0 sin(θ) cos(θ) 0A as we discuss later in this work, when the parameters 0 0 0 1 correspond to the nuclear coordinates, the results of the optimization provide also the equilibrium geometry of the that acts as a single-excitation two-qubit gate coupling molecule. the states j10i and j01i where a particle is \excited" Solving the optimization problem in Eq. (4) using from the first to the second qubit. Similarly, we also use gradient-based methods requires us to compute the gra- the four-qubit double-excitation gate G(2) to couple the dients with respect to the circuit and the Hamiltonian states j1100i and j0011i differing by a double excitation, parameters. The circuit gradients can be computed ana- (2) lytically using the parameter-shift rule [21] in conjunction G j1100i = cos(θ) j1100i − sin(θ) j0011i ; (7) with the automatic differentiation algorithm, all of which G(2) j0011i = cos(θ) j0011i + sin(θ) j1100i : (8) are implemented in PennyLane [17]. The gradient with respect to the Hamiltonian parameters x is obtained by These excitation gates when applied to an N-qubit sys- evaluating the expectation value tem act on the space of the specified qubits while acting as the identity on all other states [23].

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    7 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us