# Variational Quantum Eigensolver#

Author: Alexandra Semposki

The variational quantum eigensolver (VQE) has been used prominently in QC in the past few years as a way to find the ground state energy of a system. This is done using the variational method from quantum mechanics, which is able to provide an upper bound for this ground state energy. We start with a Hermitian Hamiltonian, \(H\), and write the eigenvalue equation down as

Say, however, that we cannot directly solve this and must instead use states \(| \psi(\theta) \rangle\), which have some variable angle \(\theta\) dependence, and can be expanded in a basis of the original states such that

Now we can find the expectation value.

and finally

and we know that

so we can minimize the angles \(\theta\) and get

VQE will attempt to do this angle minimization to obtain a reasonable approximation to the ground state energy of the deuteron in this chapter. (To see the notebook this was adapted from, and an excellent tutorial using a very simple Hamiltonian, click here).

When it comes to implementing this technique, there are a few main ingredients in the recipe:

The Hamiltonian in question transformed into the Pauli basis using the

**Jordan-Wigner transformation**;A suitable

**ansatz**for the wave function;A classical

**optimization routine**to be used to continously optimize the angles \(\theta\) for each run of the VQE circuit.

In the next chapter, we will see these three ingredients worked out in detail and implemented using the package `pennylane`.