Computer Engineering is coming soon

We're still writing and reviewing the notes for every subject, and we'll open it when every subject is ready. Meanwhile you can practise aptitude, ask Aria about any subject, or see the branches that are ready.

Quantum simulation

Quantum simulation studies how to reproduce the time evolution or properties of a quantum system using another controllable quantum system or a classical algorithm, using tools such as the time-evolution operator, Hamiltonian decomposition and Trotter–Suzuki formulas.

Drafted with Aria, reviewed by the AiCanCode.org team · Updated . How we write and check our notes. Spotted an error? Use Give Feedback at the bottom of the page.

Why it matters

Quantum simulation helps engineers predict and design quantum devices, materials and chemical reactions that are hard for classical computers. Engineers use quantum simulation to estimate time evolution, ground states and response properties of quantum systems, and to plan circuits for digital quantum simulators or set parameters for analog simulators.

Key ideas

  • Digital quantum simulation: reproduce U(t) by a quantum circuit of elementary gates. We decompose H into sum of terms H = Σ_j H_j, each term is easy to exponentiate, then approximate U(t) by products of e^{-i H_j t/ħ} using product formulas. If all H_j commute, this product equals e^{-i H t/ħ} exactly (no Trotter error).

  • Analog quantum simulation: engineer a controllable physical system whose continuous dynamics follow the target Hamiltonian H directly. Assumption: you can tune parameters so that the simulator Hamiltonian equals the target within error bounds.

  • Trotter (Lie) product formula: For two (or more) operators A and B (bounded),

    • exact statement (Lie product formula): lim_{n→∞} (e^{A/n} e^{B/n})^n = e^{A+B}.
    • In quantum simulation with time evolution, set A = -i H_1 t/ħ and B = -i H_2 t/ħ.
    • This gives the first-order Trotterization: e^{-i(H_1+H_2)t/ħ} ≈ (e^{-i H_1 t/(n ħ)} e^{-i H_2 t/(n ħ)})^n with error O(t^2/n).
  • Trotter–Suzuki formulas: higher-order product formulas reduce the approximation error. The second-order (symmetric) formula:

    • e^{(A+B)t} ≈ (e^{A t/(2n)} e^{B t/n} e^{A t/(2n)})^n, error O(t^3/n^2).
    • These are used to trade gate depth for accuracy.
  • Baker–Campbell–Hausdorff (BCH) expansion: gives exponent of product of exponentials. For small s,

    • e^{sA} e^{sB} = e^{s(A+B) + s^2/2 [A,B] + s^3/12 ([A,[A,B]] + [B,[B,A]]) + ...}.
    • Use BCH to derive leading-order Trotter error.
  • Operator norm and error: We measure approximation error by operator norm (spectral norm) ||·||. If A = -iH1/ħ and B = -iH2/ħ, the leading error after n steps scales like (t^2/(2n)) ||[A,B]|| ≈ (t^2/(2nħ^2)) ||[H1,H2]||.

  • Pauli exponentials: For a Pauli vector n·σ and angle θ (with n a unit vector |n| = 1),

    • exp(-i θ (n·σ)/2) = cos(θ/2) I - i sin(θ/2) (n·σ).
    • Useful because single-qubit Hamiltonians are rotations on the Bloch sphere.
  • Diagrams to draw for an exam:

    1. For Trotter step: draw a quantum circuit with n repeated blocks; inside a block, draw gates labelled U1 = e^{-i H1 t/(n ħ)} then U2 = e^{-i H2 t/(n ħ)}; label total time t and number of steps n.
    2. For single-qubit rotation: draw the Bloch sphere, mark initial state on surface, draw rotation axis n and angle θ, show final state after rotation.

Derivation most universities ask for (first-order Trotter error):

  1. Let s = t/n and A = -i H1/ħ, B = -i H2/ħ. Expand one step: e^{sA} e^{sB} = e^{s(A+B) + s^2/2 [A,B] + O(s^3)} using BCH.
  2. Raise to n: (e^{sA} e^{sB})^n = e^{n s (A+B) + n s^2/2 [A,B] + n O(s^3)} = e^{t(A+B) + (t^2/(2n)) [A,B] + O(t^3/n^2)}.
  3. Therefore (e^{sA} e^{sB})^n differs from e^{t(A+B)} by an extra exponent ~ (t^2/(2n))[A,B], so operator-norm error ≈ (t^2/(2n)) ||[A,B]||.
  4. Substitute back A,B in terms of H1,H2 to get error ≈ (t^2/(2n ħ^2)) ||[H1,H2]||.

Assumptions: H1,H2 bounded operators; expansion valid for small s.

Formulas

U(t) = exp(-i H t / ħ) — U(t): time-evolution operator (unitary), H: Hamiltonian (J), t: time (s), ħ: reduced Planck constant (J·s). Applies for time-independent H. For time-dependent H(t), use U(t) = T exp(-(i/ħ) ∫_0^t H(τ) dτ), where T is the time-ordering operator.

e^{sA} e^{sB} = e^{s(A+B) + s^2/2 [A,B] + O(s^3)} — BCH expansion, A,B operators, s dimensionless scalar when A,B include physical constants appropriately.

(e^{A/n} e^{B/n})^n -> e^{A+B} as n -> ∞ — Lie product (Trotter) formula, A,B bounded.

First-order Trotter error ≈ (t^2/(2n ħ^2)) ||[H1,H2]|| — ||·||: operator (spectral) norm, dimensionless result for unitary error; applies when using A = -iH/ħ.

exp(-i θ n·σ / 2) = cos(θ/2) I - i sin(θ/2) n·σ — single-qubit rotation formula; σ are Pauli matrices (dimensionless), θ in radians.

[A,B] = AB - BA — commutator definition; dimension same as AB.

Notes on symbols: H in joules (J), t in seconds (s), ħ ≈ 1.054571817e-34 J·s, σ_x,σ_y,σ_z dimensionless with eigenvalues ±1.

Worked examples

Example 1 — Single-qubit free precession (model-answer type)

Question: For a qubit with Hamiltonian H = (ħ ω / 2) σ_z, find U(t) and describe the rotation on the Bloch sphere. Take ω = 2π × 1 GHz and t = 1 ns. Show numeric evaluation.

Answer (steps):

  1. Use formula U(t) = exp(-i H t / ħ). Substitute H: U(t) = exp(-i (ħ ω / 2) σ_z t / ħ) = exp(-i (ω t / 2) σ_z).
  2. Use Pauli exponential formula with θ = ω t and axis z: U(t) = cos(ω t / 2) I - i sin(ω t / 2) σ_z = diag(e^{-i ω t / 2}, e^{i ω t / 2}).
  3. Numeric: ω = 2π × 1e9 rad/s, t = 1e-9 s ⇒ ω t = 2π × 1e9 × 1e-9 = 2π. So ω t / 2 = π. Then cos(π) = -1, sin(π)=0.
  4. Therefore U(t) = -I = phase flip global; physically the Bloch vector rotates by 2π about z and returns to same point on sphere (global phase -1 is physically irrelevant for pure states).

Final answer (bold): U(t) = -I; the state returns to itself on Bloch sphere (global phase -1).

Example 2 — Trotter error estimate for two Pauli terms (model-answer type)

Question: Consider H = H1 + H2 with H1 = (ħ/2) σ_x and H2 = (ħ/2) σ_z. Use first-order Trotter with n steps to approximate U(t). Compute leading-order operator-norm error estimate for n = 1 and t = 1 ns.

Answer (steps):

  1. Set A = -i H1 / ħ = -i σ_x / 2 and B = -i H2 / ħ = -i σ_z / 2.
  2. Compute commutator [H1,H2]. Using [σ_x, σ_z] = -2 i σ_y, [H1,H2] = (ħ/2)(ħ/2)[σ_x,σ_z] = (ħ^2/4) (-2 i σ_y) = -i (ħ^2/2) σ_y.
  3. Norm: ||σ_y|| = 1, so ||[H1,H2]|| = ħ^2/2.
  4. Using error formula from Key ideas, error ≈ (t^2/(2 n ħ^2)) ||[H1,H2]|| = (t^2/(2 n ħ^2)) (ħ^2/2) = t^2/(4 n).
  5. For t = 1 ns = 1e-9 s and n = 1, error ≈ (1e-9)^2 / 4 = 1e-18 / 4 = 2.5e-19 (dimensionless operator-norm estimate).

Final answer (bold): Leading-order operator-norm error ≈ 2.5 × 10^-19 for n = 1 and t = 1 ns.

Comment: This tiny number reflects that the chosen t is extremely small; for larger t or many-body systems the error grows and many steps n are needed.

Common mistakes

  • Applying Trotterization when terms strongly fail the boundedness/commutation assumptions without error analysis.
  • Using first-order Trotter but quoting O(t^3/n^2) scaling (this is for second-order symmetric Trotter).
  • Forgetting operator norm when estimating unitary approximation error; using matrix-element error instead changes scaling.
  • Assuming small commutator implies small energy scale; commutator size must be computed explicitly.

For your exam

Question types that appear:

  • Definitions: Hamiltonian, unitary time evolution, Trotter formula, analog vs digital simulation.
  • Short notes: explain first-order Trotter vs second-order Suzuki and their use-cases.
  • Derivations: derive the leading-order Trotter error using BCH (step-by-step) — include assumptions.
  • Numericals: compute U(t) for simple Hamiltonians (Pauli matrices), estimate Trotter error for given H1,H2,t,n with numbers.
  • Diagrams: draw Trotter circuit for n steps and Bloch-sphere rotation.

What a full-marks answer includes:

  • Clear definitions with assumptions (e.g., Hermitian H, closed system), correct formulas, and stepwise derivation (for BCH/Trotter include s = t/n substitution and raising to n). For numerics, show units, plug numbers, carry units through, and give final bold result.

Quick check

  1. State the time-evolution operator for time-independent Hamiltonian H.
  2. For H = (ħ ω / 2) σ_z, what is U(t) in matrix form?
  3. Using first-order Trotter for H = H1 + H2, what is the leading scaling of error with n (number of steps)?

Answers: U(t) = exp(-i H t / ħ).; U(t) = diag(e^{-i ω t / 2}, e^{i ω t / 2}).; Error scales as O(t^2 / n).

Finished this topic? Mark it so your progress, study plan and readiness keep up.

Stuck on something here?