Time-Dependent Hamiltonians
So far every Hamiltonian in this module was constant in time. Many real systems are not: a driven qubit, an adiabatic sweep, an annealing schedule, or a laser pulse all have a Hamiltonian that changes as the experiment runs. This lesson shows how to simulate that.
Why time-dependence is harder
For a constant , evolution is simply . When varies, the propagator is the time-ordered exponential
where orders later times to the left. You cannot simply write in general, because and need not commute at different times — the order of application matters. The time-ordering symbol is precisely what keeps track of that order.
Slicing time
The fix mirrors Trotterization in time rather than in operator structure. Chop into thin slices of width . Over a slice short enough that barely changes, treat it as constant and use the frozen propagator
then compose the slices in time order, latest last:
Each slice can itself be Trotterized if has multiple non-commuting terms. Evaluating at the slice midpoint (rather than an endpoint) is a midpoint rule that gives second-order accuracy in for free — a cheap and worthwhile upgrade.
A driven single qubit
Take the time-dependent Hamiltonian with a linear ramp , evolving from to . Each frozen slice is a single-qubit -rotation:
using . With two slices () and midpoint evaluation, slice 0 freezes (angle ) and slice 1 freezes (angle ). Because all the slice propagators commute here (they are all -rotations), they compose to a single — which equals the exact answer doubled into the rotation angle. This commuting case is a sanity check; the slicing method is essential precisely when the slices do not commute.
Accuracy
Each frozen-slice approximation has error (with the midpoint rule), so the total error over slices is — the same convergence as first-order Trotter. Finer slices track a faster-changing more faithfully, at the cost of more gates.
Try it
Simulate with the ramp from to , using 2 slices and midpoint evaluation. Apply one per slice. The grader checks the final state vector.
Sign in on the full site to ask questions and join the discussion.