Variational Quantum Eigensolver || Quantum Chemistry

Aryaan Bhimani
4 min readJul 25, 2020

--

This is my contribution to understanding the inner workings of the variational quantum eigensolver.

Every time I begin looking into an algorithm I always have an “Ahhhaaaa” moment when I can intuitively understand what is going on.

Given another algorithm like Shor’s factoring algorithm, I was only able to completely comprehend the algorithm once I drew the graphs, understood the modulo function and I was able to intuitively understand what QFT does.

In this same way, through this article, I hope to share my months of research and understanding and explain the intuitive approach of the variational quantum eigensolver.

Building Up Our Understanding

The easiest way of thinking about this algorithm is by understanding that it is simply just a simple double optimization algorithm.

In an attempt to build off the above explanation, VQE is able to find the lowest eigenvalue of a system through this previously mentioned double optimization.

Now based on just the quantum advantages, this computational task is faster than current classical computation. Due to the nature of being able to process more states and possibilities at faster, optimization on quantum devices becomes faster.

  • I guess you can just remember that quantum devices are super-specialized optimization devices in this case

In case you don’t already have a conceptual idea of eigenvalues and eigenvectors — which you will need if you decide to go further into this algorithm — here is a video that explains these concepts super well. Check out the whole playlist if you are interested or need a linear algebra refresher.

Understanding the Two Optimization Steps

  1. Minimizing the hamiltonian
  2. Minimizing for ground energy state

Hamiltonian Optimization

Here is another piece of vocab for you, the HAMILTONIAN!

The hamiltonian is more formally: an operator corresponding to the sum of the kinetic energies plus the potential energies for all the particles in the system (this addition is the total energy of the system in most cases under analysis).

AKA: The energy of a molecule.

In an attempt to solely understand the inner workings of what is happening, we are going to skip over some of the minor details related to the quantum gates.

Based on the molecules that you are trying to simulate, the gates in the quantum circuit will be chosen and placed accordingly.

These quantum gates are known as the Rx, Ry, and Rz gates and they each take in a parameter and change the rotation of each qubit accordingly. Using these parameters, the user may decide which type of optimization strategy they would like to use and minimize the output of the quantum circuit accordingly.

Optimizing the parameters for each gate to minimize the output is the first optimization step. This output is the hamiltonian.

This process takes tonnes of classical computational time itself.

Energy State Minimization

The next step is running the above sequence on many other parameters. These parameters are the distances between atoms.

The next idea that we need to understand is that atoms within molecules are never touching. As close as they get, molecules naturally have a space between them based on their electric fields which we can find through this next optimization.

The space between each molecule is now another parameter to consider. The ground energy graph created by a molecule where the y-axis is the energy and the x-axis is the distance creates a well like a shape.

The ground energy level of approx. -1.1361

This type of graph is created after testing each new distance with the above optimization strategy.

At its lowest energy level, the molecule is considered to be at its ground energy state.

And this completes the second optimization step. Optimizing the distance between molecules for the lowest energy level is the final result we are looking for.

This is what is considered a chemical simulation. With the information on how far away molecules are and their energy states, scientists are able to run larger experiments with this computational speed up from the quantum hardware.

With current hardware, simulating something like the caffeine molecule would take tonnes of computational power that we won't have for decades, but with quantum devices, we may have the potential in just a couple years.

If you are interested in how I was able to replicate VQE, check out my GitHub repository where I simulate H2 and LiH.

Also, check out some papers and other resources on the VQE algorithm for a more detailed explanation.

Thank you so much for reading my article.

I hope you learned something new and continue looking into quantum computing! If you really enjoyed reading this post, follow me on LinkedIn, and hit me up if you want to set something up! Thanks for reading.

--

--

Aryaan Bhimani
Aryaan Bhimani

Written by Aryaan Bhimani

Hey! I'm a 17-year-old Canadian student passionate about understanding technology and philosophy.

Responses (1)