Checkpoint: Anneal to a Ground State
This checkpoint assembles everything in the module into one runnable algorithm: a complete, Trotterized single-qubit anneal that starts in the driver's ground state and finishes in the ground state of the problem Hamiltonian.
The problem
Take the problem Hamiltonian , whose ground state is (energy ). The driver is , with ground state . The linear schedule is
Run slowly enough and the system tracks the instantaneous ground state from at all the way to at . From the gap lesson, , so a modest total time already makes the evolution comfortably adiabatic.
The recipe
- Initialize. Prepare the driver ground state .
- Discretize. Split into steps of size .
- Trotterize each step. At step use the midpoint schedule value and apply the first-order Trotter step i.e. the rotation first, then the rotation.
- Measure in the computational basis.
The midpoint rule samples the schedule symmetrically across each interval, a standard improvement over using the left endpoint.
Why the answer concentrates on 0
Because , the adiabatic theorem applies: the diabatic transition probability is tiny, so the system stays in the ground state. By that ground state is , and a computational-basis measurement returns outcome with probability close to 1. The small residual weight on outcome comes from finite and the Trotter error.
Try it
Implement the full anneal exactly as specified and measure. The grader checks the measurement distribution: outcome should dominate.
After running, the Probabilities tab shows the bar for near 1 and the bar for near 0 — you have annealed into the ground state of .
Sign in on the full site to ask questions and join the discussion.