A digital quantum computer cannot apply an arbitrary Hamiltonian H directly — it can only fire a finite gate set. To simulate evolution under H = A + B where A = hxX and B = hzZ do not commute, it composes many short, exactly-implementable single-term rotations instead — the Lie–Trotter product formula:
e^{-i(A+B)t} = lim(n→∞) [ e^{-iAt/n} e^{-iBt/n} ]^n
1st order (Lie–Trotter), per step of size dt = t/n:
U_step = e^{-iA·dt} e^{-iB·dt} local error O(dt²)
2nd order (Strang splitting), symmetric:
U_step = e^{-iA·dt/2} e^{-iB·dt} e^{-iA·dt/2} local error O(dt³)
Here A and B are single-qubit rotations with closed-form 2×2 unitaries, e^{-iθX} and e^{-iθZ}, so each Trotter step is just two or three real quantum gates. The exact state is the textbook Rabi solution — precession of the Bloch vector about the fixed axis n̂ = (hx,0,hz)/Ω at angular rate Ω = √(hx² + hz²):
e^{-iHt}|0⟩ = [cos(Ωt) − i n_z sin(Ωt)] |0⟩ − i n_x sin(Ωt) |1⟩
- hx, hz — the two non-commuting Hamiltonian terms; the more they differ in weight (or the less either dominates), the worse a fixed step count approximates the true evolution.
- Steps N — more Trotter steps means a shorter dt per step, so the jagged magenta path hugs the exact cyan circle more tightly; the infidelity readout falls roughly as 1/N² (1st order) or 1/N⁴ (2nd order).
- 1st vs 2nd order — the symmetric (Strang) split cancels the leading error term, reaching the same accuracy with far fewer gates — the core trick every real digital quantum simulator (superconducting or trapped-ion) relies on to keep circuits shallow.
Real-world relevance: this exact Trotter machinery — applied to many-qubit Hamiltonians instead of one qubit — is how quantum computers simulate molecules, materials and nuclear physics: problems whose Hilbert space grows too fast for any classical computer to track exactly.