|q⟩ Bad Qubits

advanced · Programming · Advanced Hamiltonian Simulation

Error Scaling of Product Formulas

How large is the error you make when you replace true evolution by a product formula? The answer controls everything practical: how many Trotter steps you need, and therefore the depth and runtime of your circuit. This lesson turns the abstract big-OO bounds into concrete numbers.

The first-order error term

Split H=A+BH = A + B and compare exact evolution to the first-order step. Expanding both sides to second order in tt using the Baker–Campbell–Hausdorff identity,

eiHt=IiHt12H2t2+O(t3),e^{-iHt} = I - iHt - \tfrac{1}{2}H^2 t^2 + O(t^3), eiAteiBt=Ii(A+B)t12(A2+2AB+B2)t2+O(t3).e^{-iAt}e^{-iBt} = I - i(A+B)t - \tfrac{1}{2}\bigl(A^2 + 2AB + B^2\bigr)t^2 + O(t^3).

The linear terms match. The quadratic terms differ only by the commutator: using H2=A2+AB+BA+B2H^2 = A^2 + AB + BA + B^2,

eiHteiAteiBt=12[A,B]t2+O(t3).e^{-iHt} - e^{-iAt}e^{-iBt} = \tfrac{1}{2}\,[A, B]\,t^2 + O(t^3).

If AA and BB commute the formula is exact; all Trotter error comes from non-commutativity. Taking operator norms gives the standard single-step bound

eiHteiAteiBtt22[A,B]+O(t3).\bigl\lVert e^{-iHt} - e^{-iAt}e^{-iBt}\bigr\rVert \le \frac{t^2}{2}\,\bigl\lVert [A, B]\bigr\rVert + O(t^3).

Worked estimate for H=X+ZH = X + Z

Take the toy single-qubit Hamiltonian from the previous lesson, A=XA = X, B=ZB = Z. The commutator is

[X,Z]=XZZX=2iY,[X, Z] = XZ - ZX = -2iY,

(recall XZ=iYXZ = -iY and ZX=+iYZX = +iY). A Pauli operator scaled by a constant has spectral norm equal to that constant's magnitude, so [X,Z]=2iY=2\lVert [X, Z]\rVert = \lVert -2iY\rVert = 2. The single-step error bound at t=0.1t = 0.1 is therefore

t22[X,Z]=0.1222=0.01.\frac{t^2}{2}\,\lVert [X, Z]\rVert = \frac{0.1^2}{2}\cdot 2 = 0.01.

Splitting into rr steps

To evolve for a long time tt accurately, divide it into rr steps of length t/rt/r. Each step costs (t/r)22[A,B]\tfrac{(t/r)^2}{2}\lVert[A,B]\rVert, and the rr errors add up:

total errorr(t/r)22[A,B]=t22r[A,B].\text{total error} \le r \cdot \frac{(t/r)^2}{2}\,\lVert[A,B]\rVert = \frac{t^2}{2r}\,\lVert[A,B]\rVert.

So total error scales as O(1/r)O(1/r) — to reach accuracy ε\varepsilon you need r=O ⁣(t2[A,B]2ε)r = O\!\left(\frac{t^2 \lVert[A,B]\rVert}{2\varepsilon}\right) steps. This linear-in-1/ε1/\varepsilon cost is the headline weakness of first-order Trotter.

Higher-order improvement

The symmetric 2nd-order step has per-step error O((t/r)3)O((t/r)^3), so the total error is O(t3/r2)O(t^3/r^2) and r=O(1/ε)r = O(1/\sqrt{\varepsilon}). More generally, the order-2k2k Suzuki formula gives r=O ⁣((1/ε)1/2k)r = O\!\left((1/\varepsilon)^{1/2k}\right) — each extra order pushes the exponent of 1/ε1/\varepsilon down, which is why high-precision simulations favour 4th order and beyond.

Try it

Compute the leading first-order Trotter error bound for one step of H=X+ZH = X + Z at t=0.1t = 0.1, using [X,Z]=2\lVert [X, Z]\rVert = 2. Return the number; the grader checks it equals 0.010.01.

Run your code to see the quantum state.

Sign in on the full site to ask questions and join the discussion.