Mixed States and Density Matrices
A pure state carries all the information about a quantum system; you know the exact state vector. Real hardware, however, suffers noise: a qubit may have been prepared incorrectly, interacted with its environment, or relaxed before you could use it. In those cases you only know that the qubit is in state with probability . This is a mixed state, and the right tool to describe it is the density matrix.
From state vectors to density matrices
For a pure state the density matrix is the outer product
For a mixed state — a classical probability distribution over pure states — it is the weighted average
Every valid density matrix is Hermitian (), positive semi-definite ( for all ), and has unit trace ().
A one-qubit example
Suppose a noisy source emits with probability and with probability . The density matrix is
The diagonal entries are the probabilities of each basis state. There are no off-diagonal terms because this is a classical mixture — no quantum coherence between and . Compare this with the equal-superposition pure state , whose density matrix is
The off-diagonal entries (coherences) are a hallmark of genuine quantum superposition. Decoherence is the process by which those off-diagonal entries decay toward zero, turning the pure into a diagonal mixed state.
Purity: how mixed is the state?
The purity of a state is
where is the dimension ( for a qubit). if and only if is pure. The maximally mixed state has the minimum purity .
For a diagonal density matrix with entries and (so ),
Substituting , :
This is strictly less than 1 (not pure) and greater than (not maximally mixed) — exactly what we expect for a moderately noisy qubit.
Measurement from the density matrix
The probability of measuring outcome is
just the corresponding diagonal entry. For the noisy qubit above, and .
Try it
A qubit is prepared as a classical mixture: with probability 0.7 and with probability 0.3. Compute and return the purity of this mixed state.
Sign in on the full site to ask questions and join the discussion.