The Machinery · Topic 17 of 20 · Quantum algorithms for optimization & simulation

Quantum simulation & chemistry

A quantum computer can't just "plug in" a molecule's Hamiltonian, so what does simulating one actually involve, mechanically?

  1. 01
  2. 02
  3. 03
  4. 04
  5. 05
  6. 06
  7. 07
  8. 08
  9. 09
  10. 10
  11. 11
  12. 12
  13. 13
  14. 16
  15. 17
  16. 14
  17. 15
  18. 18
  19. 19
  20. 20
About this section: Quantum algorithms for optimization & simulation

Every algorithm this page has built so far is proven: Deutsch's, Simon's, Shor's period-finding all come with a fixed circuit and a guaranteed advantage over any classical algorithm attacking the identical problem. This section is the honest counterpart. QAOA and VQE are a completely different kind of algorithm: built for the noisy, shallow-circuit hardware that actually exists today, and carrying a different guarantee: not "this is fast," but "this can never quietly report a wrong answer as if it were right." Nobody has a proof either one beats its best classical rival on the problems people actually care about: a fact this section states as plainly as the rest of this page states its proofs.

See it

n=1 n=4 n=16 n=64 0.800 0.172 0.043 0.011
Chop the time evolution into more, smaller steps, and the approximation error keeps shrinking. This is the entire mechanical trick that lets a gate-based quantum computer run a Hamiltonian it can't build one single gate for.

The intuition

A real system's Hamiltonian is usually a sum of many pieces that don't commute with each other: different interaction terms, acting on different, overlapping qubits. You generally cannot build one clean gate for e−i(A+B)t directly the way you can for e−iAt or e−iBt alone. Trotter's trick is to stop trying. Chop the total time into many tiny slices, and within each slice apply each piece's own short, buildable evolution one after another instead of together. Because the slices are short, the fact that A and B don't commute barely matters over any one of them, and the error from ignoring it shrinks to zero as the slices shrink, which the figure above shows happening.

This is also, historically, the entire reason anyone first thought a quantum computer might be good for something. Richard Feynman's 1982 observation was that simulating a quantum system on a classical computer seems to need resources that blow up exponentially with the number of particles, so use a quantum system to simulate a quantum system instead. Lloyd (1996) turned that intuition into an actual algorithm and a real complexity result: a broad, well-defined class of Hamiltonians (a bounded number of terms, each acting on only a few qubits: exactly the kind chemistry and materials produce) can be simulated in time that scales only polynomially in system size and evolution time, on a gate-based quantum computer. That is a separate, and separately proven, kind of advantage from the oracle-based speedups topics 08–10 built.

The mathematics

The Lie product (Trotter) formula:

ei(A+B)t = limn→∞ (eiAt/n eiBt/n)n

and at finite n, the first-order approximation carries an error bounded by O(t²‖[A, B]‖/n). It vanishes exactly when A and B commute, and otherwise shrinks as 1/n. (Higher-order Trotter–Suzuki formulas push the exponent further, at the cost of more gates per step.) Verified directly against the exact matrix exponential for a concrete non-commuting Hamiltonian, H = 1.3X + 0.8Z at t=1: operator-norm error 0.800 (n=1) → 0.355 (n=2) → 0.172 (n=4) → 0.085 (n=8) → 0.043 (n=16) → 0.021 (n=32) → 0.011 (n=64) → 0.0053 (n=128): monotonically shrinking throughout, and the n=64→128 ratio measures 2.000, matching the predicted O(1/n) scaling almost exactly (Trotter, Proc. Amer. Math. Soc. 10, 545 (1959); Suzuki, J. Math. Phys. 26, 601 (1985); Lloyd, "Universal Quantum Simulators," Science 273, 1073 (1996)).

Reaching an actual molecule. A molecule's Hamiltonian is naturally written in terms of electron creation/annihilation operators on molecular orbitals: fermionic operators, not qubit operators. The Jordan–Wigner transformation (Jordan & Wigner, 1928: originally built for an entirely different problem in condensed-matter physics, decades before there was a quantum computer to run it on) rewrites those fermionic operators as strings of Pauli operators on qubits, turning "simulate this molecule" into exactly the kind of local-Hamiltonian problem the Trotter machinery above already solves. From there, two different roads reach a molecule's ground-state energy: run the Trotterized evolution as the controlled unitary inside topic 12's phase estimation, provably accurate to any precision on a deep, fully error-corrected circuit; or skip straight to the previous topic's VQE, trading that proof away for a shallow circuit that can run on hardware available today.

Where it actually matters

The clearest "quantum computers help X" case beyond breaking cryptography, and how far it still has to go Peruzzo et al. ran the first experimental VQE in 2014 (a photonic chip, the molecule HeH⁺, Nature Communications 5, 4213); Kandala et al. scaled the same idea to slightly larger molecules on superconducting hardware in 2017 (Nature 549, 242). Both real, both toy-sized. The molecule that actually matters economically is FeMoco, the iron–molybdenum cofactor at the heart of the enzyme that fixes nitrogen in nature: the reaction the industrial Haber–Bosch process reproduces at 400°C and 200 atmospheres, burning on the order of 1–2% of global energy to do it. Reiher, Wiebe, Svore, Wecker & Troyer (PNAS 114(29), 7555 (2017)) estimated what simulating it would actually cost a fault-tolerant quantum computer: on the order of 100+ logical qubits and days of runtime even under aggressive parallelism. Set against what one logical qubit costs in physical qubits today, that is the same honest gap this page keeps landing on for Shor's algorithm: a real, proven direction, and still nowhere near a near-term device.