# Variational Quantum Eigensolver (VQE)

The variational quantum eigensolver (VQE) is a hybrid classical-quantum algorithm that is intended to solve a wide range of problems on Noisy Intermediate-Scale Quantum (NISQ) computers by finding the minimum value of some target. Its primary applicability is in quantum chemistry; however, it has been adapted to solve optimization and machine learning problems.

VQE can be thought of as a guessing game. After a problem is formulated, a parameterized quantum circuit is selected. Like guessing the number someone is thinking off, the initial set of parameters is a random guess. But if we imagine that this person is responding with “higher or lower,” VQE provides a similar feedback mechanism. If the calculation improves, a classical neural network updates the parameters in an attempt to improve the next guess. If, however, the calculation produces a worse result, the parameters are updated so as to reverse course. This cycle of improved guessing continues until the desired minimum is found.

The initial guess isn’t completely random. Called an ansatz, the quantum circuit is selected based either on the problem being solved – a chemistry-inspired ansatz or problem-specific ansatz – or on NISQ hardware limitations – a hardware-efficient ansatz. Research continues into optimizing both classifications of ansatzes. The parameters, however, are usually random at the outset.

For more information, an article titled “The Variational Quantum Eigensolver — Explained: A Quantum Machine Learning Algorithm” by Frank Zickert and published in Towards Data Science provides a plain English explanation with visualizations. For even more information, a ScienceDirect paper titled “The Variational Quantum Eigensolver: A review of methods and best practices” dives into much more detail.

## What is Variational Quantum Eigensolver

The variational quantum eigensolver algorithm is the NISQ alternative to quantum phase estimation (QPE), which requires large-scale, Fault Tolerant Quantum Computing (FTQC). QPE, which proposes an exponential computational speedup over classical algorithms, cannot run on NISQ hardware because the quantum circuits are too deep. Today’s qubits cannot maintain their quantum states – their coherence – long enough to perform all the necessary operations. QPE requires quantum error correction (QEC) and logical qubits, which can maintain their coherence for much longer durations.

Although referred to as an algorithm, VQE has become an algorithm family. It has many variations, such as the accelerated variational quantum eigensolver (AVQE), which can be thought of as a hybrid of VQE and QPE.

## Components of Variational Quantum Eigensolver

The variational quantum eigensolver has four main components, three of which are classical and one of which is quantum. These components are:

- A problem specification, which is expressed as a Hamiltonian

- An ansatz, which is a parameterized quantum circuit

- A classical machine learning algorithm, which optimizes the parameters in the ansatz

- Classical post-processing to calculate the solution to the problem

These components actually execute in this order, although components 2 and 3 execute iteratively. The first set of parameters is just a guess, and then the parameters are iteratively adjusted until they are optimized. An optional fifth component could be quantum error mitigation (EM), which may improve the accuracy of each iteration’s results.

## Key Advantages of Variational Quantum Eigensolver

In the NISQ era, the variational quantum eigensolver algorithm offers several advantages:

- Unlike QPE, VQE can run on NISQ hardware.
- Ansatzes are relatively shallow quantum circuits, which allows quantum error mitigation (EM) methods to be applied to the results.
- Problems unrelated to quantum chemistry can be expressed as Hamiltonians, giving VQE considerable versatility.

Perhaps the greatest advantage is the volume of ongoing research. While QPE and other FTQC algorithms are limited to theoretical research, VQE and other NISQ algorithms benefit from both theoretical and experimental research.