CHAPTER 14
Hamiltonian simulation and modern algorithmic tools
Learning goals. Connect unitary evolution to Hamiltonians, derive a product formula, and understand the access and output assumptions behind block encoding and linear-system algorithms.
14.1 Why simulate quantum systems?
A Hamiltonian H is a Hermitian operator specifying a system’s energy and dynamics. In units with ,
for time-independent H. Simulating such evolution is a natural quantum-computing task because the target itself has quantum structure. But “simulate a molecule” still needs a precise model: orbitals, truncation, initial state, desired observable, accuracy, and classical benchmark.
For n qubits, a Hamiltonian can be expanded in Pauli strings: , with real coefficients for Hermitian H. A Pauli string is a tensor product of I,X,Y,Z. Since ,
Basis rotations and parity-computing circuits can implement these individual terms. For a Z-string, CNOTs compute parity into a target, an applies the phase, and reversed CNOTs uncompute the parity.
14.2 Product formulas and their error
If A and B commute, . Otherwise the equality generally fails. Expand each side for a small step δ:
The difference is proportional to . Repeating r steps of size t/r gives a first-order product-formula error with typical bound scaling for bounded operators. A symmetric step cancels leading asymmetry and improves the order under appropriate assumptions [21, 22].
Worked two-term model. Let . Because XZ+ZX=0,
Therefore
Acting on gives amplitudes and . This exact solution is a useful check on an approximate simulator.
Laboratory L19 — Product-formula experiment. Compare exact evolution under X+Z with repeated Z then X rotations. Change time and step count; inspect the state-vector error and fidelity. More steps reduce formula error but would add hardware noise in a physical implementation.
14.3 Energies through phase estimation
For an energy eigenstate , . Phase estimation can infer E after accounting for sign, time, and periodic ambiguity. Preparing a state with sufficient overlap on the desired eigenstate can be as important as simulating evolution. A precise phase estimate of the wrong eigenstate is not a successful ground-state calculation.
The full resource budget combines model error, state-preparation error, Hamiltonian-simulation error, phase-estimation error, and sampling or confidence requirements. Giving every component the entire error tolerance is invalid; the errors must be combined or budgeted with a justified bound.
14.4 Block encoding: matrices inside unitaries
An arbitrary matrix A is not usually unitary, so it cannot simply be applied as a deterministic closed-system gate. A block encoding embeds into a larger unitary U:
Here α≥‖A‖ is a normalization and a is the ancilla count. Other blocks make the complete matrix unitary. Postselecting the ancillas on zero applies the desired block with a state-dependent probability; that probability and the cost of constructing U must be counted.
For a sum of unitaries, one can prepare an index superposition weighted by , apply a selected with its sign or phase, and unprepare the index. This illustrates how a matrix’s representation determines its access cost.
Quantum signal processing and quantum singular value transformation use structured sequences of such unitaries, reflections, and phase rotations to transform eigenvalues or singular values by controlled polynomials. The required polynomial must satisfy boundedness and parity constraints, and its degree controls query cost. These methods unify important simulation, search, and linear-algebra algorithms; they do not provide arbitrary matrix functions for free [23, 24].
14.5 Linear systems and input-output restrictions
For , a quantum linear-system algorithm aims to prepare a state proportional to . In A’s eigenbasis, inversion multiplies coefficient by . Small eigenvalues cause large amplification, making the condition number κ an essential parameter [25].
The output is a quantum state, not a printed list of every component of a classical solution vector. Extracting all N entries generally removes the advertised logarithmic dependence on N. Promising use cases specify efficient access to A and b, suitable conditioning, and an output observable obtainable with limited measurements.
A classical comparison must receive comparable data access. Sampling access, sparse-entry oracles, low-rank structure, and preprocessed data can also enable powerful classical algorithms. A quantum linear-algebra primitive is a starting point for an application analysis, not a completed speedup claim.
14.6 Amplitude estimation and learning
Amplitude estimation combines amplification with phase information to estimate a success probability. Ideal coherent-query algorithms can improve the scaling with additive precision from the ordinary sampling to under appropriate access and success guarantees [16]. The improvement trades repeated shallow sampling for coherent operations, inverses, or more elaborate schedules. Noisy hardware can change that trade.
Quantum machine learning includes learning quantum data, quantum feature maps, and variational models. Loading classical data, generalization, training stability, and classical baselines are separate questions. An exponentially large Hilbert space alone proves no learning advantage. Strong results are task-specific; broad superiority on ordinary classical datasets remains an open question in this introductory scope [26].
14.7 Exercises
14.1. Derive .
Show solution / guidance
Z’s eigenvalues are ±1, so the state is . Up to global phase, its relative phase is .
14.2. Why is the product formula exact for , ?
Show solution / guidance
The operators act on separate subsystems and commute. The commutator and all higher commutator corrections vanish.
14.3. A first-order formula error bound is . What happens when the target error is divided by ten?
Show solution / guidance
The bound requires ten times as many steps, holding C fixed. More steps also increase physical operation count; total error may not decrease if hardware noise dominates.
14.4. Why does a block encoding need α≥‖A‖?
Show solution / guidance
A subblock of a unitary is a contraction: projecting a unit vector cannot increase its norm. Thus ‖A/α‖≤1.
14.5. A quantum linear-system routine prepares a 2²⁰-dimensional state. Does it output one million classical numbers?
Show solution / guidance
No. It outputs a 20-qubit state encoding normalized amplitudes. Recovering a full vector requires an additional, generally expensive measurement and reconstruction task.