Skip to content
Quantum ComputingAN INTERACTIVE OPEN TEXTBOOK
charithj.com.au

Hamiltonian Simulation

Calculate Hamiltonian evolution and choose measurements that reveal its phase dynamics.

21 min readDr. Charith Jayasekara↓ Chapter PDF
By the end, you’ll be able to
  • State a Hamiltonian access and output contract.
  • Derive single-Z evolution of |+⟩.
  • Separate simulation, preparation and measurement errors.

Hamiltonian simulation means implementing the evolution generated by a specified energy operator for a specified time. The goal is not necessarily to print the complete wavefunction. A useful task might estimate a magnetisation, correlation, transition probability or energy-related quantity after evolution. The output requirement determines how much measurement work is needed.

Prerequisites: matrix operations, phase gates and simulation versus sampling. We set the reduced Planck constant to one, so the ideal evolution is the exponential of negative i times H times t.

WORKED DIAGRAM · A22Z evolution of |+⟩
Z evolution of |+⟩H = Z produces relative phase 2t. Z probabilities stay equal while the X expectation is cos(2t).STEP 1t = 0: positive xSTEP 2t = π/4: positive ySTEP 3t = π/2: negative xSTEP 4Z populations stay1/2
H = Z produces relative phase 2t. Z probabilities stay equal while the X expectation is cos(2t).

The input is a Hermitian Hamiltonian, an initial-state preparation, an evolution time and an allowed approximation error. The Hamiltonian might be given as a list of local terms, through sparse matrix-entry oracles, or as a block encoding. These are different access models. An algorithm efficient with one representation may be impractical if constructing that representation is expensive.

The output is usually a circuit approximating the time-evolution unitary, followed by whatever measurements the application requests. A classical description of every amplitude is not supplied for free. State preparation and observable estimation are separate subroutines whose costs must be included in a complete workflow.

Let H equal Z and start in plus. Zero has energy positive one and one has energy negative one. After time t, the amplitudes become the opposite phase factors divided by the square root of two:

∣ψ(t)⟩=e−it∣0⟩+eit∣1⟩2.|\psi(t)\rangle=\frac{e^{-it}|0\rangle+e^{it}|1\rangle}{\sqrt2}.

Their Z probabilities remain equal. Removing the common phase on the zero component leaves relative phase two t. At time pi over four, the physical state is positive y. At time pi over two, it is minus, up to a common phase. This connects an energy difference with a growing relative phase.

Apply H before Z readout to estimate X. The zero probability is cosine squared t, and the X expectation is cosine of two t. At time pi over four that expectation is zero, while at time pi over two it is negative one. A direct Z histogram would miss this dynamics entirely. Choose an observable sensitive to the evolution you want to test.

Several terms introduce an implementation problem

Section titled “Several terms introduce an implementation problem”

If H is a sum of commuting terms, their exponentials can be applied in any order and compose exactly. If the terms do not commute, multiplying their exponentials for a finite interval is generally approximate. Product-formula methods divide time into small slices. Other methods use linear combinations of unitaries, quantum walks or polynomial transformations.

The scientific question and the numerical approximation should be separated. Even an exact circuit for a simplified Hamiltonian may omit physical interactions. Conversely, a precise physical model may be simulated with approximation error. Add state-preparation, synthesis and measurement error to form an overall budget. Calling everything “noise” makes these different causes hard to diagnose.

Choose a physically justified model and a representation. Identify the requested observable and accuracy. Prepare the initial state. Construct a simulation circuit with an allocated approximation tolerance. Compile it under the chosen gate conventions. Run fresh preparations, measure the observable and report statistical uncertainty. Compare small cases with exact diagonalisation or another independent classical calculation.

For the Z example, the exact reference is a phase rotation with a known angle. For an interacting two-spin example, one can diagonalise a four-by-four matrix. These small checks do not demonstrate a practical advantage, but they validate conventions before the state space becomes too large to inspect directly.

Simulation cost depends on evolution time, Hamiltonian scale, precision and the representation’s structure. Multiplying H by a constant while dividing t by the same constant leaves the physical evolution unchanged, so a sensible resource expression combines scale and time. A claim depending only on the number of qubits omits important difficulty parameters.

General no-fast-forwarding results rule out simulating arbitrary black-box Hamiltonians for long times using a universally sublinear number of accesses. Special systems can be easier. A diagonal Hamiltonian with an efficiently computable spectrum is not representative of every interacting model. Primary sparse-simulation research and later nearly optimal methods formalise these representation-dependent bounds. Berry and colleagues, Berry, Childs and Kothari.

Useful quantum simulation may concern systems where a small number of observables is valuable even though the full state is huge. That is different from saying every physical system or every output can be simulated efficiently. Initial-state preparation may itself be hard, particularly for complicated ground or thermal states, and precision can dominate a resource estimate.

Check a measurable consequence of the model

Section titled “Check a measurable consequence of the model”

For the Z-evolution example at time pi over eight, the X expectation is cosine of pi over four, equal to one over the square root of two. After H readout, the zero probability is one half times one plus that expectation, approximately 0.853553. The direct Z-zero probability is still one half. Two measurement settings therefore produce different, precisely predicted time dependence.

This provides a small validation plan. First verify exact amplitudes in a simulator, then sample both settings and check uncertainty around their probabilities. If the direct Z histogram oscillates under this ideal model, inspect the implemented Hamiltonian or readout rather than accepting the curve as a mysterious quantum effect.

An observable-sensitive test is more informative than checking only norm preservation. Many wrong unitaries preserve norm. Several evolution times and an initial superposition can expose an incorrect sign, angle scale or missing relative phase while remaining simple enough for independent calculation.

Exercise 1. For the Z example at time pi over two, what are the Z probabilities and the X expectation?

Check the worked answer

The Z probabilities remain one half each. The state is physically minus, so the X expectation is negative one. Equal populations do not imply unchanged state.

Exercise 2. A proposal assumes an arbitrary classical array can be loaded as an initial quantum state at no cost. Why is its total runtime claim incomplete?

Check the worked answer

The preparation circuit is part of the input-access model. For unstructured data it can require substantial work, potentially removing a claimed advantage. Specify an efficient structured preparation or include the loading cost, then state which observables will be extracted and at what precision.

PAUSE & THINK

At t = π/2 for H = Z on |+⟩, what is the X expectation?

Choose your answer
ONE IDEA FURTHER

Ready for the next step?

Your progress stays in this browser.