Density Matrices and Mixed States
The state and an honest coin flip between and give identical measurement statistics — and behave completely differently from then on. The density matrix is the notation that can tell them apart, and the one real hardware makes unavoidable.
A statevector asserts complete knowledge of an isolated system; real devices are neither fully known nor isolated, so the density matrix is the honest description of a qubit in the field.
By the end you will build a density matrix from a state vector, assemble a mixed state from classical weights, check the three rules every must obey, and read coherence directly off the off-diagonal entries.
Core concepts: pure versus mixed states, coherence, trace, noise channels.
When one vector is not enough
A pure statevector represents maximal knowledge of an ideal, isolated quantum state. A density matrix represents pure states and everything short of them. It is the right language whenever you face uncertainty, noise, entanglement with an environment, or partial access to a larger system — which is to say, whenever you face hardware.
For a pure state , the density matrix is the outer product:
A mixed state is a classical weighted combination of such projectors:
Read the mixture as a recipe: with probability , the device actually holds , and you do not know which.
The rules ρ must obey
Three conditions certify any candidate density matrix:
- Hermitian: .
- Unit trace: — total probability is conserved.
- Nonnegative eigenvalues — no outcome gets negative weight.
Two examples to hold in your head. For :
And for :
The off-diagonal entries carry coherence — the memory that the amplitudes had a definite phase relationship. Noise typically shrinks or scrambles exactly those entries, which is why experimentalists watch them.
Worked example: coherent versus classical fifty-fifty
Build the density matrix for :
Check the trace: . Good. Now compare a fifty-fifty classical mixture of and :
Both matrices give and half the time in the computational basis. Only has off-diagonal terms. Apply H to each and the difference surfaces immediately: deterministically, while the mixture maps to an equal blend of and — still fifty-fifty, forever. One matrix remembered a phase; the other never had one.
Where the intuition fails
The first trap is believing equal measurement probabilities mean equal states. One basis's statistics are a projection of the state, not the state; the worked example's two matrices are proof that the projection can hide everything that matters.
The second trap is discussing noise with statevectors alone. A statevector can describe the wrong state, but not an unknown one. Real hardware forces you to track uncertainty, decoherence, and channels — and the density matrix is where all three live.
The engineering view
For a computer scientist, the density matrix is a richer state representation for systems with uncertainty and environment interaction. It costs more — an -qubit holds entries against the statevector's — and it buys realism: noise processes act on in ways a statevector cannot express. The depolarizing channel, for instance, steadily pushes any state toward the less informative mixture at the center of the sphere, erasing off-diagonal coherence as it goes.
This is load-bearing for simulator design, error mitigation, quantum error correction, and hardware diligence alike. It also separates two stories that look identical in one measurement basis: a coherent superposition can interfere later, while a classical mixture with the same immediate probabilities cannot. A model that cannot represent that difference will overstate what an ideal statevector demonstration says about hardware.
What this buys you in diligence
When a company claims useful noisy hardware, ask which noise model was used, how it acts on density matrices or observables, and whether the claim survives anything beyond ideal simulation. And when a software tool models only pure states, work out which hardware effects it structurally cannot represent — then decide whether your question depends on any of them.
Exercise
Build two density matrices and compare. Pencil and matrix arithmetic only.
- Submit: , the equal mixture of and , and a trace check for each.
- Check: compare the off-diagonal entries, then explain in one paragraph why equal computational-basis probabilities do not imply identical states — the H test from the worked example makes a good spine for the argument.
- Repair: if mixed states keep collapsing into "ordinary ignorance" without a to track them, redo Chapter 10 (Inner Products, Orthogonality, and Projection) and rebuild the outer-product mechanics.
Check your understanding
Answer without notes: create a pure-state density matrix, verify its trace, and explain what changes for a mixed state.
A passing answer writes the outer product, checks all three rules, and locates the difference between pure and mixed in the off-diagonal entries rather than in the basis probabilities.
Oral defense: explain why is the most ignorant possible one-qubit state — and what happens to it under any unitary.
If you get stuck
If the trace, coherence, or the mixed-state interpretation is shaky, go back to Chapter 10 (Inner Products, Orthogonality, and Projection) for the outer-product and probability mechanics, then rebuild the worked example. Density matrices are that arithmetic, organized for uncertainty.