Quantum VQE Qiskit

VQE: Finding Ground State Energy on a Quantum Computer

A hands-on walkthrough of the Variational Quantum Eigensolver, with a live simulation you can run right here.

· 12 min read

The Variational Quantum Eigensolver (VQE) is one of the most important algorithms in near-term quantum computing. The goal is simple: find the lowest energy (ground state) of a quantum system. The method is clever: use a classical optimizer to tune the parameters of a quantum circuit until the measured energy stops going down.

The core idea

Given a Hamiltonian HH (an operator encoding the physics of your system), we want:

E0=minθψ(θ)Hψ(θ)E_0 = \min_\theta \langle \psi(\theta) | H | \psi(\theta) \rangle

The quantum circuit ψ(θ)|\psi(\theta)\rangle is called the ansatz: a parameterized guess at the ground state. The classical optimizer tunes θ\theta to minimize the expectation value.

Try it live

Run the full VQE simulation below. Pick a Hamiltonian, choose an ansatz, hit play, and watch the energy converge iteration by iteration.

⚛️

VQE Explorer

Real Qiskit simulation. Pick a Hamiltonian and watch it converge.

Connects to live backend, requires internet

What you’re watching

Circuit panel: The parameterized ansatz circuit. Each RyR_y gate has a tunable angle θi\theta_i. After each optimizer step the angles change.

Bloch spheres: Each qubit’s quantum state visualized on a sphere. The north pole is 0|0\rangle, south pole is 1|1\rangle, equator is superposition.

Energy plot: The expectation value H\langle H \rangle at each iteration. The green dashed line is the exact ground truth (from full diagonalization).

State distribution: Probability of measuring each basis state. At convergence this should concentrate on the ground state.

Why it works

The variational principle guarantees that for any state ψ|\psi\rangle:

ψHψE0\langle \psi | H | \psi \rangle \geq E_0

So the expectation value is always an upper bound on the true ground state energy. A classical optimizer (COBYLA, Powell, Nelder-Mead) minimizes this upper bound, and if the ansatz is expressive enough, it converges to E0E_0.

Limitations

VQE is heuristic: there’s no guarantee the optimizer finds the global minimum, and the quality of the result depends heavily on the choice of ansatz. For molecules like H2 the UCCSD-inspired ansatz is theoretically motivated; for general problems you’re trading expressibility against trainability.

The bigger challenge at scale is the barren plateau problem: for deep circuits with many qubits, gradients vanish exponentially and training stalls.