The molecular dissociation problem in quantum chemistry focuses on determining the ground state, or the lowest energy equilibrium state, of molecules. This is a fundamental challenge in understanding chemical reactions and molecular behavior. The ground state energy gives insights into the stability and reactivity of the molecule. For simple molecules like hydrogen (H2), this involves calculating the energy at various internuclear distances to understand how the molecule behaves as its constituent atoms are separated. This problem becomes exponentially more complex with larger molecules, as they possess an immense number of possible quantum states.
Understanding the ground state energies of atoms and molecules is crucial for a wide range of scientific and industrial applications. In chemistry and physics, it's essential for predicting how molecules interact and react, which is fundamental to all chemical processes. In the pharmaceutical industry, accurate molecular models are vital for designing drugs that precisely target specific biological mechanisms. Similarly, in materials science, understanding molecular behavior at the quantum level enables the creation of new materials with specific desired properties. The challenge lies in the fact that classical computers struggle with the complexity of these calculations, as the number of quantum states in a molecule grows exponentially with its size.
The quest to accurately determine the ground state energies of molecules is a central challenge in quantum chemistry, tackled through both classical and quantum computational methods. Among the most prominent classical approaches is Density Functional Theory (DFT). DFT is widely used due to its relatively good balance between computational cost and accuracy for a range of molecular systems. It approximates the electron density of a molecule, which is a key determinant of its ground state. In a more straight forward manner, the ground states can also be calculated exactly classically by expressing the hamiltonian of a system and then diagonalising it. Though this process is especially prone to the problem of exponential computational resources for larger system sizes.
The implications of accurately determining molecular ground states are vast and impactful to our society. For example in drug design, understanding molecular interactions at the quantum level can lead to the development of more effective and safer drugs by precisely targeting specific biological pathways. Furthermore the ability to predict molecular behavior aids in creating novel materials, such as superconductors or materials with unique optical properties, crucial in electronics and communications. Lastly, such advances can also play a critical part in the transition to a sustainable future, by developing more efficient solar cells, better batteries, and improved catalysis processes for a clean fuel production.
This is the user documentation for the QuCUN material science use case. In the material science use case the quantum computer is used to obtain the ground state energy and derived properties of a molecule consisting of two atoms. It is an example of simulation use cases for quantum computers where the quantum computers can be used to solve an inherently quantum simulation problem that in general would require exponential resources on a convetional computer. This user documentation gives a general introduction of the use case and the methods used here.
An important property of molecules is the dissociation profile, the ground state energy of the molecule over the distance between two atoms in the molecule. From the dissociation profile, properties like the dissociation energy, the equilibrium distance in the molecule and the oscillation frequency of the atoms in the molecule can be obtained.
In this use case, we limit ourselves to the simple case of a molecule consisting of two atoms. For this case, the definition of the distance is clear and the number of molecular orbitals that needs to be involved in the calculation can be small enough to fit on a quantum computer.
The dissociation profile is obtained from the quantum computer using a VQE
(Variational Quantum Eigensolver) with a Unitary Coupled-Cluster Single
Double (UCCSD
) ansatz. VQE is a variational approach, which
means that this is a hybrid algorithm where free parameters of the VQE
algorithm are optimized by a classical optimizer during run time. For a more
detailed discussion of the quantum algorithm used in this use case, see the
VQE
section.
The quantum solver is based on the
qiskit
library, which provides a general quantum computing toolkit as well as a
selection of quantum algorithms (like the VQE) and ansätze for the VQE.
The derived properties (equilibrium distance r0, dissociation energy ΔE and oscillation frequency ω) are obtained by pure classical post-processing fitting the VQE dissociation profile to the Morse Potential. For an example for extracting the properties for a Hydrogen atom, see the Dissociation profile section.
As a variational method, the quality of the results of the VQE can strongly depend on the exact parameters chosen for the calculation.
In this materials use case the VQE algorithm is used to calculate the ground
state energies of a molecule across different interatomic distances on a
quantum computer. The so obtained dissociation profile
of the
molecule (here: H2) is compared to the results obtained from the pure
Hartree Fock method and to the conventional full CI calculation (referred to
as "exact" here).
This plot shows a dissociation profile for the hydrogen molecule calculated
in the 6-31g (reduced)
basis, where orbitals [2, 3] have been removed from the active space making
it a minimal basis set to reduce calculation runtime. Similar to the
conventional methods of quantum chemistry, a small basis set leads to a
limited precision of the obtained results.
As one can see from a simple demonstration, the obtained results from the quantum algorithm (here: VQE) show a good agreement with the (exact) full CI calculation. Moreover, its accuracy (here: on an ideal quantum computer) is much higher than of the classical Hartree Fock method, which has been used as the initial ansatz here. Also the true equilibrium distance (vertical dotted line) and the expected dissociation limit (horizontal dotted line) can be described with a sufficient quality, although only a minimal basis set was used for the calculations.
The obtained VQE dissociation curve allows us to derive important molecule properties, like equilibrium distance r0, dissociation energy ΔE and oscillation frequency ω by pure classical post-processing. The use case extracts these properties by fitting the Morse Potential to the dissociation curve obtained from the VQE (or to the other results obtained from the use case).
We see that the VQE (Hartree-Fock, exact) results can be fitted quite nicely by the Morse Potential.
The desired molecule properties, like equilibrium distance r0, dissociation energy ΔE and oscillation frequency ω, can be obtained analytically from the Morse Potential fit.
Specifically for the given example, given the limited precision when running measurements with minimal basis sets, the quantum algorithm (on a perfect simulated quantum computer) achieves results of a similar quality as the classical full CI calculation.
There exists an alternative way to compute the dissociation energy of the hydrogen molecule as the heat effect of the reaction: \( H_2 \longrightarrow 2H \). The dissociation energy is then computed as follows: \( \Delta E = 2E(H) - E(H_2) \), where \( E(H) \) is the energy of a single hydrogen atom, while \( E(H_2) \) is the energy of the hydrogen molecule at the minimum of the potential energy curve. Since the hydrogen atom has only one electron, there is no electron correlation, and \( E(H) \) should be calculated with the Hartree-Fock method for all three approaches (VQE, Hartree-Fock, and exact). However, the molecule should be computed with the electronic structure method of choice. It is instructive to compare \( \Delta E \) obtained by this method with the one obtained from the fitted Morse potential.
The reference values for the properties of interest for the Hydrogen molecule from the literature are (see also ref 1):
Equilibrium distance r0 in [Å] | Dissociation energy ΔE in [Hartree] | Oscillation frequency ω in [1/cm] |
---|---|---|
0.741 | 0.174 | 4404 |
Please note that for demonstrative purposes a small molecule has been chosen
here, which allows to compare the VQE results to the exact solution.
The VQE calculations shown here ran on a quantum computing simulator,
not on real quantum computer hardware yet. This implies the assumption of an
ideal, i.e. error-free, quantum computer. Whereas real quantum computers are
subject to so called 'noise' (errors) that affects the obtained results.
Results from runs on actual hardware will deviate more strongly from the
exact solution.
The Variational Quantum Eigensolver (VQE) is hybrid quantum-classical algorithm that can be used to calculate ground state energy of a Hamiltonian (e.g. a molecule) on a quantum computer.
The core principle of the VQE is the variational principle. The ground state is the lowest energy state \(|\psi_0 \rangle \) of all possible states \( \{ |\psi \rangle \}\) of a Fock space, where the energy is the expectation value of a Hamiltonian \(H \). Finding the lowest energy state of a given set of trial states \( \{ |\psi_T \rangle \}\) is a good approximation to finding the ground state and the ground state energy as long as the set of trial states covers the Fock space densely enough that a trial state is close to the true ground state.
The VQE uses the quantum computer to prepare the trial states \( |\psi_T(\theta) \rangle \) as a function of some classical parameters \(\theta \). The expectation value of the Hamiltonian is then measured on the quantum computer as well. The hybrid part of the VQE is a classical optimizer. The classical optimizer tries to minimize the cost function, the expectation value of the Hamiltonian, by varying the classical parameters \(\theta \). Once converged to an optimal set of parameters \(\theta_0\) the approximation of the ground state is given by \[ | \psi_0 \rangle \approx | \psi_T(\theta_0) \rangle \] and the approximation of the ground state energy is given by the final value of the cost function. Besides the ansatz for the trial wave functions, the chosen optimizer can have a large influence on the quality of the VQE results. For a list of the available optimizers see section Implementation Details.
For a detailed discussion of the Variational Quantum Eigensolver, we refer the reader to paper by McClean et al..
As mentioned above, the ansatz for the trial wave functions is an important
choice for the VQE algorithm. We use the Unitary Coupled-Cluster Singles and
Doubles (UCCSD) ansatz for the VQE algorithm. This ansatz is a standard
choice for the VQE algorithm when considering quantum chemistry problems and
is implemented in qiskit
. The ansatz state is constructed
starting from a Hartree-Fock state, and then acting on it with some
exponential "cluster" operators that generate excitations to account for
electron correlation. Electron correlation built this way accounts for
electron-electron repulsion better than the average field used by
Hartree-Fock. More precisely, while Hartree-Fock only includes exchange
correlation between electrons (i.e. the correlation due to antisymmetry,
also known as Fermi correlation), the UCCSD ansatz improves on it by
partially accounting for Coulomb correlation.
The wavefunction of the coupled-cluster theory is written as an exponential ansatz: \[ | \psi \rangle = e^T | \Phi_0 \rangle \] where \( | \Phi_0 \rangle \) is a Slater determinant obtained from Hartree-Fock molecular orbitals. The action of the exponentiated cluster operator \( T \) on the state \( |\Phi_0\rangle \) produces a linear combination of Slater determinants that partly account for Coulomb interaction.
The cluster operator has the form \( T = T_1 + T_2 \) , where \( T_1 \) generates single-electron excitations and \( T_2 \) generates two-electron excitations, from which the naming "Singles and Doubles" in the UCCSD acronym stems. The expressions for the excitation operators are \[ T_1 = \sum_{ia} t_{ia} c^{\dagger}_a c_i + h.c. \] \[ T_2 = \frac{1}{4} \sum_{ijab} t_{ijab} c^{\dagger}_a c^{\dagger}_b c_i c_j + h.c. \] where \( t_{ia} \) and \( t_{ijab} \) are real coefficients, \( c^{\dagger} \) and \( c \) are fermionic creation and annihilation operators, and the indices \( i, j \) correspond to occupied molecular orbitals in the original Hartree-Fock state \( | \Phi_0\rangle \), while \( a, b \) correspond to unoccupied states. The \( t_{ia} \) and \( t_{ijab} \) are the free parameters that are optimized by the classical optimizer to find the minimum energy.
While the operators \( T_1 \) and \( T_2 \) generate respectively single and double excitations when acting directly on \( |\Phi_0\rangle \), notice that when exponentiated as \( e^T \) it also generates higher correlations due to the power series expansion of the exponential.
In this section we discuss the implementation details of the use cases and the available options that can be chosen by the (expert) user.
The use cases is implemented in Python with the
qiskit
quantum computing framework. The use case will run on the QuCUN platform.
Whether it runs on a noise-less quantum simulator, a noisy quantum simulator
or on actual quantum hardware is determined by the QuCUN platform settings.
When running on an ideal, i.e. error-free quantum computer simulator, the
simulation results can be very accurate, depending on the chosen parameters.
Real quantum computer hardware is subject to environmental noise (leading to
errors) that affects the obtained results negatively.
The UCCSD ansatz used by the use case needs the Hartree-Fock self consistent
solution of the molecule as an input. This solution can be obtained by
qiskit from a chemical driver. The use case supports two chemical drivers:
PySCF
and Psi4
. The default choice for a chemical driver to perform
the Hartee-Fock calculation is PySCF
.
The chemical driver takes the input molecule
, as well as the
information on the basis set
, to define the
electronic structure problem
.
In computational chemistry, a basis set is a finite set of functions, usually chosen to be orthogonal, that are used as a basis to approximate electronic wavefunctions. As the number of basis functions in the set approaches infinity, the accuracy of the approximation of the electronic wavefunction calculated using the basis set improves at the price of a higher computational cost.
Basis sets are used for example to calculate the molecular orbitals that serve as the Hartree-Fock starting point for the construction of the UCCSD ansatz, but also to construct the ansatz from the initial Hartree-Fock state. The choice of basis set is influenced by the tradeoff between computational resources available and accuracy of the desired result. A basis set is called minimal if for each atom in the molecule it contains only enough orbitals to contain the electrons in the neutral atom. Thus for the hydrogen atom only a single 1s orbital is needed, while for a carbon atom, 1s, 2s and three 2p orbitals are needed. The basis sets available are:
The cost function that we want to minimize is the expectation value of the fermionic Hamiltonian of interest, evaluated in the UCCSD ansatz state with a certain set of parameter values. The parameter values are then optimized by a classical optimizer. The classical optimizers available are:
In the official SciPy documentation additional information on some of these optimizers is available.
The qubit mapper translates the fermionic degrees of freedom in the original quantum chemisty problem into spin degrees of freedom that can be represented on a quantum computer. Several different mappings are possible, in qiskit we have two options
ParityMapper
- Encodes the parity of all teh fermionic
orbitals up to an orbital j
in qubit j
. When
providing the overall number of fermionic particles in the system, the
qiskit ParityMapper can reduce the number of qubits by 1
.
JordanWigner
- The JordanWigner mapping encodes the
occupation of an fermionic orbital j
in qubit j
.
For a more detailed discussion of mappings in the context of quantum simulation see for example this paper by Seeley et al.
The number of required qubits in the system increases linearly with the
number of molecular orbitals in the problem. When the number of qubits
becomes too large for the available hardware the number of qubits required
can be reduced by reducing the active space. Orbitals that are always
occupied and orbitals that are always unoccupied are removed from the
problem in a transformation. Removing orbitals from the active space speeds
up calculations, but depending on the molecule being simulated can impact
the accuracy of the results. Core orbitals are always removed from the
active space automatically. The user can additionally remove unoccupied
orbitals with the inactive_orbitals
orbitals option that lists
the orbitals that should be removed as unoccupied by the transformation.
Qiskit does not perform a check when removing the unoccupied orbitals and
this option should only be used by expert users. For details on the
mathematical transformation involved
see.
For better comparison the use case calculates three results for the dissociation profile and the post-processing:
VQE
resultHartee-Fock
result taken directly from the chemical
driver
exact
> solution. The exact solution corresponds to
solving for the ground state of the effective Hamiltonian obtained from
the chemical driver by exact diagonalisation. In chemical terms it would
be equivalent to Full CI, but it is not a direct diagonalisation of the
original fermionic Hamiltonian.
[1]
Experimental data for H2
, https://cccbdb.nist.gov/exp2x.asp?casno=1333740
[2] Scientific
paper
on the improved theoretical ground state energy of the hydrogen molecule
[3] Scientific
paper
on the potential energy curves
This user documentation delves into the QuCUN material science use case focused on investigating the optimal orientation of atoms within a periodic material system. Specifically, it explores a model case involving a one-dimensional lattice essentially a wire composed of two distinct types of atoms in its unit cell, exemplified by Li and H. This scenario showcases how quantum computing can be pivotal in addressing complex simulation challenges, particularly in material science where understanding atomic arrangements in periodic structures is crucial. Through this use case, we demonstrate the potential of quantum computers to accurately determine ground state energies and related properties of molecular systems. Such tasks, owing to their quantum nature, often demand resources beyond the practical reach of classical computing architectures. Herein, we provide an overview of the approach and methodologies employed in this quantum simulation use case, highlighting the innovative use of quantum computing to surmount barriers faced by traditional computational methods.
Here we want to give a simple toy model for a material science use case in a
periodic system. We are considering a one-dimensional lattice (a wire) with
two atoms of distinct elements in the unit cell (for example
Li
and H
). The lattice can be described by atomic
coordinates and basis vectors. The atomic coordinates define the position of
a Li
and a H
atom with respect to each other and
basis vectors define the unit cell containing the atoms and repeated
periodically along the x-axis.
We are interested in finding the optimal orientation of the atoms in the
unit cell. Specifically, we want to find the optimal angle of the axis
connecting the atoms in the unit cell to the lattice vector of the periodic
direction. Without loss of generality, we assume that the system is periodic
along the x-axis, the first atom of element A
is located at
(0,0,0) in the unit cell, and the second atom of element B
has
a constant distance to the A
atom and is rotated in the x-y
plane. We are looking for the optimal angle with respect to the x-axis.
This application is a model case to study polymorphism and phase transitions in crystals. Restricted to one-dimensional parameter space (rotation angle) we are looking for stable orientations of the atoms in the cell. These are located at the energy minima and correspond to the phases (polymorphs), whereas energy maxima define the phase transition barriers.
As in other use case we set up the system the problem that is solved in two steps. First some classical pre-processing is performed using a computational chemistry software package (PySCF in this case). Then the output of the pre-processing is handed to a variational quantum eigensolver (VQE) that can run on a real quantum computer or on a simulated quantum computer. The VQE on the quantum computer is again used to find the ground state of a finite size Hamiltonian. The periodicity only enters the problem when preparing the Hamiltonian used in the VQE with the classical preprocessing.
PySCF allows us to define a periodic system by defining the unit cell and the basis vectors. In the periodic system, the atoms in the unit cell are able to interact with the atoms of the other unit cells. The classic pre-processing part of the use case uses a Hartree-Fock method to determine the approximate solution of the molecular orbitals taking into account the interaction between unit cells but without taking into account electron-electron correlation.
The Hartree-Fock method produces a Hamiltonian of the atoms in one unit cell that already accounts for the interaction between unit cells and also produces approximate ground state energies. The Hamiltonian produced by the periodic Hartree-Fock calculation can then be passed to the VQE without modifying the VQE for periodicity.
The implementation details are similar to the molecular use case. The code has been implemented based on the qiskit quantum computing framework and with the help of PySCF.
In setting up the problem the same optimizers are available as for the molecular use case . The available qubit encodings that encode the electronic degrees of freedom into qubits are also the same (Parity encoding and Jordan-Wigner encoding).
In the periodic problem we have more choices, because PySCF has some specific orbitals for periodic systems.
PySCF also allows the use of pseudopotentials. In the use case two configurations are allowed
As for the molecular calculation, Hartree-Fock energies, VQE energies and exact diagonalisation energies are calculated for the angle-dependent ground states electronic energies. Since we are interested in the optimal orientation of the two atoms in the unit cell, we determine the angles that correspond to the energy minima and the height of the energy barrier between them in post processing.
In the following you can see the angle dependent ground state energies for Li-H in a 1D periodic system with a Li-H distance of 1.6 Å and with a periodic cell of length 3.2 Å.
Here, we observe a stable phase at 50 (HF) and 60 (VQE) °:
We observe two transition state structure:
Account of electron correlation with VQE shifts the stable structure by 10 ° as compared to HF. This potential curve is mirror-symmetric when continued towards 180 °, giving and equivalent minimum at 140 (HF) or 150 (VQE) °. In addition, the depth of the potential well is larger at the VQE level (209 kJ/mol) than at the HF level (170 kJ/mol). At the same time, the barrier at 90 ° between equivalent tilted stable structures is lower for VQE (6 kJ/mol) than for HF (22 kJ/mol). This can be interpreted as follows: electron correlation (VQE) makes structures more stable, but more flexible, so that the system constantly switches between equivalent minima.
Configure your own Molecular Dissociation problem with the following inputs. Select a base set, two atoms and a range for the distance between them as well as a stepsize for this distance range. When you are finished press "Done" to submit your configured problem.
Configure your own Periodic problem with the following inputs. Select a base set, two atoms, pseudopotentials and the distance. When you are finished press "Done" to submit your configured problem.
Your input is about to be submitted. If you want to make changes press "Close", otherwise press "Submit" to continue.
Reference value | ||||
---|---|---|---|---|
Equilibrium Distance \(r_0\) in [Å] |
0.741 | |||
Dissociation energy ∆E in [\(E_h\)] |
0.174 | |||
Oscillation frequency \(\omega\) in [1/cm] |
4404 |
Property | |||
---|---|---|---|
Minima Angles[°] | |||
Energy Barriers | |||
Energy Differences |