Variational Quantum Eigensolver (VQE)

qc/algorithms qc/gates

Among the earliest algorithms designed specifically for noisy quantum computers — the near-term counterpart to QPE’s deep, fault-tolerant-era circuits. Build a parameterized circuit , measure it against the Hamiltonian’s Pauli terms, and let a classical optimizer search for the energy-minimizing .

The loop

1. Prepare |ψ(θ)⟩ on the QPU — a hardware-efficient ansatz:
   layers of Ry/Rz single-qubit rotations + CNOT entangling gates, repeated
2. Measure each Pauli term P_j of H = Σ h_j P_j (see [[SparsePauliOp]])
3. Combine: E(θ) = ⟨ψ(θ)|H|ψ(θ)⟩ = Σ_j h_j ⟨ψ(θ)|P_j|ψ(θ)⟩
4. Classical optimizer proposes new θ to reduce E(θ)
5. Repeat from step 1 with the new θ

Key insight: this is exactly the “structure once, values many times” pattern from Parameterized Circuits — the same ansatz circuit is transpiled once, then rebound with new parameter values every optimization iteration, which is what makes hundreds of iterations practical at all.

Pros and cons

Pros: works with any viable parameterized circuit (no restriction to a specific ansatz family), and classical optimization can partially compensate for coherent quantum errors by simply optimizing around them.

Cons: each energy evaluation needs many shots for adequate precision (see Measurement and Collapse); classical parameter optimization is genuinely hard and slow in practice, with no general convergence guarantee — and any assumption strong enough to guarantee convergence would typically also make the problem classically tractable, defeating the point.

Self-Check

  • Could you walk through VQE’s five-step loop from memory?
  • Why does VQE need a classical optimizer in the loop at all, instead of computing directly?
  • Why is “no general convergence guarantee” not just a minor caveat, but a real practical problem for VQE?