Hard problems — technical, commercial, and otherwise.
atlas/quantum information/density matrices

Density Matrices

● publishedlast tended Aug 30, 2026Quantum9 min

Q1What is it?

A density matrix is a second way to write down a quantum state — and a strictly more general one. For a pure state |ψ⟩ it is the outer product of the state with itself:

ρ = |ψ⟩⟨ψ|

Written out for |ψ⟩ = α|0⟩ + β|1⟩, that is a 2×2 matrix:

ρ = [ |α|²  αβ* ; α*β  |β|² ]

The two entries on the diagonal are the measurement probabilities from the Born rule — the populations of |0⟩ and |1⟩. The two off the diagonal are new: they carry the coherence between the basis states, which is where the relative phase has gone. That split is the whole point of the object:

diagonal → populations   ·   off-diagonal → coherence

Not every matrix is a state. Three conditions make one physical: ρ must be Hermitian (ρ† = ρ, so probabilities come out real), positive semidefinite (⟨φ|ρ|φ⟩ ≥ 0, so no negative probabilities), and unit trace (Tr ρ = 1, so they sum to one). Anything satisfying all three is a legitimate quantum state; anything violating one is not.

The payoff is that this description covers states a vector cannot write at all. A state vector always describes a system you know exactly. A density matrix can also describe one you know only statistically — and, as Q3 shows, one that is genuinely indefinite because it is entangled with something else.

Q2Why does it exist?

Because of one distinction that state vectors cannot express. Consider two very different laboratory situations.

Situation A. I hand you a qubit in the superposition

|+⟩ = (|0⟩ + |1⟩)/√2

Situation B. I flip a fair coin out of your sight and hand you |0⟩ or |1⟩ accordingly. You have a qubit; I have a piece of paper saying which.

Measure either one in the computational basis and you get 0 half the time and 1 half the time. The statistics are identical. But these are not the same state — apply a Hadamard first and A gives |0⟩ every time while B still gives a coin flip. Situation A is a superposition; situation B is a classical mixture. State vectors have no way to write B at all: there is no |ψ⟩ that means “half of one, half of the other, and I mean it classically.” Density matrices write both, and the difference is visible on sight:

ρpure  = ½ [ 1   1 ; 1   1 ]   ← coherence in the corners
ρmixed = ½ [ 1   0 ; 0   1 ]   ← no coherence at all

Same diagonal — same computational-basis statistics, as promised. Different off-diagonal: the superposition has coherence, the coin flip has none. The off-diagonal terms are the mathematical difference between a quantum superposition and mere ignorance, and that sentence is the reason this node exists.

Reading the entries: one qubit

The 50/50 case is clean but symmetric, which hides the rule. Take a lopsided state instead:

|ψ⟩ = ( √3 |0⟩ + |1⟩ ) / 2   so   α = √3/2 , β = 1/2

Its density matrix ρ = |ψ⟩⟨ψ| has entries indexed by the basis states — row and column both run over |0⟩ and |1⟩:

|0⟩|1⟩
⟨0|3/4√3/4
⟨1|√3/41/4
■ diagonal — P(0) = 3/4, P(1) = 1/4   ·   ■ off-diagonal — coherence between |0⟩ and |1⟩

Read straight down the diagonal and you have the measurement probabilities, no calculation required: 3/4 and 1/4, summing to 1 because Tr ρ = 1. The two entries off the diagonal are αβ* = √3/4 ≈ 0.43 — not a probability of anything, and not observable in this basis. Now let the qubit sit in a noisy environment until its phase is scrambled:

|0⟩|1⟩
⟨0|3/40
⟨1|01/4
same probabilities — 3/4 and 1/4 — but the coherence is gone (purity drops from 1 to 5/8)

Measure in the computational basis a million times and these two states are indistinguishable. Apply a Hadamard first and they are not. Decoherence is the off-diagonal entries going to zero while the diagonal sits still — which is why T₂ is quoted separately from T₁ on a hardware spec sheet.

The same reading: two qubits

Nothing changes with more qubits except the size of the grid. Two qubits have four basis states, so ρ is 4×4, indexed by |00⟩, |01⟩, |10⟩, |11⟩. Take the Bell state:

|Φ⁺⟩ = ( |00⟩ + |11⟩ ) / √2
|00⟩|01⟩|10⟩|11⟩
⟨00|1/2001/2
⟨01|0000
⟨10|0000
⟨11|1/2001/2
■ diagonal — P(00) = P(11) = 1/2, P(01) = P(10) = 0   ·   ■ corners — coherence between |00⟩ and |11⟩

The diagonal says exactly what you would expect from a Bell pair: measure both qubits and you get 00 or 11 with equal probability, never 01 or 10. The corners are the entanglement. Now compare a state that is correlated but not entangled — I flip a coin and prepare either |00⟩ or |11⟩:

|00⟩|01⟩|10⟩|11⟩
⟨00|1/2000
⟨01|0000
⟨10|0000
⟨11|0001/2
identical diagonal — identical measurement statistics — but no corners, so no entanglement

Both states give perfectly correlated outcomes. Only one of them violates a Bell inequality, and the difference lives entirely in two corner entries. So the rule reads the same at any size:

down the diagonal → what a measurement will give you
off the diagonal → what is still quantum

There is a number that compresses this. Purity is

Tr(ρ²) = 1   pure  ·   Tr(ρ²) < 1   mixed  ·   Tr(ρ²) = ½   maximally mixed

and it turns “how quantum is this state still?” into a single scalar you can track as a system decoheres.

pure|r| = 1mixed|r| < 1decoherenceI/2|0⟩|1⟩surface = pure · interior = mixed · centre = no information
fig. 1 — the Bloch ball. The sphere from the qubit page was only its skin; decoherence is the vector shrinking inward.

Q3How does it connect?

Three pieces of machinery hang off this node, and each one replaces something narrower.

Measurement gets simpler, not harder. The Born rule in operator form was pᵢ = ⟨ψ|Pᵢ|ψ⟩, which needs a state vector. In density-matrix language it becomes a trace:

pᵢ = Tr(ρ Pᵢ)

and this one expression works for pure and mixed states alike — and, swapping Pᵢ for a POVM element Eᵢ, for any measurement whatsoever. One formula now covers the whole of the measurement node.

The geometry gets an interior. Any single-qubit density matrix can be written with three real numbers:

ρ = ½ ( I + r⃗ · σ⃗ )   where   σ⃗ = (X, Y, Z)

The Bloch vector r⃗ has |r⃗| = 1 exactly for pure states and |r⃗| < 1 for mixed ones, with r⃗ = 0 — the centre — being ρ = I/2, the state that carries no information at all. The Bloch sphere of the qubit page was only the surface of a solid ball, and fig. 1 is what was hiding inside it.

Subsystems become describable. Given a joint state ρAB, the partial trace extracts what A alone looks like:

ρA = TrB( ρAB )

And here is the result that makes this node genuinely surprising rather than merely convenient. Take the Bell state from Q2 — a perfectly known, perfectly pure joint state, purity 1. Trace out either qubit and you get

ρA = ρB = I/2

— the maximally mixed state, the centre of the ball, the state of maximum ignorance. The whole is pure and the parts are random. That is not a limitation of the notation; it is what entanglement is, and no state-vector picture of a single qubit can express it. Mixedness, it turns out, has two sources: classical ignorance about which state was prepared, and quantum entanglement with something you are not looking at. The density matrix cannot tell them apart — which is itself worth sitting with.

generalized byread out viasplits intoevolves undermakes noise visibleQubits & States· State vector |ψ⟩· Bloch sphere surface· Pure states onlyMeasurement· Born rule· Projectors · POVMs· pᵢ = Tr(ρPᵢ)DENSITY MATRICESPartial Trace & Entanglement· ρₐ = Trₖ(ρₐₖ)· Reduced states· Bell state → I/2Quantum Channels· ρ → UρU† (ideal)· ρ → ℰ(ρ) (real)· CPTP · Kraus operatorsNoise & Decoherence· T1, T2 · coherence decayopen this map →builds on / enablesrelies on / runs onleads to
fig. 2 — this node in the graph: it generalizes the state vector, absorbs measurement, and opens the road to channels and noise.

Q4Where is it used?

Wherever a quantum system is not perfectly isolated — which is to say, wherever there is real hardware. An ideal closed system evolves by unitary rotation, and in this language that reads

ρ → U ρ U†

A real one interacts with an environment it is entangled with and cannot track, so the honest description is the more general map

ρ → ℰ(ρ)   a quantum channel: completely positive, trace preserving

and the machinery for writing those maps down — CPTP, Kraus operators — is the next node over. This is also where the coherence terms stop being an abstraction. On a real qubit, T₁ is the timescale on which the diagonal decays toward equilibrium and T₂ the timescale on which the off-diagonal terms decay toward zero — decoherence is literally the off-diagonal entries of ρ going to zero, the Bloch vector shrinking inward in fig. 1 until nothing quantum is left. Every number on a hardware spec sheet about coherence time is a statement about this matrix.

Two more homes. Quantum tomography exists to reconstruct ρ from measurement statistics, which is only a coherent goal because ρ is the complete description of what a real, noisy, possibly-entangled state is. And error correction needs mixed states from the start: a corrupted logical qubit is not a vector, and the whole Noise & Error Correction map is written in this language.

To make it concrete: in Qiskit, build a Bell pair, take the partial trace over one qubit, and print the reduced state. Seeing I/2 come back from a state you know exactly is the moment this node stops being notation.

My open questions

  • What is the cleanest intuition for the off-diagonal terms — is there a picture better than “the phase information lives here”?— chasing
  • How exactly does a pure state become mixed through interaction with an environment — step by step, not just in the limit?— open
  • Why does tracing out part of an entangled pure state produce a mixed state? I can compute it; I can't yet feel it.— the one that nags
  • What is the physical meaning of complete positivity, as opposed to plain positivity?— next node
  • How should I think about the Kraus representation geometrically?— next node
  • At what point does it become more useful to think in states and channels than in individual qubits?— a question about taste, maybe

Explore further

  • Nielsen & Chuang, Quantum Computation and Quantum Information, §2.4 — the density operator, ensembles, and the partial trace, in the order they should be learned— rigor
  • Preskill, Ph219 lecture notes, ch. 2 — “States and Ensembles”; the treatment of why a subsystem of a pure state is mixed is the best I have found— deeper
  • Qiskit — DensityMatrix and partial_trace: build a Bell pair and watch I/2 fall out— hands on
  • Bloch Cubes — useful again here, now for the ball's interior rather than its surface— play

Continue in the graph