MethodLayer 1
Variational quantum eigensolver
Prepare a parameterised trial state on the quantum computer, measure the Hamiltonian's expectation value in it, and let a classical optimiser move the parameters. The quantum computer never runs a long coherent evolution; it runs a short one many times, and the loop closes through a classical number.
A Hermitian reachable as a sum of terms, as sparse-access oracles or as a block-encoding; a way to prepare trial states, and — for the methods that need it — a trial state whose overlap with the ground state is not negligible; a target additive error and a confidence .
A scalar estimate of the lowest eigenvalue with a stated additive-error guarantee, plus the run or query budget it consumed. Whether that estimate is also a rigorous upper bound is a property of the method and is not promised by the slot.
Same contract as the slot it fills.
This one, drawn
From Hamiltonian whose ground state is wanted to Number with an error bar
A circle is an object you are holding. This method is drawn heavier, opened into its own steps; the other lines between the same two ends are the alternatives recorded for the same slot. Circles are named on hover, and each one is a link.
4 lines here have ways through that this figure does not open. The map opens them in place. See it on the map
What it fills
- Estimate a Hamiltonian's ground-state energy
Given a Hamiltonian you can query and some way of preparing trial states, return an estimate of its lowest eigenvalue to a stated additive error. The state achieving that energy may or may not come back with the number; almost every application wants the number.
When it applies
The variational principle gives an upper bound on the ground-state energy for any normalised trial state, so the number returned is never below the true minimum — but nothing bounds how far above it lands. Accuracy is limited instead by whether the ansatz family contains a state close to the ground state and by whether the classical optimiser finds it, and neither is settled by a proof. The Hamiltonian must be reachable as a sum of terms that can be measured separately. Peruzzo et al. state the trade this buys in their own terms: quantum phase estimation "can efficiently find the eigenvalue of a given eigenvector but requires fully coherent evolution", and this approach "greatly reduces the requirements for coherent evolution" — a shorter circuit paid for with more repetitions.
Requires
Every step this method names moves its route along, so there is nothing it needs alongside them.
Example
given a Hamiltonian H on N qubits, written as a sum of M terms polynomial
in N, each a simple (e.g. Pauli-product) operator with its own
efficient measurement prescription (Eq. 1-2, Peruzzo; Eq. 2, McClean)
a parameterized circuit family |psi(theta)> and an initial theta^0
-- from ansatz-construction, a separate record
a classical minimizer with a stopping rule (tolerance, iteration cap,
or exhausted budget) -- from parameter-optimization, a separate record
a target precision epsilon -- see the shot-count comment below for
which quantity epsilon is a precision ON; the two papers differ
requires H decomposes into terms that can be measured SEPARATELY and combined
by linearity -- specific to this construction, not a property of every
observable; contrast quantum phase estimation, which needs O(1/p)
coherent applications of exp(-iHt) and this approach is built to avoid
(Peruzzo, abstract; Eq. 1-2)
|psi(theta)> is normalized for every theta by the unitarity of state
preparation -- assumed throughout, though the paper flags leakage error
out of the computational basis as a case needing separate care (McClean, Sec. II A)
n = 0
loop until the minimizer's stopping rule fires:
# --- quantum side: one call to observable-estimation, per term ------------
prepare |psi(theta^n)> # via the ansatz circuit family
for each term H_alpha in the decomposition of H:
measure repeated, independently-prepared copies of |psi(theta^n)>
in H_alpha's eigenbasis
estimate <H_alpha>(theta^n) to O(h_alpha^2 / epsilon^2) shots
# Peruzzo states this per-term figure in prose, one sentence before
# the M-term aggregate: a tensor product of Pauli operators is
# measurable in constant time and each has bounded spectrum, so a
# term of coefficient h to precision p costs O(|h|^2/p^2)
# repetitions (Peruzzo, main text p.3; restated in the
# Appendix, Computational Complexity)
# CAREFUL: epsilon here is the precision on ONE term. Peruzzo's
# aggregate O(|h_max|^2 M/p^2) is M terms each at precision p, so
# the error on <H> itself is looser by roughly sqrt(M). McClean
# instead allocates epsilon ACROSS terms -- each term is measured
# until Var[H_gamma]({x_i})/n < epsilon^2/M, giving
# n_expect = M * sum_gamma Var[H_gamma]/epsilon^2 for precision
# epsilon in <H> (McClean, Eq. 61-62)
# independent estimators on independently prepared copies have zero
# covariance, so their sampling variances add -- which is what
# licenses summing per-term costs at all (McClean, Eq. 7-8, 60)
# grouping terms by commutation to share shots is a refinement
# McClean lists as a later enhancement, not part of this loop
f(theta^n) = sum_alpha h_alpha * <H_alpha>(theta^n)
# linearity of the expectation value turns M separate small
# measurements into one estimate of <H> (Eq. 1-2, Peruzzo)
# this f(theta^n) is a SAMPLED quantity; nothing below bounds it from
# below on its own -- only the exact expectation is bounded (see return)
# --- classical side: hand off to parameter-optimization, a separate record --
theta^{n+1} = minimizer.step(f(theta^n))
# the reported run used Nelder-Mead: the authors "verified that the
# gradient descent minimization algorithm is not able to converge to
# the ground state of our Hamiltonian under the experimental
# conditions, mainly due to the poissonian nature of our photon
# source and the accidental counts of the detection system" -- a
# statement about THAT apparatus, not a general result about gradient
# descent (Peruzzo, Classical optimization algorithm)
# the minimizer sees only f(theta^n), a finite-sample estimate --
# it never sees the exact <H>(theta^n)
n = n + 1
theta_star = theta^n at the parameters the minimizer stopped at
return theta_star, f(theta_star)
# the eigenvector's "reconstruction" is nothing more than theta_star --
# the same experimental parameters that already define |psi(theta_star)>,
# nothing further is stored (Peruzzo, main text)
# every EXACT expectation obeys <H>(theta) >= lambda_1 for all theta, and the
# bound survives imperfect preparation: Tr[rho(theta) H] >= lambda_1 too
# (Eq. 3 & Eq. 6, McClean)
# that bound is on the exact expectation, not on f(theta_star) -- the sampled
# value the loop actually returns carries its own statistical error on top
# stopping is not converging: parameter-optimization returns a routine
# "whether or not the search found a minimum" (its own contract, not proved
# here), and neither paper bounds how many iterations n takes to terminateCost, as the source states it
Both papers price one energy evaluation; neither bounds the loop. Peruzzo et al. write as Pauli terms with largest coefficient ; a term of coefficient to precision costs state preparations and measurements, so a full costs . For a second-quantised molecular Hamiltonian they put at in general, the number of single-particle basis functions, unchanged by Jordan-Wigner. Assuming a parameter count polynomial in the system size, one whole iteration, classical update included, costs , the system size, a small constant set by the state encoding and the minimiser. McClean et al. write the same shape with the variance explicit: under a normal approximation to the estimator's sampling error, precision in takes state preparations, summed over the terms . Neither bounds the iteration count. Peruzzo et al. say only that convergence must still respect that task's QMA-completeness; what McClean et al. report instead is a count of function evaluations, a different quantity: on unitary coupled cluster for in a minimal STO-3G basis, derivative-free optimisers took up to fewer of them than the Nelder-Mead method used here before — a ratio from that instance, which they say needs further testing as the dimension grows.
Implementations
Photonic two-qubit eigensolver for the He-H+ bond dissociation curve
The demonstration Peruzzo et al. built the method around. They pose it against quantum phase estimation, which "can efficiently find the eigenvalue of a given eigenvector but requires fully coherent evolution", and pick a chemistry problem small enough to run on the hardware they had: "determining the bond dissociation curve of the molecule He-H+ in a minimal basis". For that molecule in a minimal STO-3G basis the full configuration interaction Hamiltonian has dimension four, so it fits on a device that can prepare an arbitrary two-qubit pure state, and it is written as a sum of one- and two-qubit Pauli terms, (Eq. 5), one Hamiltonian per nuclear separation .
The loop is split into the paper's two algorithms, and that split is not the one between the two processors. Algorithm 1 spans both. Its first step uses the QPU to compute , and, in the general listing, three- and higher-body terms, on the prepared state for all terms of - for the four-dimensional Hamiltonian of Eq. (5) the one- and two-body terms are all of them. Its second step is classical: the CPU sums those values with their weights to obtain the objective . Algorithm 2 is the enclosing loop, which feeds to the classical minimisation algorithm and lets it determine . The ansatz actually used was not unitary coupled cluster - that is developed in the appendix but never run here: "In Algorithm 2, we experimentally implemented a ground state preparation procedure through a direct variational algorithm on the control parameters of the quantum hardware." The minimiser was the Nelder-Mead simplex method, and the authors report that they checked the alternative on this apparatus: they "verified that the gradient descent minimization algorithm is not able to converge to the ground state of our Hamiltonian under the experimental conditions, mainly due to the poissonian nature of our photon source and the accidental counts of the detection system, while NM converged to the global minimum in most optimization runs". One practical wrinkle is recorded: the state parameters are not the phases written to the chip, "since the chip phases are also used to implement the desired measurement operators ", so the conversion is recomputed on the classical processor at every iteration.
He-H+ in a minimal STO-3G basis. The Hamiltonian coefficients and for each geometry come from a full configuration interaction calculation in the PSI3 computational package. The theoretical curve the experiment is scored against is the numerically exact energy from that same FCI calculation, "of the molecular system in the same basis". The sweep is sized in the appendix: ground states were found for 79 Hamiltonians along the dissociation curve, about 100 points were measured per optimisation run, and the expectation value of a given Hamiltonian "was reconstructed at each point from four two-qubit Pauli measurements".
The processor is a reconfigurable integrated-photonics waveguide chip that "implements several single qubit rotations and one two-qubit entangling gate and can prepare an arbitrary two-qubit pure state", operating across its full configuration space with "mean statistical fidelity F > 99%". Photon pairs from spontaneous parametric down-conversion are injected into the waveguides encoding the state; the state is prepared and measured in the Pauli basis by setting 8 voltage-driven thermal phase shifters and counting events on silicon single-photon detectors. Fig. 3 shows a representative run at a single separation, pm, with the energy and the overlap both converging against the optimisation step . Over the whole curve the minimum was extracted in two steps, not one. First a generalised least-squares procedure fit "a quadratic curve to the experimental data points in the region pm", "using the inverse experimentally measured variances as weights". Then: "Covariances determined by the generalized least squares procedure were used as input to a Monte Carlo sampling procedure to determine the minimum energy and equilibrium bond distance as well as their uncertainties assuming Gaussian random error." That is what produced an equilibrium bond length of pm and a ground-state electronic energy of MJ/mol; the quoted uncertainties "represent standard deviations", the sampling error of the Monte Carlo step itself was pm in the bond distance and MJ/mol in the energy, and the energy "has been corrected for experimental error". "More than 96% of the experimental data are within chemical accuracy with respect to the theoretical values." Both error terms are measured rather than assumed, and they are measured on different things. The systematic term is "a constant and reproducible small shift, KJ/mol, of the expectation value with respect to the theoretical value of the energy". The statistical term was taken on a single term of a single state: the authors "experimentally measured the standard deviation of an expectation value for a particular state using 50 trials" at a total average coincidence rate of ~1500/s, and "The standard deviation was found to be 37KJ/mol, which is comparable with the error observed in the measurement of the ground state energy shown in Fig. 4" - the comparison, not an identity, is what licenses reading it as the run's statistical error. The mean count rate during the experiment was approximately 2000-4000 twofold events per second, and the whole thing took about 158 hours - dominated not by state preparation, which needs "a few milliseconds", but by the cooling: "However 17 seconds are required for cooling the chip, resulting in a duty-cycle of ~ 5%." For resource contrast the authors give one concrete number: QPE on a 4x4 Hamiltonian "would require at least 12 CNOT gates, while our method only requires one".
Derivative-free optimiser benchmark on a simulated UCC eigensolver for H2
Section V of McClean et al. asks what should update the parameters between energy evaluations. Nelder-Mead was the choice in the original eigensolver work "as it has reasonable robustness to small quantities of noise, at least in comparison to methods such as standard gradient descent", but the authors argue better derivative-free options now exist and benchmark three of them against it. The three were picked for "the superior performance of the TOMLAB algorithms in a recent comprehensive benchmark of derivative free optimization techniques" - Rios and Sahinidis, J. Global Optim. 56, 1247 (2013).
The objective is the energy of a unitary coupled cluster wavefunction for in a minimal STO-3G basis. The finite shot budget of a real device is stood in for by synthetic noise: "simulated measurement estimator noise is added to the objective function at a specified variance ", which the authors tie back to shot count by noting that "the cost of a function evaluation to a precision scales roughly as in this case". The optimisation is repeated 20 times at each , and two quantities are recorded against : the final energy error against the known exact solution (Fig. 5) and the number of function evaluations to convergence (Fig. 6). Four minimisers are compared - the Nelder-Mead simplex method, TOMLAB/GLCLUSTER, TOMLAB/LGO and TOMLAB/MULTIMIN.
in a minimal STO-3G basis, and the noise, which is not measured but injected at a chosen variance - so the sampling error being studied is a parameter of the experiment rather than a property of any device. The paper does not say where the molecular integrals for came from.
The three global solvers are commercial rather than released with the paper: TOMLAB/GLCLUSTER, TOMLAB/LGO and TOMLAB/MULTIMIN, from the TOMLAB optimization environment for MATLAB sold by Tomlab Software AB (https://tomopt.com/). For their details the paper points at the vendor manual - "Details of the TOMLAB algorithms can be found in the user's guide", cited as Holmstrom, Goran and Edvall, User's Guide for TOMLAB (2015) - not at a repository.
This is a classical simulation throughout: no quantum device is involved, the measurement noise is added by hand, and the paper names no simulation package for the underlying unitary coupled cluster energy - the only software it names is the TOMLAB solver set. Nelder-Mead appears as an algorithm only: no implementation, package or version is given for it anywhere in the paper. Fig. 5 plots against , averaged over the 20 repetitions with error bars at 1 standard deviation, and its caption reports that the TOMLAB methods "provide dramatically superior performance at essentially all levels of measurement precision above ". Fig. 6 plots of the function evaluations - the number needed to reach convergence, "plotted as a function of the same precision" - and the text states the headline ratio: "in all instances, the TOMLAB methods not only converge to a higher accuracy in the energy, but do sometime as many as 1000 times less function evaluations than the Nelder-Mead method which was previously coupled to the variational hybrid quantum-classical approach." The authors bound their own result twice over. The methods "will require further numerical testing as the dimension of the problem space grows", and "none of these methods were specifically designed for a stochastic objective function". They also read a further saving out of the shape of Fig. 6: because the evaluation count is roughly constant in the precision, a variable-precision optimisation should cost less again.
Variationally optimised adiabatic schedule on a one-qubit model
Section III B of McClean et al. treats adiabatic state preparation as an ansatz for the variational eigensolver - the parameters being the shape of the annealing path rather than a circuit's rotation angles - and tests the idea on "a simple 1-qubit problem first studied in the adiabatic context in the original work of Farhi et al". The initial and problem Hamiltonians are and (Eq. 34-35), interpolated as (Eq. 36). The perturbation sets the size of an avoided crossing that "occurs at ", and the example takes . The point of the test is the constrained regime, and the authors state the constraint in their own terms: a "more realistic situation may be such that is smaller than the required time of evolution dictated by the problem gap, due to technological constraints or simply human time constraints in a hard problem", or one in which "no good estimate of the gap is known, and one must attempt several paths regardless". The schedule then has to be chosen rather than merely slowed - and the authors attach a caution to that, that "the probability of success does not necessarily increase monotonically with evolution time".
Two schedule families are compared. The first is the fixed linear path with . The second has two parameters: "the best cubic B-spline fit of the 4 points , , , ", with and fixed by minimising - the expectation value of the final state of the possibly non-adiabatic evolution, at fixed maximum evolution time. The minimiser is again Nelder-Mead, used "in analogy to how it might be performed on a quantum device". The starting point is the baseline it is measured against: "We use as an initial condition and in the optimization, which corresponds to the linear path."
A classical simulation of a single qubit; there is no device, and no simulation package is named. Fig. 2 draws the optimised schedule against the linear one - it "naturally slows the evolution near the location of the avoided crossing, but is otherwise only slightly distorted from a standard linear path", and the text stresses that this was found "without any prior knowledge of the spectrum, and only measurements at the endpoint as opposed to the entire path". Fig. 3 plots the squared overlap with the target ground state for the linear schedule at , , and against the optimal spline at . Its caption reads: "It can be seen here that the performance of the variational schedule offers similar performance to a linear schedule roughly 10 times as long, indicating an order of magnitude reduction in the quantum evolution time required for the variationally optimal schedule." The main text puts the same finding as the optimal spline achieving "similar results to a linear path with roughly 10 times less evolution time". One property the authors did not optimise for came out of it as well: at the reduced evolution time "the success of the computation is a monotonically increasing function of s, which is not true of the linear schedule in this case".
What it needs
- Choose a parameterised trial state 13 methods
Fix the gate structure of a circuit family and leave its rotation angles open. What comes back is not a circuit but the set of states the later optimisation is allowed to search — which is why this is a slot of its own and not a paragraph in one method's write-up.
- Minimise the objective over the parameters 6 methods
Search the parameters of a fixed circuit family for the ones that minimise a chosen objective, given that every evaluation of that objective is a noisy estimate someone paid shots for. The output is a routine that prepares one particular state — the family collapsed to a member.
- Estimate an observable 4 methodsruns Once per iteration of the classical optimiser, and nothing bounds the iteration count — it is measured on the instance, never proved. Each of those evaluations is itself a pass over the Hamiltonian's terms, every term estimated to additive error by repeated preparation and measurement, so the shot budget multiplies through two nested counts.
Given the ability to prepare and a description of an observable , return a classical scalar within of at confidence . The state is never returned; only the number is.
The loop closes through a measurement: every turn ends in a readout and starts from a fresh preparation. The price is a count of runs, not a depth. The turn ends in a classical number and the next turn starts from a freshly prepared state — no coherence is carried across the loop, which is exactly why the circuit can be short. That is the trade the method exists to make, and it is why VQE's price is quoted as a count of runs rather than as a depth.
Other ways to fill the same slot
Different approaches
- Quantum imaginary-time evolution
Approximate evolution in imaginary time, which damps every excited state faster than the ground state, by a sequence of unitaries determined from measurements on a local domain. There is no variational ansatz and no classical optimiser: the method converges because imaginary time converges.
- Variational imaginary-time evolution
Keep the parameterised trial state, but stop treating the parameters as something to optimise: derive their equation of motion from a variational principle and integrate it in imaginary time. The parameters move because a differential equation says where they go, not because a search tried somewhere and liked the answer.
- Ground-state energy by phase estimation
Prepare a state that already overlaps the ground state, evolve it under the molecular Hamiltonian, and read the energy off the accumulated phase. Nothing is optimized and nothing is varied — the answer is a measured eigenvalue, and the whole difficulty moves into the starting state.
In the Atlas
- Variational quantum eigensolver for ground-state energy
A hybrid chemistry workflow that compares a quantum expectation loop with classical eigensolvers.
- VQE objective and optimization loop
The canonical hybrid loop: prepare an ansatz, estimate a Hamiltonian expectation, and update parameters classically.