Quantum State Tomography
A quantum state is described by a density matrix , but a single measurement returns only one classical bit per qubit. State tomography is the procedure for reconstructing the entire matrix from the statistics of many repeated measurements in carefully chosen bases.
Expanding in the Pauli basis
Any single-qubit density matrix can be written as a real combination of the identity and the three Pauli matrices:
The three numbers are exactly the Bloch vector of the state. Reconstructing therefore reduces to measuring the three expectation values , , and . Each is bounded in , and a valid pure state has .
Measuring in three bases
The simulator — like real hardware — only measures in the computational () basis. To estimate the other two expectation values we rotate the desired axis onto the axis before measuring:
- : measure directly. With outcome probabilities we have .
- : apply a Hadamard first (it maps the eigenstates to ), then measure.
- : apply then (this maps the eigenbasis onto the computational basis), then measure.
Running each rotated circuit for many shots gives an estimate of the corresponding expectation value, and from the three values you assemble . With finite shots the estimate has statistical error , and the raw reconstruction can even fall slightly outside the Bloch ball — which is why practitioners follow up with a maximum-likelihood fit that forces to be a valid (positive, unit-trace) density matrix.
The measurement-rotation primitive
The single most important mechanical step in tomography is the basis rotation. Consider the state . Measured directly in the basis it is maximally random (), revealing only that . But is the eigenstate of , so if we first apply we get
and the measurement is now deterministic: outcome with probability , i.e. . That single rotated circuit nails the component of the Bloch vector exactly.
Try it
Prepare on one qubit, then perform an -basis measurement by rotating the axis onto before measuring. The grader checks the resulting computational-basis distribution: a correct -basis measurement of yields outcome with probability .
After running, open the Probabilities tab: the bar for 0 should reach , confirming
.
Sign in on the full site to ask questions and join the discussion.