Trotter Evolution Notebook
This notebook guide specifies a reproducible test of Trotter product formulas. The goal is to compare exact time evolution under a Hamiltonian sum
with product approximations built from separate evolutions under and . The notebook should make the difference between first-order and second-order splitting visible through validation tests, not just through a plot.
Purpose
Section titled “Purpose”The notebook should demonstrate:
- why is not generally equal to ;
- how first-order Trotter evolution converges as the number of steps increases;
- how symmetric second-order, or Strang, splitting improves the global error scaling;
- how commutators control the leading error;
- how to validate product-formula evolution against an exact finite-dimensional benchmark.
This page is a notebook companion to Trotter Product Formula.
Physics Goal
Section titled “Physics Goal”Use a two-level Hamiltonian split into two noncommuting pieces:
Then
Since
the two pieces do not commute when both and are nonzero. This makes the model small enough to solve exactly while still exposing the Trotter error.
Exact Benchmark
Section titled “Exact Benchmark”Let
The exact unitary is
The notebook should use this formula as the primary benchmark. It avoids ambiguity from a numerical matrix exponential when the purpose is to test the product formula itself.
For a chosen initial state , the exact evolved state is
First-Order Trotter Step
Section titled “First-Order Trotter Step”For
the first-order step is
The -step approximation is
For fixed total time , the global error should scale approximately as
once is large enough for the asymptotic regime.
Second-Order Trotter Step
Section titled “Second-Order Trotter Step”The symmetric second-order step is
The -step approximation is
The expected global error is
The notebook should verify this observed order by running several values of , not by checking one hand-picked step count.
Numerical Method
Section titled “Numerical Method”Use explicit Pauli matrices and closed-form exponentials. For a Pauli generator,
Thus no external matrix-exponential routine is needed for the baseline notebook.
Recommended dimensionless parameters are
Evaluate errors for a sequence such as
Use both an operator error and a state-level error. A useful operator error is the spectral or Frobenius norm:
For a chosen initial state, use the infidelity
The operator error tests the full unitary. The state error tests the physical effect on a selected state and ignores global phase.
How to Run the Notebook
Section titled “How to Run the Notebook”The baseline notebook should run with NumPy only:
- Define Pauli matrices.
- Check Pauli algebra and Hermiticity.
- Define , , and .
- Build using the closed-form formula.
- For each , build and .
- Check unitarity of every approximate unitary.
- Compute operator and state errors.
- Estimate observed convergence orders from successive refinements.
Plotting is optional. The validation cells should print or assert numerical residuals.
Expected Results
Section titled “Expected Results”For noncommuting and , the one-step product
should differ from .
As increases, both product formulas should converge. On a log-log plot of error versus , the slopes should approach
for first order and
for second order.
At very small errors, roundoff can spoil the slope estimate. The notebook should identify the asymptotic range rather than forcing every data point to fit the ideal power law.
Validation Checks
Section titled “Validation Checks”The minimum validation suite should include:
| Check | Target |
|---|---|
| Hermiticity | , , |
| Noncommutation | for the main test |
| Unitarity | for exact and approximate unitaries |
| Exact benchmark | matches direct diagonalization or a trusted matrix exponential for spot checks |
| First-order scaling | observed global error order near |
| Second-order scaling | observed global error order near |
| Commuting limit | if , product formulas are exact up to roundoff |
The commuting-limit test is important. It catches mistakes in matrix exponentials, multiplication order, and norm calculation.
Convergence Checks
Section titled “Convergence Checks”Estimate observed order with three successive step counts:
For first order, should approach . For Strang splitting, it should approach .
Use a range of values. If is too small, the asymptotic error model may not apply. If is too large, floating-point roundoff can dominate.
The notebook should report the actual residuals, not only the estimated slopes.
Common Numerical Failures
Section titled “Common Numerical Failures”- Comparing local one-step error with global fixed-time error.
- Forgetting that the product order is part of the approximation.
- Calling a method second order without checking the symmetric half-step structure.
- Using too few values to estimate a convergence slope.
- Hiding roundoff saturation at large .
- Comparing state-vector components without accounting for global phase.
- Testing only a commuting split, where Trotter error vanishes.
- Using nonunitary approximations to the exponentials and blaming Trotterization for the drift.
Extensions
Section titled “Extensions”Natural extensions include:
- compare ordering with ordering for first-order splitting;
- test a three-term Hamiltonian split;
- implement a split-operator method for on a Fourier grid;
- measure how error depends on by varying and ;
- compare operator norm, state infidelity, and observable errors;
- connect product formulas to digital quantum simulation gate counts.
Cross-Links
Section titled “Cross-Links”- Trotter Product Formula
- Trotter–Suzuki Methods for simulation-resource scaling, ordering, locality, and workflow-level convergence tests
- Time-Evolution Operator
- Two-State Hamiltonians
- Matrix Exponentials Numerically
- Matrix Functions and Exponentials
- Convergence Tests
- Validation Tests
- Benchmark Problems
References
Section titled “References”- M. Suzuki, “General theory of fractal path integrals with applications to many-body theories and statistical physics,” Journal of Mathematical Physics 32, 400-407, 1991.
- H. F. Trotter, “On the product of semi-groups of operators,” Proceedings of the American Mathematical Society 10, 545-551, 1959.
- R. Shankar, Principles of Quantum Mechanics, 2nd ed., Springer, 1994.
- M. A. Nielsen and I. L. Chuang, Quantum Computation and Quantum Information, Cambridge University Press, 2010.
- L. N. Trefethen and D. Bau III, Numerical Linear Algebra, SIAM, 1997.
Exercises
Section titled “Exercises”- Why must the main benchmark use noncommuting and ?
Solution
If , then
exactly. There is no Trotter error to study. A commuting case is still useful as a sanity check, but the convergence benchmark must use noncommuting terms.
- For fixed total time , why does first-order Trotter have global error rather than ?
Solution
The one-step local error is typically . At fixed total time,
so steps accumulate an error of order
This is the global fixed-time scaling. The second-order symmetric formula has local error and therefore global error .
- What is the purpose of the commuting-limit test?
Solution
The commuting-limit test checks the implementation independently of noncommutator error. If , both first-order and second-order products should reproduce the exact unitary up to roundoff. Failure in this limit usually indicates an error in matrix exponentials, multiplication order, units, or norm calculation.
- Why can state infidelity be small even when operator error is not?
Solution
State infidelity tests the action of the approximate unitary on one chosen input state. The approximation may be accurate on that state while still poor on another state. Operator error tests the full unitary map. Both diagnostics are useful, but they answer different questions.