In quantum computing, the variational quantum eigensolver (VQE) is a quantum algorithm for quantum chemistry, quantum simulations and optimization problems. It is a hybrid algorithm that uses both classical computers and quantum computers to find the ground state of a given physical system. Given a guess or ansatz, the quantum processor calculates the expectation value of the system with respect to an observable, often the Hamiltonian, and a classical optimizer is used to improve the guess. The algorithm is based on the variational method of quantum mechanics.
It was originally proposed in 2014, with corresponding authors Alberto Peruzzo, Alán Aspuru-Guzik and Jeremy O'Brien.[1] [2] The algorithm has also found applications in quantum machine learning and has been further substantiated by general hybrid algorithms between quantum and classical computers.[3] It is an example of a noisy intermediate-scale quantum (NISQ) algorithm.
The objective of the VQE is to find a set of quantum operations that prepares the lowest energy state (or minima) of a close approximation to some target quantity or observable. While the only strict requirement for the representation of an observable is that it is efficient to estimate its expectation values, it is often simplest if that operator has a compact or simple expression in terms of Pauli operators or tensor products of Pauli operators.
For a fermionic system, it is often most convenient to qubitize: that is to write the many-body Hamiltonian of the system using second quantization, and then use a mapping to write the creation-annihiliation operators in terms of Pauli operators. Common schemes for fermions include Jordan–Wigner transformation, Bravyi-Kitaev transformation, and parity transformation.[4] [5]
Once the Hamiltonian
\hat{H}
\hat{P}i
X ⊗ I ⊗ Z ⊗ X
\hat{H}=\sumi\alphai\hat{P}i
where
\alphai
The VQE can be adapted to other optimization problems by adapting the Hamiltonian to be a cost function.[7]
The choice of ansatz state depends on the system of interest. In gate-based quantum computing, the ansatz is given by a parametrized quantum circuit, whose parameters can be updated after each run. The ansatz has to be adaptable enough to not miss the desired state. A common method to obtain a valid ansatz is given by the unitary coupled cluster (UCC) framework and its extensions.[8]
If the ansatz is not chosen adequately the procedure may halt at suboptimal parameters that do not correspond to a minima. In this situation, the algorithm is said to have reached a 'barren plateau'.The ansatz can be set to an initial trial function to start the algorithm. For example, for a molecular system, one can use the Hartree–Fock method to provide a starting state that is close to the real ground state.
Another variant of the ansatz circuit is the hardware efficient ansatz, which consists of sequence of 1 qubit rotational gates and 2 qubit entangling gates. The number of repetitions of 1-qubit rotational gates and 2-qubit entangling gates is called the depth of the circuit.
The expectation value of a given state
|\psi(\theta1, … ,\thetaN)\rangle
\{\thetai\}
N | |
i=1 |
E(\theta1, … ,\thetan)=\langle\hat{H}\rangle=\sumi\alphai\langle\psi(\theta1, … ,\thetaN)|\hat{P}i|\psi(\theta1, … ,\thetaN)\rangle
so in order to obtain the expectation value of the energy, one can measure the expectation value of each Pauli string (number of counts for a given value over the total number of counts). This step corresponds to measuring each qubit in the axis provided by the Pauli string. For example, for the string
X ⊗ Y ⊗ Y
Given a parametrized ansatz for the ground state eigenstate, with parameters that can be modified, one is sure to find the parametrized state that is closest to the ground state based on the variational method of quantum mechanics. Using classical algorithms in a digital computer, the parameters of the ansatz can be optimized. For this minimization, it is necessary to find the minima of a multivariable function. Classical optimizers using gradient descent can be used for this purpose.
For a given Hamiltonian (H) and a state vector
|\psi\rangle
|\psi\rangle
min|\psi\rangle\langle\psi|H|\psi\rangle
\operatorname{argmin}|\psi\rangle\langle\psi|H|\psi\rangle
|\psi\rangle
|\psi\rangle
2n
|\psi\rangle
The adjoining figure illustrates the high level steps in the VQE algorithm.
The circuit
U(\vec{\theta})
\vec{\theta}
\vec{\theta}=\begin{pmatrix}\theta1\ \theta2\ \vdots\ \thetap\end{pmatrix}
By running the circuit many times and constantly updating the parameters to find the global minima of the expectation value of the desired observable, one can approach the ground state of the given system and store it in a quantum processor as a series of quantum gate instructions.
In case of gradient descent, its required to minimize a cost function
f(\vec{\theta})
f(\vec{\theta})=\langle\psi(\vec{\theta})|H|\psi(\vec{\theta})\rangle
\vec{\theta}(new)=\vec{\theta}(old)-r\nablaf(\vec{\theta}(old))
where r is the learning rate (step size) and
\Deltaf(\vec{\theta}(old))=\left(
\partialf(\vec{\theta | |
(old) |
)}{\partial\theta1},
\partialf(\vec{\theta | |
(old) |
)}{\partial\theta2},\ldots\right)\top
In order to compute the gradients, the parameter shift rule is used.
Considering a single Pauli gate example:
U(\theta)=
| |||||
e |
,
\nabla\thetaU=
\partialU | |
\partial\theta |
=-
i | |
2 |
P
| |||||
e |
=-
i | |
2 |
PU=-
i | |
2 |
UP
As,
f(\theta)=\langle\phi|U\daggerAU|\phi\rangle
\nabla\thetaf(\theta)=
\partial | |
\partial\theta |
\langle\phi|U\daggerAU|\phi\rangle=\langle\phi|\left(
i | |
2 |
P\right)U\daggerAU|\phi\rangle+\langle\phi|U\daggerA\left(-
i | |
2 |
P\right)U|\phi\rangle
=
1 | |
2 |
\langle\phi|U\dagger(\theta+
\pi | |
2 |
)AU(\theta+
\pi | |
2 |
)|\phi\rangle-
1 | |
2 |
\langle\phi|U\dagger(\theta-
\pi | |
2 |
)AU(\theta-
\pi | |
2 |
)|\phi\rangle
=
1 | |
2 |
\left(f(\theta+
\pi | |
2 |
)-f(\theta-
\pi | |
2 |
)\right)
The above result has interesting properties as:
f(\theta)
\nabla\thetaf(\theta)
f( ⋅ )
\pm
\pi | |
2 |
As of 2022, the variational quantum eigensolver can only simulate small molecules like the helium hydride ion or the beryllium hydride molecule.[9] Larger molecules can be simulated by taking into account symmetry considerations. In 2020, a 12-qubit simulation of a hydrogen chain (H12) was demonstrated using Google's Sycamore quantum processor.[10]