The NISQ Era and Variational Quantum Algorithms
Imagine you have a quantum processor with fifty noisy qubits, no error correction, and a coherence time measured in microseconds. You cannot run Shor's Algorithm on any interesting input. You also cannot afford the millions of physical qubits that The Threshold Theorem demands for fault tolerance. Yet you still want to compute something a classical computer struggles with — the ground-state energy of a molecule, the minimum of a combinatorial cost function, a hard sampling distribution. This is the central engineering problem of the Noisy Intermediate-Scale Quantum (NISQ) era. It motivates an entire family of algorithms built to survive on hardware that fails constantly. The NISQ era, a term coined around 2018, describes a specific window in quantum computing's development. It covers devices with roughly 50 to a few thousand physical qubits. These devices have moderate gate fidelities (99% to 99.9%) and no logical error correction. These machines are too large to simulate classically in general. But they are too noisy and too small to run textbook fault-tolerant algorithms requiring encoded logical qubits. The strategic response has been hybrid quantum-classical algorithms. Most prominent are the Variational Quantum Eigensolver (VQE) and the Quantum Approximate Optimization Algorithm (QAOA). These offload as much work as possible to classical optimizers. The quantum processor is used only for the parts classical computers do badly. Why does this matter for real systems? Chemistry and materials science need ground-state energies of Hamiltonians. Their Hilbert space grows exponentially with system size. This is a problem quantum computers are natively suited to represent. Logistics and scheduling need approximate solutions to NP-hard combinatorial problems. Even a modest quality improvement over classical heuristics has commercial value here. Companies like IBM, Google, IonQ, and Rigetti have built cloud-accessible NISQ devices. These let researchers experiment with hybrid algorithms today. This avoids waiting decades for fault-tolerant hardware. This article builds the conceptual and algorithmic machinery of the NISQ approach from the ground up. We define parameterized quantum circuits and the variational principle. This principle licenses treating quantum states as trainable objects. We walk through VQE and QAOA step by step. Full pseudocode and circuit diagrams are included. We analyze why these algorithms are simultaneously appealing and fragile. They are appealing due to shallow circuits, noise-resilient by design intent. They are fragile due to barren plateaus and non-convex optimization landscapes. Open questions about classical simulability also remain. By the end you will understand how to build one of these algorithms. You will also understand why its success is still an open empirical and theoretical question.
- NISQ devices have tens to thousands of noisy qubits with no error correction, ruling out fault-tolerant algorithms like Shor's.
- Variational quantum algorithms split work: a quantum circuit prepares a trial state, a classical optimizer updates its parameters.
- VQE finds ground-state energies by minimizing the expectation value of a Hamiltonian, licensed by the variational principle.
- QAOA approximates solutions to combinatorial optimization problems by alternating cost and mixer unitaries.
- Both algorithms use shallow circuits deliberately, trading depth for resilience to decoherence and gate error.
- Barren plateaus, measurement shot noise, and unproven advantage over classical methods remain the field's core open problems.
Variational quantum algorithms outsource the hard, error-prone part of a computation to a shallow quantum circuit and the easy, robust part to a classical optimizer, so that noisy hardware only ever needs to survive short computations.
The idea
A parameterized quantum circuit (PQC), also called an ansatz, is a quantum circuit built from a fixed sequence of gates whose rotation angles are free classical parameters. Applying to a fixed initial state (usually ) produces a trial state . This is exactly the object introduced under Parameterized Quantum Circuits: a differentiable, trainable quantum state generator, the quantum analogue of a neural network layer. A variational quantum algorithm wraps a PQC in a classical optimization loop. The quantum computer measures some observable — an energy, a cost function, a probability of success — for the current parameters, and the classical computer uses that measurement to propose better parameters, typically via gradient descent or a gradient-free optimizer. The quantum processor never runs a single long, fragile computation; instead it runs the same shallow circuit thousands of times with slightly different parameters, resampling and re-optimizing. This is the defining strategic choice of the NISQ era: sacrifice the theoretical guarantees of deep fault-tolerant circuits for the practical robustness of shallow, repeatable ones. Two flagship instances make this concrete. The Variational Quantum Eigensolver (VQE) targets the ground-state energy of a Hamiltonian , exploiting the variational principle of quantum mechanics: for any normalized state ,
where is the true ground-state energy, with equality if and only if is a ground state. Minimizing over therefore gives a rigorous upper bound on that tightens as the ansatz improves. The Quantum Approximate Optimization Algorithm (QAOA) targets combinatorial optimization: given a cost function over bit strings , it builds an ansatz from alternating "cost" and "mixer" unitaries, inspired by a Trotterized adiabatic evolution, and searches for parameters that concentrate probability mass on low-cost bit strings.
How it works
Variational Quantum Eigensolver. The Hamiltonian , typically the electronic structure Hamiltonian of a molecule, is first decomposed into a sum of Pauli strings via mappings like Jordan-Wigner or Bravyi-Kitaev:
Each Pauli string's expectation value can be measured directly on hardware by rotating into the eigenbasis of and measuring in the computational basis. The full energy estimate is the weighted sum . ``` ALGORITHM VQE(H, ansatz U(θ), initial_θ, optimizer, shots, tol) Decompose H = Σ_k c_k P_k # Pauli decomposition θ ← initial_θ repeat E ← 0 for each Pauli term P_k with coefficient c_k: prepare |ψ(θ)⟩ = U(θ)|0...0⟩ on the QPU rotate basis to diagonalize P_k measure `shots` times, compute empirical ⟨P_k⟩ E ← E + c_k * ⟨P_k⟩ send E (and, if needed, a gradient estimate) to classical optimizer θ ← optimizer.step(θ, E) until |ΔE| < tol or max_iterations reached return θ, E # E approximates E_0 from above ``` The classical optimizer can be gradient-free (Nelder-Mead, COBYLA, SPSA) or gradient-based. A crucial NISQ-friendly fact is the parameter-shift rule: for many common gates (Pauli rotations ), the exact analytic gradient of an expectation value is
computable using only two extra circuit evaluations on the same hardware, with no need for backpropagation through the quantum device.
Quantum Approximate Optimization Algorithm. Given a classical cost function over -bit strings, encode it as a diagonal Hamiltonian with (built directly from the problem's constraint structure, e.g. edges of a graph for Max-Cut). Define a mixer Hamiltonian, typically . The QAOA ansatz at depth is
alternating layers of "phase-cost" evolution and "mixing" evolution — a Trotterized approximation to adiabatic evolution from the ground state of toward the ground state of . ``` ALGORITHM QAOA(C, p, optimizer, shots, tol) build H_C from cost function C # diagonal in computational basis H_M ← Σ_i X_i # standard transverse-field mixer (γ, β) ← random initial parameters, length p each repeat prepare |+⟩^n for layer l = 1 to p: apply e^{-i γ_l H_C} apply e^{-i β_l H_M} measure in computational basis, `shots` times estimate ⟨C⟩ = Σ_z C(z) · P(observed z) (γ, β) ← optimizer.step(γ, β, ⟨C⟩) until convergence or iteration budget exhausted sample z from final circuit, output best observed z return best z, C(best z) ``` The output is not the expectation value itself but the best bit string sampled from the final distribution — QAOA is fundamentally a sampler tuned to concentrate on good solutions, not an exact solver. ```svg , E(θ) (VQE)
Complexity & correctness
Circuit depth and qubit count. VQE ansätze come in two flavors. Chemically-inspired ansätze like Unitary Coupled Cluster (UCCSD) use gates for qubits (from double excitations), giving circuits too deep for near-term devices at large . Hardware-efficient ansätze instead use two-qubit gates for layers of alternating single- and two-qubit rotations, trading chemical accuracy for shallow depth — a direct concession to limited coherence time. QAOA at depth uses two-qubit gates, where is the number of cost-function terms (e.g., graph edges for Max-Cut), and circuit depth in the best case with parallelizable layers.
Measurement cost. Each expectation value must be estimated from finite samples, and standard concentration bounds show that achieving additive error requires
per Pauli term, by Hoeffding's inequality on bounded -valued measurement outcomes. With Pauli terms in the Hamiltonian, naively this multiplies total shot budget by , though grouping commuting Pauli terms (Qubit-Wise Commuting or Fully Commuting groupings) reduces the number of distinct circuit settings needed. This scaling — inherited from the statistical nature of quantum measurement, not from any algorithmic inefficiency — is a hard floor: no amount of classical post-processing removes it, only smarter measurement grouping and error mitigation reduce the constant.
Classical optimization cost. The number of classical optimizer iterations to converge is problem- and landscape-dependent, with no universal bound; in the worst case the variational landscape has exponentially many local minima. This is the most honest caveat about these algorithms: unlike Grover's or Shor's algorithm, VQE and QAOA carry no proven worst-case runtime guarantee. Their appeal is empirical and heuristic, akin to classical local-search heuristics for NP-hard problems.
Correctness argument for VQE. Correctness rests entirely on the variational principle. Expand in the eigenbasis of :
The inequality uses for all and normalization . Hence every measured energy is a rigorous upper bound on the true ground state, and the algorithm's classical optimizer is simply minimizing this upper bound — the tightest bound achievable is the ansatz's best approximation to . If the ansatz is not expressive enough to represent states close to , VQE converges to a biased answer no matter how well the optimizer performs; this is an expressibility limitation, distinct from an optimization failure.
Correctness argument for QAOA. For with optimal parameters, QAOA provably converges to the adiabatic theorem's exact ground state of (Trotterization error vanishes as grows and step size shrinks). At finite , no general approximation ratio guarantee holds for arbitrary cost functions; specific results exist for special cases (e.g., a approximation ratio for Max-Cut on 3-regular graphs at was proven by Farhi, Goldstone, and Gutmann), but classical algorithms sometimes match or beat these bounds, making the general-purpose quantum advantage of QAOA unproven in the worst case.
Noise tolerance. These algorithms are explicitly designed around the constraints of The Threshold Theorem: since no logical encoding protects the circuit, every added gate directly multiplies decoherence probability. Shallow ansätze keep the product (depth) × (gate error rate) below the point where output is pure noise, but they cannot escape it entirely — this motivates active error mitigation techniques (zero-noise extrapolation, probabilistic error cancellation) that estimate and subtract noise bias in post-processing without full error correction.
Worked example
Consider Max-Cut on a 4-node ring graph with edges , solved via QAOA at depth . The cost Hamiltonian is
maximized (equivalently, minimized) when adjacent bits differ. The optimal cuts are the two alternating strings and , each cutting all 4 edges (cost 4), while any single bit-flip from these drops the cut value.
| Iteration | Sampled distribution (top outcomes) | Estimated | ||
|---|---|---|---|---|
| 0 (init) | 0.10 | 0.10 | roughly uniform over 16 strings | ≈ 2.0 |
| 5 | 0.35 | 0.28 | 0101: 18%, 1010: 17%, others spread | ≈ 2.6 |
| 15 | 0.62 | 0.44 | 0101: 34%, 1010: 33%, rest thin | ≈ 3.3 |
| 30 (converged) | 0.79 | 0.39 | 0101: 41%, 1010: 40%, noise tail 19% | ≈ 3.7 |
Each row corresponds to one full pass of the algorithm: prepare , apply (two-qubit rotations along the four edges), apply (single-qubit rotations), measure 4096 shots, compute the empirical , and hand it to a classical optimizer (here, a simple gradient-free search over the two-parameter landscape). By iteration 30, the distribution has concentrated 81% of its probability mass on the two true optimal cuts, and approaches — but does not reach — the maximum possible value of 4, reflecting both finite and finite shot noise. Running the classical post-processing step "return the best sampled string" would very likely return `0101` or `1010`, the correct answer, even though the expectation value itself never equals the optimum. This illustrates the core QAOA philosophy: it is a biased sampler that concentrates on good answers, not an algorithm that computes the optimal cost value exactly. For VQE, contrast this with the H molecule at its equilibrium bond length using a minimal STO-3G basis and a 4-qubit Jordan-Wigner-mapped Hamiltonian. A hardware-efficient ansatz with 2 layers of and rotations plus entangling CNOTs, optimized via gradient descent using the parameter-shift rule, typically converges to within a few milli-Hartree of the exact ground state energy ( Hartree) after 50–100 iterations — close enough for the "chemical accuracy" threshold of Hartree in favorable noise conditions, but degrading noticeably as circuit depth or hardware noise increases.
Common pitfalls & traps
| Pitfall | Why it happens | Consequence |
|---|---|---|
| Barren plateaus | Random deep ansätze have gradients that vanish exponentially in qubit count | Optimizer cannot find a descent direction; training stalls |
| Ignoring shot noise in gradients | Treating finite-sample estimates as exact | Optimizer chases noise, fails to converge or oscillates |
| Under-expressive ansatz | Hardware-efficient circuit too shallow to represent the true ground state | VQE converges to a confidently wrong, biased energy |
| Ignoring commuting term grouping | Measuring every Pauli term with a separate circuit setting | Shot budget blows up by a large unnecessary factor |
| Treating QAOA as free | Assuming deeper is always better without noise budget analysis | Circuit noise overwhelms signal before optimal is reached |
| Local optimizer trapped early | Classical optimizer (e.g. gradient descent) finds a local, not global, minimum | Reported "ground state energy" is an upper bound far from truth |
Pioneers & history
Origins · 1 minAlán Aspuru-Guzik and how this was discovered
Where this matters
Cloud quantum platforms — IBM Quantum, Google Quantum AI, Amazon Braket, IonQ, and Rigetti's systems — expose exactly the NISQ hardware model this article describes, and VQE/QAOA are the flagship algorithms researchers deploy on them today. Pharmaceutical and materials companies (including partnerships between IBM and Boehringer Ingelheim, or Google's collaborations on catalyst simulation) use VQE-style methods to explore small molecule and materials ground states as a testbed for eventual quantum chemistry advantage. Logistics and finance groups experiment with QAOA on portfolio optimization, routing, and scheduling problems formulated as quadratic unconstrained binary optimization (QUBO), often benchmarking directly against classical heuristics like simulated annealing. The techniques generalize directly into the broader field of Quantum Machine Learning: An Introduction, where parameterized circuits play the role of trainable models, and into open debates addressed under The Outlook for Quantum Advantage, since whether VQE or QAOA can ever provably outperform classical algorithms on practically relevant instances remains one of the field's unresolved central questions.
Ask the tutor: How do barren plateaus specifically depend on ansatz depth and qubit count, and what circuit designs are known to avoid them?
Why can't VQE and QAOA just use fault-tolerant error correction like Shor's algorithm does?
Fault-tolerant error correction, as formalized by The Threshold Theorem, requires encoding each logical qubit into many physical qubits with continuous syndrome extraction and correction. NISQ devices lack the qubit count, gate fidelity, and control infrastructure to do this economically. VQE and QAOA are explicitly designed around this absence: they use circuits shallow enough that accumulated noise stays below the point of destroying the signal, and they accept a probabilistic, approximate answer rather than demanding exact fault-tolerant guarantees. This is a deliberate engineering tradeoff, not an oversight — it is the entire reason these algorithms exist as a distinct research program.
Is VQE guaranteed to find the true ground state energy?
No. VQE only guarantees that the measured energy is an upper bound on the true ground-state energy, via the variational principle. Whether that bound is tight depends entirely on whether the chosen ansatz can represent states close to the true ground state (expressibility) and whether the classical optimizer actually finds the global minimum of the ansatz's energy landscape (optimization success). Both can fail independently: an expressive ansatz with a bad optimizer, or a perfect optimizer with an under-expressive ansatz, both produce wrong answers. In practice, researchers validate VQE results against classical methods on small systems before trusting larger, classically-intractable runs.
What does "approximate" mean in the Quantum Approximate Optimization Algorithm's name?
QAOA does not promise an exact solution to the combinatorial optimization problem; it promises a probability distribution over bit strings that becomes increasingly concentrated on high-quality (ideally optimal) solutions as circuit depth increases and parameters are well-optimized. At finite depth, some general theoretical approximation ratios are proven for specific problems (like Max-Cut on bounded-degree graphs), but no universal worst-case guarantee holds. The practical algorithm samples many bit strings and reports the best one observed, treating the quantum circuit as a biased random sampler rather than a deterministic solver.
What is a barren plateau, and why is it considered the biggest open problem for variational algorithms?
A barren plateau is a region of the parameter landscape where the cost function's gradient has exponentially small variance in the number of qubits, making the landscape appear essentially flat to any local optimizer using a realistic number of measurement shots. This was shown analytically for sufficiently random, expressive ansätze and deep circuits. It matters because it suggests a fundamental scalability barrier: as qubit count grows toward regimes with potential quantum advantage, naively designed variational algorithms may become untrainable, regardless of how much classical computing power backs the optimizer.
How is the gradient of a variational quantum circuit computed if you cannot backpropagate through quantum hardware?
Many quantum gates used in ansätze are generated by Pauli operators, of the form . For such gates, the parameter-shift rule gives an exact analytic gradient using only two additional circuit evaluations, shifting the parameter by and taking half the difference of the resulting expectation values. This avoids finite-difference approximation error entirely and requires no access to internal quantum states — only measurement outcomes — making it fully compatible with running on real, noisy hardware rather than a simulator.
Do VQE and QAOA provide a proven quantum speedup over classical algorithms?
Not in general, and this is an important honesty point about the field. Unlike Shor's or Grover's algorithms, which have rigorous asymptotic complexity advantages, VQE and QAOA are heuristic algorithms whose empirical performance is evaluated case by case, much like classical local-search heuristics. Some structured problem instances have been analyzed theoretically, and some hardware demonstrations show promising trends, but no proof establishes a general worst-case quantum advantage for either algorithm. This open question feeds directly into ongoing debates addressed under The Outlook for Quantum Advantage.
How do error mitigation techniques differ from full quantum error correction?
Full error correction, per The Threshold Theorem, actively detects and corrects errors during computation using redundant encoding, at a steep qubit and gate overhead. Error mitigation techniques used in NISQ algorithms — zero-noise extrapolation, probabilistic error cancellation, readout calibration — instead estimate the bias that noise introduces into a measured expectation value and subtract it out statistically, often by deliberately running the circuit at multiple noise levels and extrapolating to the zero-noise limit. Mitigation reduces bias without eliminating noise from individual runs, and it typically costs additional circuit repetitions rather than additional qubits, matching the resource constraints of near-term hardware.