Home · ASPLOS 2023 · Quantum Computing

CAFQA: A Classical Simulation Bootstrap for Variational Quantum Algorithms

Gokul Subramanian Ravi, Pranav Gokhale, Yi Ding, William M. Kirby, Kaitlin N. Smith, Jonathan M. Baker and 4 others

Conference
ASPLOS 2023
Published
2022
Pages
15-29
Citations
42

Variational quantum algorithms live or die by their starting parameters — noisy devices waste every iteration and flat gradients strand bad starts — yet the standard Hartree-Fock start is an entanglement-free bitstring; CAFQA snaps the ansatz's rotation angles to multiples of π/2 so the whole circuit becomes Clifford (exactly simulable on a classical computer), then Bayesian-optimizes over that discrete space to find an ENTANGLED stabilizer initialization that recovers up to 99.99% of the correlation energy Hartree-Fock loses and makes real-device convergence 2.5× faster.

The argument in one glance

  1. Problem

    The flagship NISQ algorithm misses its target by 100×

    Variational quantum algorithms are the workload today's noisy quantum machines are supposed to be good at: a parameterized circuit (the ansatz) prepares a trial state, the device measures an energy, and a classical optimizer nudges the parameters — repeat until the energy bottoms out. For molecular chemistry (VQE), the answer only matters if it lands within "chemical accuracy," 0.0016 Hartree. A published BeH₂ run on IBM hardware missed by more than 0.1 Hartree — roughly 100× too coarse — despite error mitigation. Noise corrupts every evaluation, and every iteration on a quantum cloud costs real money.

  2. What people did

    Start smart: initialize the ansatz classically

    Since the device is the scarce, noisy resource, the community's answer is to hand it the best possible starting point. The standard is Hartree-Fock: a classical quantum-chemistry approximation that treats each electron as moving independently, yielding a simple bitstring state (each qubit 0 or 1) that is cheap to compute and decent near a molecule's equilibrium geometry.

  3. Why it fell short

    Hartree-Fock cannot hold the answer's most important part

    A bitstring has zero entanglement — and the quantity VQE is deployed to capture, the electron correlation energy, lives precisely in the entangled part of the state. Hartree-Fock's accuracy decays badly as bonds stretch away from equilibrium; starting from it leaves the noisy quantum device all the hard ground to cover, across a rugged optimization surface plagued by barren plateaus — regions where gradients vanish exponentially, made worse by noise and by poor initialization. Simulating the full quantum ansatz classically to find a better start is a non-starter: that costs exponential time, which is the whole reason quantum computers exist.

  4. This paper's idea

    Search the one island of quantum space classical computers own

    Clifford-only circuits are the exception to exponential simulation cost: by the Gottesman-Knill theorem they simulate EXACTLY in polynomial time. CAFQA snaps every tunable rotation angle in a hardware-efficient ansatz to a multiple of π/2 — making the whole circuit Clifford — and searches this discrete space (4 choices per parameter) with Bayesian optimization, evaluating each candidate noise-free on a classical machine. Because the Hartree-Fock bitstring is itself a Clifford state, CAFQA's best find can never be worse — and it usually finds an ENTANGLED stabilizer state: ~99% mean accuracy, up to 99.99% of the lost correlation energy recovered, 6.4×/56.8× mean/max error reduction over Hartree-Fock, and 2.5× faster on-device convergence.

Why this problem is worth solving

The

VQE — the leading near-term quantum algorithm: a parameterized quantum circuit prepares a trial state, the device estimates the energy of a target Hamiltonian in that state, and a classical optimizer adjusts the circuit’s parameters to push the energy down; the minimum found is an upper bound on the true ground-state energy
is quantum computing’s most credible near-term application. Molecular ground-state energies determine reaction rates and material properties, and classical chemistry methods stumble exactly where electrons interact strongly — computing those correlations exactly scales exponentially. The problem is delivered to the algorithm as a Hamiltonian: a weighted sum of
tensor products of the Pauli operators X, Y, Z, and identity across the qubits (e.g., 0.1·XYXY + 0.5·IZZI) — each term’s expectation value is measured separately and the weighted sum gives the energy
.

But the NISQ reality is brutal arithmetic. Useful chemistry needs 0.0016-Hartree accuracy; hardware delivers errors a hundred times larger. The optimizer must navigate a noise-corrupted landscape where

regions of the parameter space where gradients vanish exponentially with system size, leaving the optimizer no signal to follow — provably worsened by hardware noise and by random or poorly-chosen initialization
can strand it entirely. And each of the thousands of tuning iterations runs on billed cloud hardware — prior work tallies thousands of dollars for modestly sized problems. Everything therefore hinges on where the quantum search starts: a good initialization means fewer noisy iterations, less plateau exposure, and a final answer closer to truth. The initialization is computed classically — so the question becomes: how much of the quantum answer can classical computing find in advance? CAFQA’s reply: far more than anyone was taking.

What people did before, and where it broke

The state of the art,

the workhorse classical approximation of quantum chemistry: each electron is treated as moving independently in the averaged field of the others. It converges quickly and is decent near equilibrium geometries — but by construction it ignores electron correlation, and it hands the quantum circuit a plain bitstring (a computational basis state with no entanglement)
, has three structural problems as a VQA initializer:

  • It cannot represent the interesting part. Correlation energy — the very thing VQE is deployed to capture — requires entanglement, and a basis state has none. In Pauli-term language: a bitstring gives nonzero expectation values only on diagonal terms (products of I and Z); every off-diagonal term contributes exactly zero. The initialization is blind to the part of the Hamiltonian where the quantum advantage lives.
  • It decays away from equilibrium. Stretched bonds and strongly correlated systems (the paper’s H₆ is a standard hard case) are exactly where Hartree-Fock’s independent-electron assumption fails — and where its initializations leave the noisy device the most ground to cover.
  • The obvious upgrade is exponentially expensive. Finding better starts by classically simulating the actual ansatz hits the wall that motivates quantum computing in the first place: general quantum simulation caps out below ~100 qubits even on supercomputers.

Other initialization proposals exist (avoiding 2-designs, perturbative expansions around Hartree-Fock, learned initializers like FLIP), but none exploited the one large, structured region of quantum state space where classical simulation is exact and cheap.

How CAFQA works

CAFQA's pipeline: classical search, then quantum refinement

  1. Start from a hardware-efficient ansatz

    The same low-depth circuit NISQ practitioners already use (Qiskit's SU2: layers of single-qubit rotations plus a ladder of CX entangling gates). Key observation: its FIXED gates (the CXs) are already Clifford — only the tunable rotation angles roam the continuum.

  2. Discretize the knobs to the Clifford points new

    Restrict every tunable rotation angle to {0, π/2, π, 3π/2} — the four angles at which a rotation gate IS a Clifford gate. The search space becomes discrete: 4 options per parameter, and every candidate circuit is Clifford end to end.

  3. Simulate exactly, classically, noise-free new

    By the Gottesman-Knill theorem, Clifford circuits simulate in polynomial time. Better: each Pauli term's expectation in a stabilizer state is exactly +1, −1, or 0 — computable in ONE simulation pass, no statistical sampling, no shot noise, no device noise. Evaluations are ideal in a way no quantum execution can be.

  4. Search with Bayesian optimization new

    The discrete space is 4^p — far smaller than the continuum but still exponential. CAFQA uses Bayesian optimization (via HyperMapper) with a random-forest surrogate — a good fit for discrete parameters — and a greedy acquisition function, sampling the candidates predicted most promising. Chemistry constraints (electron count, spin) are enforced in the objective function. Convergence takes hundreds to ~30,000 evaluations: minutes for H₂, a week for the 34-qubit chromium dimer.

  5. Hand off to the quantum device

    The best Clifford parameter vector becomes the VQA's initial parameters. From there, standard variational tuning explores the FULL continuous space on the quantum device — now starting from a high-accuracy, possibly-entangled state instead of a bitstring, converging 2.5× faster with less exposure to noise-induced barren plateaus.

  6. Optional: spend a few T gates new

    Classical simulability extends to Clifford circuits plus a small number of T gates (45° phase shifts), at cost exponential in the T count. Preliminary results: allowing up to 1 T gate (H₂) or 4 (LiH) recovers up to 99.9% of correlation energy at bond lengths where Clifford-only CAFQA struggles — still classically simulable.

From the University of Chicago, Super.tech, MIT, Tufts, and Duke (ASPLOS 2023). Built on Qiskit + PySCF for Hamiltonians, Psi4 for Hartree-Fock baselines, HyperMapper for the search; runs on ordinary cloud CPUs.

The idea

The Clifford space is a classically ownable island — and the old baseline lives inside it. The

any circuit built from Clifford gates (H, S, CX and their compositions), measuring Pauli operators, even with classical feedback, can be perfectly simulated in polynomial time on a classical computer — the celebrated carve-out in quantum computing’s exponential-cost story. The states such circuits produce are called stabilizer states; they can be highly entangled, yet remain classically tractable
is usually cited as a curiosity — “these circuits aren’t universal, so they don’t give speedups.” CAFQA reads it as an asset inventory: here is an exponentially large, structured family of quantum states (entanglement included!) that a classical computer can evaluate exactly. Two facts turn that into an initializer. First, containment: a computational basis state is a stabilizer state, so Hartree-Fock is one point inside CAFQA’s search space — the search result can never be worse, only better. Second, expressiveness: unlike a bitstring, a stabilizer state can put ±1 expectation values on off-diagonal Pauli terms — visibly capturing chunks of the correlation energy Hartree-Fock structurally zeroes out. The LiH worked example shows exactly this: CAFQA’s state lights up multiple off-diagonal terms, closely tracking the exact solution’s signature.

Discreteness is a feature. Snapping angles to multiples of π/2 seems like a crude quantization, but it converts an intractable continuous search into a discrete one with exactly four choices per knob — the shape

a sample-efficient search strategy: a surrogate model (here a random forest, which handles discrete inputs naturally) learns the parameter-to-energy mapping from evaluations so far, and an acquisition function picks the next most informative candidate — spending its evaluation budget where it expects the most progress
handles well. And each evaluation is unusually clean: because stabilizer-state expectations are exactly ±1 or 0, one simulation per candidate suffices — no shots, no variance, no noise floor. The search optimizes against ideal values, something no on-device tuning loop can ever do.

Split the work by comparative advantage. The end state is a clean division of labor: classical computing exhaustively mines the region it can evaluate perfectly (Clifford space, plus a few T gates at exponential-but-bounded extra cost), and the quantum device spends its noisy, expensive iterations only on what classical computing provably cannot reach — the non-Clifford remainder. On today’s machines that remainder is often small: noisy on-device refinement of LiH landed on par with CAFQA’s own initialization, meaning the classical bootstrap already captured essentially everything the hardware could add.

One molecule through CAFQA

LiH ground-state energy, from Hamiltonian to initialized VQA

Hamiltonian = weighted sum of Pauli terms encoding the molecule (STO-3G basis, parity mapping). Ansatz = hardware-efficient SU2 circuit, one entangling layer. BO = Bayesian optimization. Stabilizer state = output of a Clifford-only circuit. Chemical accuracy = 0.0016 Hartree. Numbers from the paper's LiH evaluations.

Step 1 of 6

The problem arrives as a Pauli-term Hamiltonian

PySCF turns the LiH molecular specification at a chosen bond length into a qubit Hamiltonian — a weighted sum of Pauli strings. VQE's job: find circuit parameters whose prepared state minimizes the expectation of this sum. The baseline initializer, Hartree-Fock (via Psi4), supplies a bitstring that only "sees" the diagonal terms.

target: within 0.0016 Hartree of exact
HF blind spot: every off-diagonal Pauli term reads 0

Why it works

  • Clifford circuits simulate classically in polynomial time (Gottesman-Knill), and stabilizer-state Pauli expectations are exactly ±1/0 → every candidate initialization is evaluated perfectly, noise-free, in one pass → the search optimizes true values while on-device tuning fights shot noise and decoherence.
  • The Hartree-Fock bitstring is itself a stabilizer state → CAFQA’s search space strictly contains the state of the art → the result is equal-or-better by construction, with measured gains of 6.4× (mean) and 56.8× (max, geomean) error reduction.
  • Stabilizer states can be entangled → off-diagonal Pauli terms — invisible to any bitstring — acquire nonzero expectations → correlation energy, the quantity VQE exists to capture, is partly recovered before any quantum hardware runs (up to 99.99%).
  • Four discrete choices per knob → the space suits a random-forest surrogate and sample-efficient Bayesian search → hundreds to tens of thousands of cheap classical evaluations replace equally many expensive, noisy quantum iterations.
  • A high-accuracy start sits closer to the optimum and away from flat regions → fewer iterations, less noise exposure, reduced barren-plateau risk → 2.5× faster convergence and proportionally lower quantum-cloud bills.

What it costs

  • Classical search time. Minutes for H₂ but a full week for the 34-qubit Cr₂ — and the 4^p space grows exponentially, so Bayesian optimization’s sample efficiency, not the simulator, is the scaling frontier the authors flag for future work.
  • The Clifford island has shores. Strongly correlated systems need states outside the stabilizer family: on H₆, Clifford-only CAFQA recovers only up to ~50% of correlation energy. The T-gate extension helps (99.9% in preliminary results) but its simulation cost grows exponentially with each T gate added.
  • Tied (so far) to hardware-efficient ansatz structure. The trick requires the fixed gates to be Clifford; gold-standard chemistry ansatze like UCCSD aren’t directly compatible — extensions are future work.
  • Problem-setup sensitivity. The quality of the result depends on Hamiltonian construction choices (spin sector, orbital freezing for Cr₂); the H₆ “opt.” variant shows that optimizing over multiple Hamiltonians buys accuracy at more compute.
  • Initialization, not a full solution. For molecules beyond exact classical reach, CAFQA’s output is a starting point whose final accuracy still depends on the quantum refinement NISQ machines can’t yet deliver.

The evaluation

Nine molecules up to 18 qubits — H₂, LiH, H₂O, H₆, N₂, NaH, H₂-S1, BeH₂ — evaluated across full dissociation curves (bond lengths from compressed to far-stretched), plus the 34-qubit chromium dimer (Cr₂), a longstanding benchmark for variational quantum advantage, with 18 of 36 orbitals frozen. Comparisons are against exact diagonalization (where tractable) and Hartree-Fock. Across the eight fully-evaluated molecules, CAFQA reduces estimation error versus Hartree-Fock by 6.4× on average over all bond lengths (per-molecule averages from 1.7× on hard H₆ to 25× on H₂O) and by 56.8× at the most-stretched geometries, with a maximum single-point gain of 3.4×10⁵×. On Cr₂, where exact answers are unavailable, CAFQA beats Hartree-Fock at every bond length after a week-long search.

Initializing a VQE run: Hartree-Fock vs CAFQA vs CAFQA+T

PropertyHartree-Fock (state of the art)CAFQA (Clifford search)CAFQA + up to k T gates (preliminary)
What states it can reach
Accuracy vs exact (dissociation curves)
Error reduction vs Hartree-FockBaseline (1×)
Classical costSeconds — a standard chemistry calculation (Psi4)Same search, with exponentially costlier simulation per T gate
Effect on the quantum stageEven less left for the device to do
Molecules in STO-3G basis, parity mapping, Z2 two-qubit reduction; hardware-efficient SU2 ansatz with one linear-entanglement layer. Exact baselines from noise-free diagonalization (small systems only); Hartree-Fock via Psi4; CAFQA via Qiskit stabilizer simulation + HyperMapper Bayesian optimization on Google Cloud CPUs. Convergence experiment: LiH at 4.8 Å on ideal and noise-modeled IBM device simulations. Cr₂: 18 of 36 orbitals frozen (34 qubits), one week of search, compared against Hartree-Fock only.Underlined values explain themselves when clicked.

Check yourself

Check your understanding

  1. 1. CAFQA claims its initialization is NEVER worse than Hartree-Fock — before running a single experiment. Predict where that guarantee comes from.

  2. 2. Restricting rotation angles to {0, π/2, π, 3π/2} throws away almost the entire parameter space. What TWO things does this quantization buy that make it a good trade?

  3. 3. Why does a better INITIALIZATION translate into a 2.5× faster and more accurate quantum stage, rather than just a head start of a few iterations?

  4. 4. For the strongly-correlated H₆ molecule, Clifford-only CAFQA recovers only ~50% of the correlation energy. What does the paper's T-gate extension do about this, and what is its fundamental constraint?

Sources

Related papers on Quantum Computing

See all 51 →