Curriculum / Entanglement & Protocols / Density Matrices and Mixed States

Lesson 2 of 11ReadingPro+75 XP

Density Matrices and Mixed States

Why kets are not enough: mixed states, purity, the partial trace, and fidelity.

Density Matrices and Mixed States

The previous lesson ended on a paradox: a Bell pair as a whole is perfectly known, yet each individual qubit on its own is completely random. Kets cannot express that. To make the paradox precise, and to describe the noisy qubits of real hardware at all, you need one more tool: the density matrix.

When Kets Are Not Enough

A ket describes a state you know exactly. Now imagine a machine that flips a fair coin and prepares |0⟩ on heads or |1⟩ on tails, without telling you the result. What ket describes the qubit it hands you? None. This is not superposition; it is ordinary classical ignorance about which quantum state you hold.

It is tempting to shrug and call it |+⟩, since both give 50/50 in the Z basis. But the two are physically different. Measure in the X basis: |+⟩ returns + every single time, while the coin-flip mixture still returns 50/50. A superposition has a definite phase relationship between |0⟩ and |1⟩ that can interfere; a mixture has none. Superposition is "both at once". A mixed state is "one or the other, and you do not know which".

The Density Matrix

If a source produces the state |ψᵢ⟩ with probability pᵢ, the density matrix packages the whole ensemble into one object:

Here |ψ⟩⟨ψ| is an outer product: a matrix, not a number. When you know the state exactly, the sum has a single term, ρ = |ψ⟩⟨ψ|, and the state is called pure. Anything else is mixed. Our two candidates from above become:

The diagonal entries are the Z-basis probabilities, identical for both. The difference sits off the diagonal: those entries, the coherences, record the phase relationship that makes interference possible. The mixture has none, which is exactly why it cannot interfere.

This is the opening of the lesson. The full walkthrough, the interactive circuit, and the graded challenge continue inside myqubit.

How this lesson works

A guided reading lesson with interactive knowledge checks. Concepts are explained step by step with circuit diagrams and runnable examples, and you confirm understanding before moving on.

Part of: Entanglement & Protocols

Master multi-qubit systems, quantum teleportation, and cryptographic protocols.

This lesson is part of Pro

Unlock Entanglement & Protocols and all 10 tracks with Pro: $12.99/month, $79/year, or $97 lifetime. Start with the free track first if you are new.