Measuring Dynamical Quantities
Evolving a state is only half the job — the physics lives in the observables you measure afterward. This lesson shows how to extract expectation values like and correlation functions from a circuit, using nothing but computational-basis measurement statistics.
Expectation values from the -basis
The simulator measures in the computational () basis, returning the probabilities of each bitstring . For a single qubit the magnetisation follows directly from the two outcome probabilities, because has eigenvalue on and on :
No extra gates are needed: any observable diagonal in the computational basis is just a weighted sum of the measured probabilities, with weights equal to its eigenvalues.
Measuring off-diagonal observables
What about or ? They are not diagonal in the -basis, so we rotate the measurement basis first:
- For : apply before measuring (since ), then read .
- For : apply then before measuring, then read .
The general recipe: to measure a Pauli , conjugate by the single-qubit gate that maps , measure in the -basis, and combine with the eigenvalue weights.
Correlation functions
A two-point correlation function such as measures how the spins at sites and are statistically linked. Since is diagonal, it is again a sum over basis probabilities weighted by the parity of the two relevant bits:
Tracking as a function of evolution time gives a dynamical correlation function, the central object in studies of transport, thermalisation, and information spreading (light cones) in quantum many-body systems.
A clean analytic check
Prepare a single qubit with a -rotation applied to :
The outcome probabilities are and , so
For this gives . The exercise checks exactly this: that the measured reproduces the analytic .
Try it
Prepare the state and return the circuit. The grader reads the measured probabilities and checks that equals .
Sign in on the full site to ask questions and join the discussion.