Hybrid Quantum-Classical Computing
Quantum computers today are noisy and shallow: circuits cannot be too deep before errors accumulate. The Variational Quantum Eigensolver (VQE) was designed precisely for this constraint — it keeps the quantum part short and offloads the heavy lifting to a classical optimizer. The result is a loop in which a quantum device and a classical computer take turns, each doing what it does best.
Why a hybrid approach?
A fault-tolerant quantum computer could run phase estimation to find molecular ground-state energies in polynomial time. But that algorithm requires many ancilla qubits and deep circuits — well beyond what current hardware can sustain. The hybrid idea, due to Peruzzo et al. (2014), is to observe that for any trial quantum state the variational principle guarantees
where is the Hamiltonian and is its lowest eigenvalue (the ground-state energy). Equality holds only when is the ground state. Therefore, if we can make depend on tunable angles and then minimize the expectation value, we drive the quantum state toward the ground state without ever running a deep algorithm.
The variational loop
The VQE workflow has four steps that repeat until convergence:
- Prepare a parameterized quantum state by running an ansatz circuit whose gate angles are the vector .
- Measure the expectation value by sampling from the quantum device and computing a weighted sum of Pauli-string measurements.
- Send to a classical optimizer (gradient descent, COBYLA, SPSA, etc.).
- Update according to the optimizer's prescription, then go back to step 1.
The loop terminates when stops decreasing (within a tolerance) or when a maximum number of iterations is reached. The final value approximates .
┌──────────────────────────────────────────────────────────┐
│ VARIATIONAL LOOP │
│ │
│ θ ──► [Quantum device: prepare |ψ(θ)⟩, measure E] │
│ │ │
│ │ E(θ) │
│ ▼ │
│ [Classical optimizer: update θ] │
│ │ │
│ │ new θ │
│ └──────────────────────────────────────────►│
└──────────────────────────────────────────────────────────┘
The ansatz: hardware-efficient vs. chemically motivated
The choice of ansatz determines what states the optimizer can reach. Two common families are:
- Hardware-efficient ansatz (HEA): layers of single-qubit rotations and interleaved with fixed entangling gates ( or ). Easy to implement on any device but may converge to local minima far from the true ground state.
- Unitary Coupled Cluster (UCC): motivated by quantum chemistry; the ansatz mirrors the fermionic structure of molecules. Deeper and more expressive, but better suited to chemistry problems.
For a one-dimensional problem with a single rotation angle , the ansatz circuit and energy landscape look like this: the quantum device sweeps out the curve as varies from to , and the optimizer hunts for the bottom of that curve.
Measuring the Hamiltonian
A qubit Hamiltonian is decomposed into a sum of Pauli strings:
For a two-qubit molecule like in a minimal basis, a typical decomposition has four to eight terms. Each term is measured in the matching Pauli basis (changing to the or basis requires a single-qubit rotation before measurement), and the results are combined classically to give . This decomposition is exact — no approximation is introduced by the measurement strategy itself.
Convergence and barren plateaus
Classical optimizers rely on gradients. For quantum circuits the parameter-shift rule provides an exact gradient:
Each partial derivative requires two additional circuit evaluations. With parameters, a full gradient costs circuits per step.
A well-known challenge for deep or wide ansatze is barren plateaus: the gradient magnitude decreases exponentially with the number of qubits, making optimization effectively impossible. Designing ansatze that avoid barren plateaus is an active research area.
The role of noise
On real hardware, each gate introduces a small error. Shallow ansatze — few layers, few two-qubit gates — accumulate less noise, which is why the hybrid approach remains attractive even as hardware improves. Error mitigation techniques (zero-noise extrapolation, probabilistic error cancellation) can sharpen the estimate of without requiring full error correction.
In the lessons that follow you will implement an ansatz circuit, decompose a simple Hamiltonian into Pauli strings, evaluate the expectation value by simulation, and plug everything into an optimizer to watch the variational loop converge.
Sign in on the full site to ask questions and join the discussion.