This article was automatically translated from the original Turkish version.
Variational Quantum Eigensolver (VQE), proposed in 2014 by Alberto Peruzzo, Alan Aspuru-Guzik and Jeremy O'Brien, is a hybrid algorithm that combines quantum and classical computers.
The primary goal of this algorithm is to estimate the ground state energy of a specific quantum system.
VQE is specifically designed for today’s NISQ (Noisy Intermediate-Scale Quantum) devices, as it aims to efficiently utilize the currently limited capacity of quantum computers by employing relatively short (shallow) quantum circuits.
To properly understand VQE, it is essential to grasp two key principles:
Let us elaborate on these two points:
VQE is based on the variational principle, a fundamental concept in quantum mechanics.
According to the variational principle:
For any normalized wave function <span class="katex"><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:1em;vertical-align:-0.25em;"></span><span class="mord">∣</span><span class="mord mathnormal" style="margin-right:0.03588em;">ψ</span><span class="mclose">⟩</span></span></span></span>
1. Prepare the Ansatz Wave Function
2. Measure the Hamiltonian
3. Calculate the Energy
4. Perform Classical Optimization
First, let us define what an Ansatz is.
Essentially, it is a parameterized quantum circuit that serves as an approximation of the wave function or state of the problem being solved. The primary purpose of the ansatz is to find the optimal set of parameters that minimizes the expected value of the Hamiltonian. In this way, VQE obtains an upper bound on the ground state energy of the system.
We can summarize this as follows:
Mathematically, we can express the ansatz as:
<span class="katex"><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:1em;vertical-align:-0.25em;"></span><span class="mord">∣</span><span class="mord mathnormal" style="margin-right:0.03588em;">ψ</span><span class="mopen">(</span><span class="mord mathnormal" style="margin-right:0.02778em;">θ</span><span class="mclose">)⟩</span><span class="mspace" style="margin-right:0.2778em;"></span><span class="mrel">=</span><span class="mspace" style="margin-right:0.2778em;"></span></span><span class="base"><span class="strut" style="height:1em;vertical-align:-0.25em;"></span><span class="mord mathnormal" style="margin-right:0.10903em;">U</span><span class="mopen">(</span><span class="mord mathnormal" style="margin-right:0.02778em;">θ</span><span class="mclose">)</span><span class="mord">∣0</span><span class="mclose">⟩</span></span></span></span>
As previously mentioned, the Hamiltonian is an operator that measures the energy of the system.
When the Hamiltonian is expressed as a sum of tensor products of Pauli matrices, each pair of Pauli matrices represents the interactions between different quantum components of the system.
For example, <span class="katex"><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:1em;vertical-align:-0.25em;"></span><span class="mopen">(</span><span class="mord mathnormal" style="margin-right:0.07847em;">I</span><span class="mspace" style="margin-right:0.2222em;"></span><span class="mbin">⊗</span><span class="mspace" style="margin-right:0.2222em;"></span></span><span class="base"><span class="strut" style="height:1em;vertical-align:-0.25em;"></span><span class="mord mathnormal" style="margin-right:0.07847em;">X</span><span class="mclose">)</span><span class="mpunct">,</span><span class="mspace" style="margin-right:0.1667em;"></span><span class="mopen">(</span><span class="mord mathnormal" style="margin-right:0.07847em;">X</span><span class="mspace" style="margin-right:0.2222em;"></span><span class="mbin">⊗</span><span class="mspace" style="margin-right:0.2222em;"></span></span><span class="base"><span class="strut" style="height:1em;vertical-align:-0.25em;"></span><span class="mord mathnormal" style="margin-right:0.07847em;">X</span><span class="mclose">)</span></span></span></span>
2. An example VQE algorithm constructed using Qiskit developed by IBM:
Variational Quantum Eigensolver - Qiskit
The choice of library for implementing the algorithm—such as Qiskit, Cirq, or PennyLane—is entirely up to you. You may base your decision on criteria such as visualization quality, module reliability, and Python compatibility.

Visualization Example with Qiskit (IBM Quantum Documentation.

Visualization Example with Cirq (Cirq Documentation.
Fundamentals of VQE
Providing an Upper Bound on Energy (Variational Principle)
How Does VQE Work?
Preparing the Ansatz Wave Function
Measuring the Hamiltonian