Measuring in the X Basis
Every measurement we have seen so far has been a computational-basis (or -basis) measurement: the qubit collapses to or . But qubits can also be measured in other bases. The basis uses the eigenstates of the Pauli operator,
A qubit in gives outcome in the basis with certainty, and a qubit in gives outcome with certainty — exactly the same kind of deterministic readout that and give in the basis.
Why rotating first works
Most quantum hardware only provides -basis measurement. The standard trick is to rotate into the basis before measuring: apply a Hadamard gate, then measure. Because swaps the two bases,
a -basis measurement on the rotated state returns the correct -basis outcome. Schematically:
This is the general strategy: to measure in any basis, first apply the unitary that rotates that basis onto the computational basis, then perform a standard measurement.
Example: reading out
Starting from , we can prepare in two steps:
- Apply to flip to .
- Apply to get .
To read out the -basis value, we then apply another (the rotation step) and measure:
The double application of around is not a coincidence: is its own inverse (), so the second exactly undoes the first while simultaneously performing the basis-change needed for measurement.
Try it
Build the circuit that prepares and measures it in the basis. The grader checks the
probability distribution: outcome 1 should appear with probability 1 and outcome 0 with
probability 0.
After running, the probability bar for 1 should be full and the bar for 0 empty — the signature
of a deterministic -basis measurement on .
Sign in on the full site to ask questions and join the discussion.