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 , 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.
- VQE estimates the ground-state energy of a Hamiltonian by preparing a parameterized trial state on a quantum processor, measuring , 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 , so the minimization can only approach from above and never undershoot it.
- The Hamiltonian is written as a weighted sum of Pauli strings ; the device estimates each by repeated ±1 measurement, and the classical side recombines them with the coefficients .
- Because expectation values are estimated from finite samples, the energy error falls only as — chemical accuracy on a molecule can cost of order a million shots per energy evaluation.
- Gradients come exactly via the parameter-shift rule, , 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 .
- Key idea: minimizing over a circuit-parameterized state can never go below the true ground-state energy , 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 — 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 ; the true ground energy is its deepest valley floor. A quantum circuit with knobs 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 , 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 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.
The quantum computer does exactly one hard task in this loop: evaluate 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 . 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.
The gap between the two horizontal lines — Hartree–Fock down to the exact answer — is the correlation energy, only about 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 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.
where: — normalized trial state prepared by the parameterized circuit; — vector of classical circuit parameters (rotation angles); — Hermitian Hamiltonian whose ground state is sought; — exact lowest eigenvalue of . 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 . To make that expectation measurable, the Hamiltonian is expanded in the Pauli basis — the operator alphabet of qubits, each string readable directly on hardware.
where: — real coefficient of the -th Pauli string, obtained as ; — tensor product of single-qubit Paulis on qubits; — 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 , the energy is a weighted sum of Pauli averages — the equation that splits the labor: the device supplies each , the classical computer sums them.
where: — expectation of , estimated by rotating each qubit into the eigenbasis of its Pauli factor, sampling bitstrings, and averaging the ±1 eigenvalues. Each 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.
where: — empirical energy estimator; — shots on term ; — single-shot variance of a ±1 outcome. The standard error falls only as — the root of VQE's shot-hunger. Gradients are available exactly, not approximately, through the parameter-shift rule: shift one angle by and difference the two energies.
where: — unit vector shifting only the -th parameter; — an angle entering through with generator . 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.
where: — VQE-estimated energy; — Hartree, the atomic unit of energy; — the threshold for reliable reaction energetics. Reaching this, given the shot cost of equation (4), is the whole practical challenge.
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 — 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 Hermitian on a finite-dimensional Hilbert space.
Step 1. Invoke the spectral theorem to write with a complete orthonormal eigenbasis and real, ordered eigenvalues . Why: Hermiticity guarantees such a real-spectrum basis exists, letting us compare any state's energy against a well-defined smallest eigenvalue .
Step 2. Expand the trial state in that eigenbasis, with . Why: normalization survives because the circuit is unitary, so the weights form a genuine probability distribution over energy levels.
Step 3. Evaluate the expectation and watch the off-diagonal terms die, . 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, . 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. 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 . *As a quick check: for the minimum of is , exactly the lowest eigenvalue of — 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
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 enters only through whose generator obeys , as every Pauli-rotation gate does.
Step 1. Expand the gate using to get . Why: the involution 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 into an effective observable , so lives only in . Why: only the block carrying matters for the -derivative, keeping the algebra to a single gate.
Step 3. Multiply out the conjugation; products of collapse via double-angle identities to . Why: the key structural fact — the energy is a single harmonic of period , its whole shape fixed by three numbers.
Step 4. Differentiate directly, , and evaluate the shifted energies . Why: a quarter-period shift swaps sine and cosine with sign changes — the combination that isolates the derivative.
Step 5. Subtract and halve: , with no truncation. Why: cancels and the harmonic pieces reconstruct the exact derivative, so two ordinary runs yield an exact gradient. *As a concrete check: for at , the parameter-shift formula gives , equal to the analytic derivative evaluated there — confirming the rule is exact.*
Go deeper · Derivation C · 1 minVariance-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 subject to , with single-shot standard deviation .
Step 1. Form the Lagrangian , treating the as continuous. Why: the multiplier enforces the fixed budget while letting each vary — the standard way to trade shots.
Step 2. Set each partial derivative to zero, . Why: at the optimum, moving a shot between terms cannot lower the variance — the stationarity condition.
Step 3. Solve for the shot count, . Why: the allocation scales with coefficient magnitude times standard deviation — noisy, heavily weighted terms deserve more shots.
Step 4. Fix by the budget: , hence . Why: this closes the solution — the distribution is set by the coefficient–deviation products.
Step 5. Substitute back for the achievable variance . Why: minimal variance grows as the square of the weighted norm — why many-term Hamiltonians demand enormous shot budgets. *As a concrete check: for H₂ with weighted norm and , demanding a standard error gives shots per energy evaluation.*
Limiting cases
VQE changes character sharply across regimes; the table names the four that dominate practice.
| Case | Result | Meaning |
|---|---|---|
| Exact ansatz | if the trial manifold contains a ground state, VQE can in principle reach exactly, barring noise and optimizer failure | |
| Deep random ansatz | sufficiently expressive or random circuits suffer barren plateaus: gradient variance decays exponentially in qubit count, killing trainability | |
| Finite shots | the statistical energy error falls only as , weighted by Pauli coefficients — chemical accuracy is shot-hungry | |
| Local-minimum trap | non-convex landscapes admit suboptimal stationary points; the returned energy is a valid upper bound but not necessarily near |
Worked examples
1 · A single-qubit VQE, fully worked
Take and the ansatz . Find the cost function, its minimum, and verify the parameter-shift gradient.
Step 1. Compute the two Pauli expectations: and . So the cost is , the sinusoid drawn in the first figure.
Step 2. Minimize. Writing gives minimum at . The exact eigenvalues of are , so . The ansatz saturates the bound: , because a single reaches the ground state.
Step 3. Verify the gradient at . Analytically . By parameter shift, . The two agree with no finite-difference error.
Step 4. One gradient-descent step with rate from : , moving toward the minimizer . 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 (), reduces to two qubits: with representative coefficients (Ha) , , , . 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 norm that controls measurement cost: . The identity shifts the energy but carries no variance and needs no shots.
Step 2. Bound the variance by with . Demanding a chemical-accuracy standard error inverts to — roughly a million measurements for a single energy on this two-qubit problem.
Step 3. Fold in the optimization. A modest iterations, each needing the energy plus parameter-shift gradients (two energies per parameter), multiplies the per-evaluation cost by –, pushing the total toward – 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 and full configuration interaction , so the correlation energy VQE must capture is only . 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
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 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.
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 ; the parameter-shift rule is confirmed by differentiating and by at ; the H₂ shot estimate follows from ; chemical accuracy uses ; the energies , are standard STO-3G values; barren-plateau gradient variance scales as .
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 , 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 , 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 norm (Derivation 3). For even two-qubit H₂ that norm is about , so the target needs roughly shots for one energy, which optimization multiplies by orders of magnitude. Grouping and classical shadows cut the constant, but the 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 ; 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.