Intuition
A density matrix represents both pure states and statistical ensembles. An equal mixture of |0⟩ and |1⟩ has the same Z-basis probabilities as |+⟩, yet only |+⟩ yields + with certainty in an X-basis measurement.
A random application of Z changes the relative sign. When the record of this random operation is unavailable, the state is a mixture. The off-diagonal terms can shrink or change sign while basis populations stay fixed.
Learning objectives
- Read the entries of a qubit density matrix
- Write a phase-flip channel
- Connect coherence to X-basis measurements
Interactive exploration
Use the controls to change the state and see its calculated readout. You can return to this experiment as you work through the derivation.
Phase-flip channel
Purity Tr(ρ²) = 0.625
Measurement readout
The channel applies I with probability 1−p and Z with probability p. At p = ½ the off-diagonal terms vanish. For an equatorial input the resulting state is maximally mixed.
Mathematical foundation
For an ensemble with weights pk, add outer products. The trace is one. A pure state has purity one and a maximally mixed qubit has purity one half.
The phase-flip channel has Kraus operators √(1−p)I and √p Z. Off-diagonal terms are scaled by 1−2p. The diagonal terms are unchanged.
Worked example
For |+⟩ and p = 1/4, the off-diagonal entry drops from 1/2 to 1/4. In the X basis, the output is a mixture with probabilities 3/4 for + and 1/4 for −. At p = 1 the flip is deterministic and purity returns to one.
Guided experiment
Start with |+⟩ and sweep the phase-flip probability from 0 through 0.5 to 1. Compare the Z and X readouts and the purity.
Go to the controlsCompare with the expected result
At p = 0.5 coherence disappears. At p = 1 a deterministic Z changes |+⟩ to |−⟩.
Understanding check
Next steps
Want to keep your results? Start your learning journey
Open Noise Studio