Variational Quantum Eigensolver

The Variational Quantum Eigensolver is the algorithm that made quantum computers useful before they were reliable. Its problem is one of the oldest in physics — find the lowest energy a quantum system can have — and its answer, the ground-state energies of molecules and materials, is what chemistry and condensed-matter physics are built on. The obvious quantum route, phase estimation, demands deep, fault-tolerant circuits today's noisy hardware cannot run. VQE sidesteps this by refusing to do the hard arithmetic on the quantum device at all: it asks the processor for one thing only — prepare a trial state and report its energy. Everything else, deciding how to make that energy smaller, is handed to a classical optimizer that nudges the circuit's knobs and asks again, closing a hybrid quantum–classical feedback loop. This deep-tier synthesis takes the parameterized-circuit machinery from aq-qci-parameterized-quantum-circuits-ansatze and the measurement-and-cost apparatus from aq-qci-cost-function-measurement-estimation and assembles them into a working eigensolver. Three ideas organize everything. First, the method rests on a single inequality — the Rayleigh–Ritz variational principle — guaranteeing any trial state's energy is an honest upper bound on the true ground energy E0E_0, so lowering it moves toward the truth. Second, that expectation is made measurable by writing the Hamiltonian as a weighted sum of Pauli strings, turning "compute an energy" into "sample many ±1 measurements" — the source of chemical accuracy's crushing shot-cost. Third, success is decided not by the equation but by ansatz expressibility, optimizer choice, and the barren-plateau trainability barrier. VQE is less a formula than a negotiation between what a circuit can represent and what an optimizer can find.

Key takeaways
  • VQE estimates the ground-state energy of a Hamiltonian HH by preparing a parameterized trial state ∣ψ(θ⃗)⟩|\psi(\vec\theta)\rangle on a quantum processor, measuring ⟨ψ(θ⃗)∣H∣ψ(θ⃗)⟩\langle\psi(\vec\theta)|H|\psi(\vec\theta)\rangle, and minimizing it with a classical optimizer.
  • Its correctness rests on the Rayleigh–Ritz variational principle: any normalized state's energy is bounded below by E0E_0, so the minimization can only approach E0E_0 from above and never undershoot it.
  • The Hamiltonian is written as a weighted sum of Pauli strings H=∑acaPaH=\sum_a c_a P_a; the device estimates each ⟨Pa⟩\langle P_a\rangle by repeated ±1 measurement, and the classical side recombines them with the coefficients cac_a.
  • Because expectation values are estimated from finite samples, the energy error falls only as 1/N1/\sqrt{N} — chemical accuracy on a molecule can cost of order a million shots per energy evaluation.
  • Gradients come exactly via the parameter-shift rule, ∂θjE=12[E(θ⃗+π2e^j)−E(θ⃗−π2e^j)]\partial_{\theta_j}E=\tfrac12[E(\vec\theta+\tfrac\pi2\hat e_j)-E(\vec\theta-\tfrac\pi2\hat e_j)], with no finite-difference truncation error.
  • The central tension is expressibility versus trainability: a flexible ansatz can reach the ground state but tends to flatten the landscape into a barren plateau where gradients vanish like 2−n2^{-n}.
  • Key idea: minimizing ⟨ψ(θ⃗)∣H∣ψ(θ⃗)⟩\langle\psi(\vec\theta)|H|\psi(\vec\theta)\rangle over a circuit-parameterized state can never go below the true ground-state energy E0E_0, so VQE turns ground-state estimation into an optimization whose error is bounded by the ansatz's distance from the ground state.

Where this lives today

VQE is the defining algorithm of the noisy intermediate-scale quantum (NISQ) era, living where quantum hardware is tested against classical simulation. After the 2014 photonic demonstration on H₂, IBM's 2017 experiments reached LiH and BeH₂ on transmons, and Google's 2020 experiment ran a twelve-qubit chemistry circuit on Sycamore with heavy error mitigation. Software stacks — Qiskit Nature, PennyLane, OpenFermion — ship VQE as a primitive, with fermion-to-qubit mappings, chemistry-inspired ansätze such as unitary coupled cluster and its adaptive ADAPT-VQE variant, and Pauli-grouping and classical-shadow schemes that attack the shot budget above. The two live research fronts are the obstacles this article names. The measurement problem — millions of shots per energy — drives commuting cliques, derandomized shadows, and low-rank Hamiltonian factorizations. The trainability problem — barren plateaus, gradients vanishing as 2−n2^{-n} — drives symmetry-preserving ansätze and a sharpening debate over whether VQE can offer quantum advantage before fault tolerance. As classical methods keep improving, VQE must reach chemical accuracy on a system no classical method can, faster than shots and noise allow — unresolved, and exactly why it remains the most-studied algorithm of the era.

The physical picture

Picture the space of all quantum states as a vast landscape whose altitude is energy ⟨H⟩\langle H\rangle; the true ground energy E0E_0 is its deepest valley floor. A quantum circuit with knobs θ⃗\vec\theta cannot roam the whole space — it traces a low-dimensional surface, the ansatz manifold, draped across the landscape, and VQE rolls a ball downhill on it. The variational principle is the geological law of this terrain: the ball can never sink below the true floor E0E_0, so wherever it rests is a guaranteed upper bound. If the surface dips all the way to the floor, the bound is tight and VQE recovers E0E_0 exactly; if it never reaches that low, the ball settles in a shallower basin and the reported energy is honest but loose. The first figure makes this exact for a one-parameter circuit expressive enough to touch the floor.

Figure
The variational landscape for the single-qubit Hamiltonian H = Z + X with an Ry ansatz: the cost E(θ) = cosθ + sinθ is a pure sinusoid, and it never drops below the true floor E₀ = −√2 ≈ −1.414 — the minimum at θ = 5π/4 exactly touches the floor because this ansatz can represent the ground state, so the variational bound is saturated
E(θ) ≥ E₀ always — the cost curve never pierces the variational floor unreachable region below E₀ θ +√2 0 −√2 energy ⟨H⟩ E₀ = −√2 = −1.414 θ* = 5π/4 min touches floor E(θ) = cosθ + sinθ

The quantum computer does exactly one hard task in this loop: evaluate ⟨ψ∣H∣ψ⟩\langle\psi|H|\psi\rangle for an entangled state a classical machine could not even store. Everything about where to step next goes to a classical optimizer on a laptop. This division of labor — exponentially large state vectors hidden in the hardware, search logic kept classical — explains VQE's robustness: because only expectation values are measured, it is blind to global phase and tolerant of some incoherent noise, precisely why it survives where phase estimation would collapse. The price is that VQE is a heuristic, not a guarantee: nothing promises the optimizer reaches the ansatz's minimum, or that that minimum is near E0E_0. The second figure shows the payoff when it works — a VQE run on H₂ sliding past the Hartree–Fock reference and settling into the exact energy within chemical accuracy.

Figure
VQE convergence for the H₂ molecule in a minimal basis: the estimated energy falls with optimizer iteration, drops below the Hartree–Fock reference E_HF = −1.1167 Ha as it captures correlation energy, and settles onto the exact full-configuration-interaction value E_FCI = −1.1373 Ha inside the chemical-accuracy band of ±1.6 mHa
The punchline: VQE for H₂ converging to E_FCI = −1.1373 Ha within chemical accuracy −1.050 −1.075 −1.100 −1.125 −1.150 0 10 20 30 40 optimizer iteration energy E(θ) (Ha) E_FCI = −1.1373 Ha chemical-accuracy band ±1.6 mHa E_HF = −1.1167 Ha (Hartree–Fock) converged

The gap between the two horizontal lines — Hartree–Fock down to the exact answer — is the correlation energy, only about 0.02 Ha0.02\ \mathrm{Ha} for H₂ but the entire reason the calculation is hard. The mean-field energy is easy and classical; squeezing out that last sliver to within the 1.6×10−3 Ha1.6\times10^{-3}\ \mathrm{Ha} threshold is what the quantum computer must earn its keep on.

The core equations

The foundation is a single inequality: the energy of any trial state is at least the ground energy, and the algorithm pursues the smallest value the left side may take.

E(θ⃗)=⟨ψ(θ⃗)∣H∣ψ(θ⃗)⟩  ≥  E0(1)E(\vec\theta) = \langle\psi(\vec\theta)|H|\psi(\vec\theta)\rangle \;\ge\; E_0 \qquad (1)

where: ∣ψ(θ⃗)⟩|\psi(\vec\theta)\rangle — normalized trial state prepared by the parameterized circuit; θ⃗\vec\theta — vector of classical circuit parameters (rotation angles); HH — Hermitian Hamiltonian whose ground state is sought; E0E_0 — exact lowest eigenvalue of HH. Read it as a promise: no setting of the knobs reports an energy below the truth, so minimizing the left side is a safe descent toward E0E_0. To make that expectation measurable, the Hamiltonian is expanded in the Pauli basis — the operator alphabet of qubits, each string readable directly on hardware.

H=∑aca Pa,Pa∈{I,X,Y,Z}⊗n(2)H = \sum_{a} c_a\, P_a,\qquad P_a \in \{I,X,Y,Z\}^{\otimes n} \qquad (2)

where: cac_a — real coefficient of the aa-th Pauli string, obtained as Tr(HPa)/2n\mathrm{Tr}(H P_a)/2^n; PaP_a — tensor product of single-qubit Paulis on nn qubits; nn — number of qubits. Any Hermitian operator has such an expansion; for molecular Hamiltonians the term count grows polynomially — but quickly — with size. Because the expectation is linear in HH, the energy is a weighted sum of Pauli averages — the equation that splits the labor: the device supplies each ⟨Pa⟩\langle P_a\rangle, the classical computer sums them.

E(θ⃗)=∑aca ⟨ψ(θ⃗)∣Pa∣ψ(θ⃗)⟩(3)E(\vec\theta) = \sum_a c_a\,\langle\psi(\vec\theta)|P_a|\psi(\vec\theta)\rangle \qquad (3)

where: ⟨Pa⟩≡⟨ψ(θ⃗)∣Pa∣ψ(θ⃗)⟩\langle P_a\rangle\equiv\langle\psi(\vec\theta)|P_a|\psi(\vec\theta)\rangle — expectation of PaP_a, estimated by rotating each qubit into the eigenbasis of its Pauli factor, sampling bitstrings, and averaging the ±1 eigenvalues. Each ⟨Pa⟩\langle P_a\rangle is an average of finite ±1 samples, so it carries noise; those noises add into the total energy variance — which dictates how many shots chemical accuracy costs.

Var[E^]=∑aca2 (1−⟨Pa⟩2)Na(4)\mathrm{Var}[\hat E] = \sum_a \frac{c_a^2\,\big(1-\langle P_a\rangle^2\big)}{N_a} \qquad (4)

where: E^\hat E — empirical energy estimator; NaN_a — shots on term aa; 1−⟨Pa⟩21-\langle P_a\rangle^2 — single-shot variance of a ±1 outcome. The standard error falls only as 1/N1/\sqrt{N} — the root of VQE's shot-hunger. Gradients are available exactly, not approximately, through the parameter-shift rule: shift one angle by ±π/2\pm\pi/2 and difference the two energies.

∂E∂θj=12[ E(θ⃗+π2e^j)−E(θ⃗−π2e^j)](5)\frac{\partial E}{\partial \theta_j} = \frac{1}{2}\Big[\,E\big(\vec\theta+\tfrac{\pi}{2}\hat e_j\big) - E\big(\vec\theta-\tfrac{\pi}{2}\hat e_j\big)\Big] \qquad (5)

where: e^j\hat e_j — unit vector shifting only the jj-th parameter; θj\theta_j — an angle entering through U(θj)=e−iθjG/2U(\theta_j)=e^{-i\theta_j G/2} with generator G2=IG^2=I. The shifts are macroscopic rotations, not infinitesimal — why the rule is exact, not a finite difference. Finally, the benchmark that decides whether a VQE result is useful — the estimate must land within chemical accuracy of the truth.

Eest−E0  ≤  1.6×10−3 Ha(6)E_{\mathrm{est}} - E_0 \;\le\; 1.6\times10^{-3}\ \mathrm{Ha} \qquad (6)

where: EestE_{\mathrm{est}} — VQE-estimated energy; Ha\mathrm{Ha} — Hartree, the atomic unit of energy; 1.6×10−3 Ha≈1 kcal/mol1.6\times10^{-3}\ \mathrm{Ha}\approx1\ \mathrm{kcal/mol} — the threshold for reliable reaction energetics. Reaching this, given the shot cost of equation (4), is the whole practical challenge.

Derivation AWhy VQE gives a rigorous upper bound on the ground energy

The goal is to prove the inequality that licenses the entire method — that for every setting of the parameters the measured energy is at least E0E_0 — and to pin down when equality holds, so we know why the optimization is safe and what would make it exact. The argument is a consequence of the spectral theorem and uses nothing about the circuit except that it produces a normalized state. Take HH Hermitian on a finite-dimensional Hilbert space.

Step 1. Invoke the spectral theorem to write H=∑kEk ∣Ek⟩⟨Ek∣H=\sum_k E_k\,|E_k\rangle\langle E_k| with a complete orthonormal eigenbasis and real, ordered eigenvalues E0≤E1≤⋯E_0\le E_1\le\cdots. Why: Hermiticity guarantees such a real-spectrum basis exists, letting us compare any state's energy against a well-defined smallest eigenvalue E0E_0.

Step 2. Expand the trial state in that eigenbasis, ∣ψ(θ⃗)⟩=∑kck(θ⃗)∣Ek⟩|\psi(\vec\theta)\rangle=\sum_k c_k(\vec\theta)|E_k\rangle with ∑k∣ck∣2=1\sum_k|c_k|^2=1. Why: normalization survives because the circuit is unitary, so the weights ∣ck∣2|c_k|^2 form a genuine probability distribution over energy levels.

Step 3. Evaluate the expectation and watch the off-diagonal terms die, E(θ⃗)=∑k,lck∗cl⟨Ek∣H∣El⟩=∑k∣ck∣2EkE(\vec\theta)=\sum_{k,l}c_k^* c_l\langle E_k|H|E_l\rangle=\sum_k|c_k|^2 E_k. Why: orthonormality collapses the double sum to a diagonal one — the energy is a weighted average of eigenvalues.

Step 4. Bound the average below by replacing every eigenvalue with the smallest, ∑k∣ck∣2Ek≥E0∑k∣ck∣2=E0\sum_k|c_k|^2 E_k\ge E_0\sum_k|c_k|^2=E_0. Why: a convex combination can never fall below its least element, and the weights sum to one — this line is the Rayleigh–Ritz bound.

Step 5. Read off saturation: equality holds iff all the weight sits on the ground eigenspace, i.e. ∣ψ(θ⃗)⟩|\psi(\vec\theta)\rangle is a ground state. Why: the bound is not merely safe but tight when the ansatz can reach the ground state, so a perfect ansatz returns exactly E0E_0. *As a quick check: for H=Z+XH = Z + X the minimum of E(θ)=cos⁡θ+sin⁡θE(\theta) = \cos\theta + \sin\theta is −2=−1.41421-\sqrt{2} = -1.41421, exactly the lowest eigenvalue of HH — confirming the bound is saturated when the ansatz reaches the ground state.*

Go deeper · Derivation B · 1 minThe exact analytic gradient from the parameter-shift rule
Derivation BThe exact analytic gradient from the parameter-shift rule

The aim is to show that for standard rotation gates the energy is, in any single parameter, a pure sinusoid — and that a sinusoid's derivative is captured with no error by two evaluations shifted a quarter period apart, so gradients come exactly from the same hardware as the energy. Consider a circuit in which θ\theta enters only through U(θ)=e−iθG/2U(\theta)=e^{-i\theta G/2} whose generator obeys G2=IG^2=I, as every Pauli-rotation gate does.

Step 1. Expand the gate using G2=IG^2=I to get U(θ)=cos⁡(θ/2) I−isin⁡(θ/2) GU(\theta)=\cos(\theta/2)\,I-i\sin(\theta/2)\,G. Why: the involution G2=IG^2=I truncates the exponential into a closed cosine–sine form, the seed of all the sinusoidal structure to come.

Step 2. Absorb the rest of the circuit and HH into an effective observable H′H', so θ\theta lives only in H~(θ)=U†(θ) H′ U(θ)\tilde H(\theta)=U^\dagger(\theta)\,H'\,U(\theta). Why: only the block carrying θ\theta matters for the θ\theta-derivative, keeping the algebra to a single gate.

Step 3. Multiply out the conjugation; products of cos⁡(θ/2),sin⁡(θ/2)\cos(\theta/2),\sin(\theta/2) collapse via double-angle identities to E(θ)=Acos⁡θ+Bsin⁡θ+CE(\theta)=A\cos\theta+B\sin\theta+C. Why: the key structural fact — the energy is a single harmonic of period 2π2\pi, its whole shape fixed by three numbers.

Step 4. Differentiate directly, ∂θE=−Asin⁡θ+Bcos⁡θ\partial_\theta E=-A\sin\theta+B\cos\theta, and evaluate the shifted energies E(θ±π2)=∓Asin⁡θ±Bcos⁡θ+CE(\theta\pm\tfrac\pi2)=\mp A\sin\theta\pm B\cos\theta+C. Why: a quarter-period shift swaps sine and cosine with sign changes — the combination that isolates the derivative.

Step 5. Subtract and halve: 12[E(θ+π2)−E(θ−π2)]=−Asin⁡θ+Bcos⁡θ=∂θE\tfrac12[E(\theta+\tfrac\pi2)-E(\theta-\tfrac\pi2)]=-A\sin\theta+B\cos\theta=\partial_\theta E, with no truncation. Why: CC cancels and the harmonic pieces reconstruct the exact derivative, so two ordinary runs yield an exact gradient. *As a concrete check: for E(θ)=cos⁡θ+sin⁡θE(\theta) = \cos\theta + \sin\theta at θ=π/2\theta = \pi/2, the parameter-shift formula gives 12[E(π)−E(0)]=12[(−1)−(1)]=−1\tfrac{1}{2}[E(\pi) - E(0)] = \tfrac{1}{2}[(-1)-(1)] = -1, equal to the analytic derivative −sin⁡θ+cos⁡θ-\sin\theta + \cos\theta evaluated there — confirming the rule is exact.*

Go deeper · Derivation C · 1 minVariance-optimal shot allocation across Pauli terms
Derivation CVariance-optimal shot allocation across Pauli terms

This derivation answers a resource question that decides feasibility: given a fixed number of measurements, how should they be split among the Pauli terms to minimize the energy variance — and what irreducible variance remains. The answer explains why many-term Hamiltonians are so expensive and motivates every grouping technique. Minimize Var[E^]=∑aca2σa2/Na\mathrm{Var}[\hat E]=\sum_a c_a^2\sigma_a^2/N_a subject to ∑aNa=Ntot\sum_a N_a=N_{\mathrm{tot}}, with single-shot standard deviation σa=1−⟨Pa⟩2\sigma_a=\sqrt{1-\langle P_a\rangle^2}.

Step 1. Form the Lagrangian L=∑aca2σa2/Na+λ(∑aNa−Ntot)\mathcal L=\sum_a c_a^2\sigma_a^2/N_a+\lambda\big(\sum_a N_a-N_{\mathrm{tot}}\big), treating the NaN_a as continuous. Why: the multiplier λ\lambda enforces the fixed budget while letting each NaN_a vary — the standard way to trade shots.

Step 2. Set each partial derivative to zero, ∂L/∂Na=−ca2σa2/Na2+λ=0\partial\mathcal L/\partial N_a=-c_a^2\sigma_a^2/N_a^2+\lambda=0. Why: at the optimum, moving a shot between terms cannot lower the variance — the stationarity condition.

Step 3. Solve for the shot count, Na=∣ca∣σa/λN_a=|c_a|\sigma_a/\sqrt\lambda. Why: the allocation scales with coefficient magnitude times standard deviation — noisy, heavily weighted terms deserve more shots.

Step 4. Fix λ\lambda by the budget: λ=(∑b∣cb∣σb)/Ntot\sqrt\lambda=\big(\sum_b|c_b|\sigma_b\big)/N_{\mathrm{tot}}, hence Na⋆=Ntot ∣ca∣σa/∑b∣cb∣σbN_a^\star=N_{\mathrm{tot}}\,|c_a|\sigma_a/\sum_b|c_b|\sigma_b. Why: this closes the solution — the distribution is set by the coefficient–deviation products.

Step 5. Substitute back for the achievable variance Var[E^]=(∑a∣ca∣σa)2/Ntot\mathrm{Var}[\hat E]=\big(\sum_a|c_a|\sigma_a\big)^2/N_{\mathrm{tot}}. Why: minimal variance grows as the square of the weighted ℓ1\ell_1 norm — why many-term Hamiltonians demand enormous shot budgets. *As a concrete check: for H₂ with weighted ℓ1\ell_1 norm ≈1.53 Ha\approx 1.53\ \mathrm{Ha} and σ≤1\sigma \le 1, demanding a 1.6 mHa1.6\ \mathrm{mHa} standard error gives N≈(1.53/1.6×10−3)2≈9×105N \approx (1.53/1.6\times10^{-3})^2 \approx 9\times10^5 shots per energy evaluation.*

Limiting cases

VQE changes character sharply across regimes; the table names the four that dominate practice.

CaseResultMeaning
Exact ansatzmin⁡θ⃗E(θ⃗)=E0\min_{\vec\theta}E(\vec\theta)=E_0if the trial manifold contains a ground state, VQE can in principle reach E0E_0 exactly, barring noise and optimizer failure
Deep random ansatzVar[∂θE]∼2−n\mathrm{Var}[\partial_{\theta}E]\sim 2^{-n}sufficiently expressive or random circuits suffer barren plateaus: gradient variance decays exponentially in qubit count, killing trainability
Finite shotsϵ∼1Ntot∑a∣ca∣σa\epsilon\sim\dfrac{1}{\sqrt{N_{\mathrm{tot}}}}\sum_a|c_a|\sigma_athe statistical energy error falls only as 1/N1/\sqrt{N}, weighted by Pauli coefficients — chemical accuracy is shot-hungry
Local-minimum trap∇E(θ⃗⋆)=0, E(θ⃗⋆)>E0\nabla E(\vec\theta^\star)=0,\ E(\vec\theta^\star)>E_0non-convex landscapes admit suboptimal stationary points; the returned energy is a valid upper bound but not necessarily near E0E_0

Worked examples

1 · A single-qubit VQE, fully worked

Take H=Z+XH=Z+X and the ansatz ∣ψ(θ)⟩=Ry(θ)∣0⟩=cos⁡(θ/2)∣0⟩+sin⁡(θ/2)∣1⟩|\psi(\theta)\rangle=R_y(\theta)|0\rangle=\cos(\theta/2)|0\rangle+\sin(\theta/2)|1\rangle. Find the cost function, its minimum, and verify the parameter-shift gradient.

Step 1. Compute the two Pauli expectations: ⟨Z⟩=cos⁡2(θ/2)−sin⁡2(θ/2)=cos⁡θ\langle Z\rangle=\cos^2(\theta/2)-\sin^2(\theta/2)=\cos\theta and ⟨X⟩=2sin⁡(θ/2)cos⁡(θ/2)=sin⁡θ\langle X\rangle=2\sin(\theta/2)\cos(\theta/2)=\sin\theta. So the cost is E(θ)=⟨Z⟩+⟨X⟩=cos⁡θ+sin⁡θE(\theta)=\langle Z\rangle+\langle X\rangle=\mathbf{\cos\theta+\sin\theta}, the sinusoid drawn in the first figure.

Step 2. Minimize. Writing E(θ)=2 sin⁡(θ+π/4)E(\theta)=\sqrt2\,\sin(\theta+\pi/4) gives minimum −2-\sqrt2 at θ⋆=5π/4\theta^\star=5\pi/4. The exact eigenvalues of H=Z+XH=Z+X are ±12+12=±2\pm\sqrt{1^2+1^2}=\pm\sqrt2, so E0=−2E_0=-\sqrt2. The ansatz saturates the bound: min⁡θE(θ)=E0=−1.41421\min_\theta E(\theta)=E_0=\mathbf{-1.41421}, because a single RyR_y reaches the ground state.

Step 3. Verify the gradient at θ=π/2\theta=\pi/2. Analytically ∂θE=−sin⁡θ+cos⁡θ=−1\partial_\theta E=-\sin\theta+\cos\theta=-1. By parameter shift, 12[E(π)−E(0)]=12[(−1)−(1)]=−1\tfrac12[E(\pi)-E(0)]=\tfrac12[(-1)-(1)]=\mathbf{-1}. The two agree with no finite-difference error.

Step 4. One gradient-descent step with rate η=0.3\eta=0.3 from θ=π/2≈1.571\theta=\pi/2\approx1.571: θ←θ−η ∂θE=1.571−0.3(−1)=1.871\theta\leftarrow\theta-\eta\,\partial_\theta E=1.571-0.3(-1)=\mathbf{1.871}, moving toward the minimizer 5π/4≈3.9275\pi/4\approx3.927. The classical update walks the parameter downhill toward the ground state.

2 · Hydrogen molecule: Pauli terms and the shot budget

The H₂ electronic Hamiltonian in a minimal (STO-3G) basis, after fermion-to-qubit mapping and tapering near equilibrium (R≈0.74 A˚R\approx0.74\ \text{Å}), reduces to two qubits: H=g0I+g1Z0+g2Z1+g3Z0Z1+g4X0X1+g5Y0Y1H=g_0 I+g_1 Z_0+g_2 Z_1+g_3 Z_0Z_1+g_4 X_0X_1+g_5 Y_0Y_1 with representative coefficients (Ha) g1=0.3435g_1=0.3435, g2=−0.4347g_2=-0.4347, g3=0.5716g_3=0.5716, g4=g5=0.0910g_4=g_5=0.0910. Estimate the shots for one chemical-accuracy energy, and interpret against the known energies.

Step 1. Sum the magnitudes of the non-identity terms — the weighted ℓ1\ell_1 norm that controls measurement cost: ∑∣gi∣=0.3435+0.4347+0.5716+0.0910+0.0910=1.5318 Ha\sum|g_i|=0.3435+0.4347+0.5716+0.0910+0.0910=\mathbf{1.5318\ \mathrm{Ha}}. The identity g0g_0 shifts the energy but carries no variance and needs no shots.

Step 2. Bound the variance by Var[E^]=(∑a∣ca∣σa)2/Ntot\mathrm{Var}[\hat E]=(\sum_a|c_a|\sigma_a)^2/N_{\mathrm{tot}} with σa≤1\sigma_a\le1. Demanding a chemical-accuracy standard error Var=1.6×10−3 Ha\sqrt{\mathrm{Var}}=1.6\times10^{-3}\ \mathrm{Ha} inverts to Ntot≈(1.5318/1.6×10−3)2=(957)2≈9.2×105 shotsN_{\mathrm{tot}}\approx(1.5318/1.6\times10^{-3})^2=(957)^2\approx\mathbf{9.2\times10^{5}\ \text{shots}} — roughly a million measurements for a single energy on this two-qubit problem.

Step 3. Fold in the optimization. A modest ∼100\sim100 iterations, each needing the energy plus parameter-shift gradients (two energies per parameter), multiplies the per-evaluation cost by 10210^2–10310^3, pushing the total toward 10810^{8}–10910^{9} shots. Even H₂ costs hundreds of millions of measurements to solve well — the measurement problem, not the qubit count, is the bottleneck.

Step 4. Interpret against the exact numbers. Hartree–Fock gives EHF=−1.1167 HaE_{\mathrm{HF}}=-1.1167\ \mathrm{Ha} and full configuration interaction EFCI=−1.1373 HaE_{\mathrm{FCI}}=-1.1373\ \mathrm{Ha}, so the correlation energy VQE must capture is only −0.0206 Ha≈−12.9 kcal/mol\mathbf{-0.0206\ \mathrm{Ha}}\approx-12.9\ \mathrm{kcal/mol}. Chemical accuracy is about 8% of that — the fine slice of the answer the apparatus exists to resolve.

Physics of the portrait

VQE is a young algorithm with a long pedigree: its engine the century-old Rayleigh–Ritz method, its birth a 2014 photonic-chip experiment, its architect the chemist who set out to put molecules on quantum computers.

Origins · 1 minAlán Aspuru-Guzik and how this was discovered
AA
Alán Aspuru-Guzik
b. 1976 · quantum computing for chemistry and the invention of VQE

Alán Aspuru-Guzik is a Mexican–Canadian theoretical chemist who did more than anyone to turn quantum chemistry into a target for quantum hardware. Long at Harvard before moving to the University of Toronto, he argued from the mid-2000s that the natural first application of a quantum computer was not code-breaking but computing molecular energies — the problem Feynman gestured at in 1982. With Peruzzo, McClean, and collaborators he introduced the Variational Quantum Eigensolver in 2014, in "A variational eigenvalue solver on a photonic quantum processor," trading the deep circuits of phase estimation for shallow, noise-tolerant ones near-term devices could run. Two years later, with McClean, Romero, and Babbush, he set it on rigorous footing in "The theory of variational hybrid quantum-classical algorithms," naming the hybrid loop this article follows. The mathematical heart is far older: Lord Rayleigh's variational treatment of vibrations in the 1870s and Walther Ritz's 1909 eigenvalue method supply the inequality ⟨H⟩≥E0\langle H\rangle\ge E_0 that makes VQE a safe descent. Aspuru-Guzik's insight was that a quantum circuit is simply a new, exponentially large family of trial states for that old principle — steered by a classical optimizer.

History
1909
— Ritz publishes the variational method for computing eigenvalues, formalizing Rayleigh's principle
2014
— Peruzzo, Aspuru-Guzik, and co-workers demonstrate VQE on a photonic quantum processor
2016
— McClean, Romero, Babbush, and Aspuru-Guzik formalize the theory of variational hybrid algorithms
2017
— Kandala and co-workers run hardware-efficient VQE for small molecules on superconducting qubits
2018
— McClean and co-workers reveal barren plateaus in random parameterized circuits, exposing the trainability wall

Going further

Texts and reviews. Peruzzo, Aspuru-Guzik, et al., "A variational eigenvalue solver on a photonic quantum processor," Nature Communications 5, 4213 (2014) · McClean, Romero, Babbush, Aspuru-Guzik, "The theory of variational hybrid quantum-classical algorithms," New J. Phys. 18, 023023 (2016) · Kandala et al., Nature 549, 242 (2017) · Preskill, "Quantum Computing in the NISQ era and beyond," Quantum 2, 79 (2018) · Cerezo et al., "Variational Quantum Algorithms," Nature Reviews Physics 3, 625 (2021) · Tilly et al., "The Variational Quantum Eigensolver: A review," Physics Reports 986, 1 (2022) · Nielsen and Chuang, Quantum Computation and Quantum Information, 10th anniversary ed. Key numerical anchors: the Rayleigh–Ritz bound is confirmed by H=Z+X⇒E0=−2=−1.41421H=Z+X\Rightarrow E_0=-\sqrt{2}=-1.41421; the parameter-shift rule is confirmed by differentiating Acos⁡θ+Bsin⁡θ+CA\cos\theta+B\sin\theta+C and by 12[E(π)−E(0)]=−1\tfrac{1}{2}[E(\pi)-E(0)]=-1 at θ=π/2\theta=\pi/2; the H₂ shot estimate N≈9×105N\approx9\times10^5 follows from ∑∣gi∣=1.5318 Ha\sum|g_i|=1.5318\ \mathrm{Ha}; chemical accuracy 1.6×10−3 Ha≈1 kcal/mol1.6\times10^{-3}\ \mathrm{Ha}\approx1\ \mathrm{kcal/mol} uses 1 Ha=627.5 kcal/mol1\ \mathrm{Ha}=627.5\ \mathrm{kcal/mol}; the energies EHF=−1.1167E_{\mathrm{HF}}=-1.1167, EFCI=−1.1373 HaE_{\mathrm{FCI}}=-1.1373\ \mathrm{Ha} are standard STO-3G values; barren-plateau gradient variance scales as ∼2−n\sim2^{-n}.

Prerequisites. Parameterized Quantum Circuits and Ansatz Design · Cost-Function and Measurement Estimation in Variational Algorithms. Leads to. Quantum Approximate Optimization Algorithm · Barren Plateaus in Variational Landscapes · Classical Optimizers for Variational Quantum Algorithms.

Ask the tutor: Ask me to walk the single-qubit VQE through a full optimization run, to convert a molecule's Pauli decomposition into a shot budget, or to contrast VQE with QAOA and quantum phase estimation.

Why use VQE instead of quantum phase estimation, which gives the exact eigenvalue?

Because phase estimation demands what near-term hardware cannot deliver: long, coherent circuits — controlled time evolutions repeated to high precision — that need error-corrected qubits to survive. VQE trades that guaranteed answer for shallow circuits a noisy device can run: each energy is one short state preparation plus measurements, and the search moves to a classical optimizer. The cost is that VQE gives a variational upper bound whose quality depends on the ansatz, not a provably exact eigenvalue. When fault-tolerant machines arrive, phase estimation may displace VQE for chemistry; until then, VQE fits the hardware.

What exactly makes a good ansatz, and why can't I just use a very flexible one?

A good ansatz is expressive enough to contain (or nearly contain) the ground state, yet structured enough to keep the landscape trainable — and those demands pull in opposite directions. A flexible, deep, or random circuit can represent almost any state, but its landscape tends to flatten into a barren plateau where gradient variance shrinks like 2−n2^{-n}, leaving no downhill direction. A rigid, physics-informed ansatz — unitary coupled cluster for molecules, a symmetry-preserving circuit for a lattice model — trains readily because it respects the problem's structure, but may not reach the true ground state. The art of VQE is choosing an ansatz just expressive enough for the target while staying on the trainable side of that trade-off.

Why does reaching chemical accuracy cost so many measurements?

Because energies are estimated from finite random samples, and statistics is unforgiving. Each Pauli term is sampled as ±1 outcomes whose standard error falls only as 1/N1/\sqrt{N}, so a tenfold better estimate costs a hundredfold more shots. Worse, a molecular Hamiltonian has many terms and the total variance scales with the square of their weighted ℓ1\ell_1 norm (Derivation 3). For even two-qubit H₂ that norm is about 1.53 Ha1.53\ \mathrm{Ha}, so the 1.6 mHa1.6\ \mathrm{mHa} target needs roughly 10610^6 shots for one energy, which optimization multiplies by orders of magnitude. Grouping and classical shadows cut the constant, but the 1/N1/\sqrt{N} scaling is fundamental.

Is a low measured energy proof that VQE found the ground state?

No, and treating it as proof is the field's most common mistake. The variational principle guarantees only that your energy is an upper bound on E0E_0; it says nothing about how far above. Three things can strand you: an ansatz that cannot represent anything near the ground state; an optimizer stuck in a local minimum or barren plateau; and shot noise, an error bar on every number. A defensible result quotes the statistical uncertainty, argues the ansatz is expressive enough, and shows the optimizer converged. Without those, a small energy is just a small number.

How is VQE related to QAOA and to quantum machine learning?

They are the same skeleton in different clothes. VQE is the prototypical variational quantum algorithm: parameterized state, measured cost, classical update. QAOA is that loop with an alternating-operator ansatz and a cost Hamiltonian encoding a combinatorial problem like MaxCut, so its "ground state" is an optimal bitstring rather than a molecular energy. Variational quantum machine learning replaces the Hamiltonian with a loss over data-encoded feature maps, making the circuit a trainable model. All three inherit VQE's virtues (shallow, noise-tolerant, hybrid) and its curses (barren plateaus, measurement cost, no convergence guarantee) — so understanding VQE unlocks them all.

What role do symmetries play in a VQE calculation?

A large and underused one. Physical Hamiltonians conserve quantities — particle number, total spin, spatial symmetries — and the true ground state lives in a specific symmetry sector. An ansatz respecting those symmetries confines the search to that sector, doing three things at once: it shrinks the parameter space, keeps the optimizer off unphysical states, and can soften barren plateaus by breaking the circuit's randomness. Symmetries also let you taper qubits away — the trick that reduces H₂ to two qubits above. Exploiting symmetry is among the most reliable ways to make a VQE both more accurate and more trainable.

Before this

Where this leads