This note is part of [[quantum/Practical Quantum Information System]].
> [!info] Course code
> Use the companion repository for this lecture's runnable lab, helper functions, and regression checks:
> - [notebooks/by_concept/pure_vs_mixed_states.ipynb](https://github.com/montekkundan/quantum-code/blob/main/notebooks/by_concept/pure_vs_mixed_states.ipynb)
> - [qcourse/density.py](https://github.com/montekkundan/quantum-code/blob/main/qcourse/density.py)
> - [tests/test_expanded_course_primitives.py](https://github.com/montekkundan/quantum-code/blob/main/tests/test_expanded_course_primitives.py)
[TODO: add video - Pure vs. Mixed States]
## What This Concept Is
Imagine two experiments that give you the same computational-basis outcome frequencies. In one experiment the system is truly in a coherent superposition. In the other, someone flips a classical coin and prepares one basis state or another. Those two situations can look similar in one measurement basis and still represent fundamentally different physics.
That is the pure-versus-mixed-state distinction. A [[quantum/Glossary#Pure state|pure state]] is a complete quantum description. A [[quantum/Glossary#Mixed state|mixed state]] is a statistical or reduced description. The difference is not cosmetic. It changes which tools work, how entanglement is quantified, and how you interpret uncertainty.
## Foundation Terms You Need First
A [[quantum/Glossary#Pure state|pure state]] can be written as one ket or one rank-1 projector. A [[quantum/Glossary#Mixed state|mixed state]] is described by a [[quantum/Glossary#Density matrix|density matrix]] with more than one nonzero eigenvalue in general. [[quantum/Glossary#Decoherence|Decoherence]] is one common physical route by which pure-state coherence is lost from the point of view of a subsystem.
The beginner-safe rule is this: "mixed" does not simply mean "messy." It means the full information available at the chosen description level is no longer captured by one statevector alone.
## How The Idea Actually Works
A pure state has a density matrix of the form
$
\rho = |\psi\rangle \langle \psi |.
$
Such a state has purity $\mathrm{Tr}(\rho^2)=1$ and, in finite dimensions, rank 1. A mixed state is instead written as
$
\rho = \sum_k p_k |\psi_k\rangle \langle \psi_k |,
$
where the coefficients $p_k$ form a classical probability distribution.
The most important conceptual mistake here is to confuse superposition with mixture. The state $|+\rangle = (|0\rangle + |1\rangle)/\sqrt{2}$ and the classical 50-50 mixture of $|0\rangle$ and $|1\rangle$ have the same diagonal probabilities in the computational basis, but their density matrices differ. The pure superposition has off-diagonal coherence terms. The mixture does not.
Those off-diagonal terms are why a later basis change can reveal interference for the pure state but not for the classical mixture. This is the cleanest way to see that "same immediate measurement statistics" does not imply "same physical state."
Mixed states also arise naturally as reduced states of larger entangled systems. So the word mixed does not always mean "classical ignorance about preparation." Sometimes it means "you are looking only at part of a larger quantum whole."
## Worked Example: Same Z Statistics, Different State
Compare these two density matrices:
$
|+\rangle\langle+|=\frac12
\begin{bmatrix}
1&1\\
1&1
\end{bmatrix},
\qquad
\rho_{\text{mix}}=\frac12|0\rangle\langle0|+\frac12|1\rangle\langle1|=
\frac12
\begin{bmatrix}
1&0\\
0&1
\end{bmatrix}.
$
Both give $P(0)=P(1)=1/2$ if measured immediately in the computational basis. Now apply a Hadamard before measuring. The pure state $|+\rangle$ becomes $|0\rangle$, so the result is deterministic. The mixture stays maximally mixed, so the result remains 50-50. The difference was hidden in the off-diagonal entries.
This is the operational test students should remember: if a later basis change can reveal interference, the state had coherence rather than only classical randomness.
## Source Reading Lens
Use `qclec.pdf` Lecture 6 for the density-matrix formalism and the meaning of tracing out part of a larger system. Pair it with the discussion style of *Quantum Computing since Democritus*: Aaronson repeatedly emphasizes that quantum mechanics is not ordinary probability with unfamiliar notation. The pure-versus-mixed distinction is one exact place where that warning becomes a matrix calculation.
## Why It Matters
- It keeps you from treating all uncertainty as the same kind of uncertainty.
- It is the foundation for density matrices, decoherence, and open-system reasoning.
- It clarifies why entropy statements must be handled carefully once states stop being globally pure.
## Related Questions
> [!question] How can two states have the same measurement probabilities but still be different states?
>> [!answer] Measurement in one basis only sees part of the density matrix. A coherent superposition and an incoherent mixture can have the same diagonal entries in that basis, but differ in off-diagonal coherence terms that later basis changes can reveal.
> [!question] Is a mixed state always ignorance about how the system was prepared?
>> [!answer] No. A mixed state can represent classical preparation uncertainty, but it can also be the reduced state of one subsystem of a larger pure entangled state. In that case the mixedness comes from ignoring the other subsystem.
> [!question] What is the fastest purity check for a finite-dimensional density matrix?
>> [!answer] Compute $\mathrm{Tr}(\rho^2)$. A pure state has $\mathrm{Tr}(\rho^2)=1$. A mixed state has $\mathrm{Tr}(\rho^2)<1$.
## Additional Study Notes
**Check yourself: mixed-state decompositions** The matrix $\begin{bmatrix}3/4&-1/4\\-1/4&1/4\end{bmatrix}$ can be produced by preparing $|0\rangle$ half the time and $|-\rangle$ half the time. The off-diagonal negative entries come from the $|-\rangle$ component.
**Check yourself: complex coherence** An equal mixture of $|0\rangle$ and $(|0\rangle+i|1\rangle)/\sqrt{2}$ has density matrix $\frac14\begin{bmatrix}3&-i\\ i&1\end{bmatrix}$. The signs come from the ket-bra product, where the bra conjugates $i$ to $-i$.
**Key fact: one density matrix can have many ensembles** A mixed state is not the same thing as a unique list of pure states with probabilities. Different preparation ensembles can lead to the same density matrix and therefore the same measurement statistics.
**Question: Why is a 50-50 mixture of $|0\rangle$ and $|1\rangle$ not the same state as $|+\rangle$?** They give the same computational-basis probabilities, but their density matrices differ. $|+\rangle\langle+|$ has off-diagonal coherence terms, while the mixture $\frac12|0\rangle\langle0|+\frac12|1\rangle\langle1|$ has none.
## Study Checks
Use these after the explanation, not before it.
### Quick Checks
- MCQ: Which condition identifies a pure density matrix in finite dimension? A. Tr(rho)=0 B. Tr(rho^2)=1 C. det(rho)=1 always D. all off-diagonal entries vanish **Answer:** B. Tr(rho^2)=1.
- What is the density matrix of a pure state $|\psi\rangle$? **Answer:** rho = |psi><psi|.
- MCQ: What distinguishes $|+\rangle\langle+|$ from the 50-50 mixture of $|0\rangle$ and $|1\rangle$? A. Their Z-basis probabilities B. Their normalization C. Their off-diagonal coherence terms D. Their dimension **Answer:** C. Their off-diagonal coherence terms.
- What is the main conceptual warning about mixed states? **Answer:** Mixedness can represent classical preparation uncertainty, but it can also arise from tracing out part of a larger entangled pure state.
### Oral Exam Anchors
> [!question] Oral exam anchor
> Explain the difference between superposition and mixture using density matrices.
A good answer should say:
A superposition is a pure quantum state such as |+> = (|0>+|1>)/sqrt(2). Its density matrix is
|+><+| = (1/2) [[1, 1], [1, 1]].
A 50-50 mixture of |0> and |1> is
rho = (1/2)|0><0| + (1/2)|1><1| = (1/2) [[1, 0], [0, 1]].
Both states give the same probabilities in the computational basis, but they are physically different. The pure superposition has off-diagonal coherence terms. Those terms can produce interference after a basis change. The mixture has no such coherence, so a later Hadamard does not turn it into a deterministic outcome.
## Practical Lab
Run a side-by-side comparison between coherent superposition and classical mixture so the distinction becomes operational.
- Build $|+\rangle$ and a 50-50 mixture of $|0\rangle$ and $|1\rangle$ in density-matrix form.
- Compare their matrix entries, especially the off-diagonal coherence terms.
- Classify each state by rank, purity, and eigenvalues, and then explain why only one of them still supports interference.
## Homework
Use the homework to make the language precise rather than intuitive only.
- Define a pure state and a mixed state using density matrices.
- Give one example where two states share the same computational-basis probabilities but are physically different.
- Explain why a reduced state of an entangled system can be mixed even when the global state is pure.
## References
- Scott Aaronson, [Introduction to Quantum Information Science](https://www.scottaaronson.com/qclec.pdf), Lecture 6.
- [[Resources]]
- QuTiP documentation, [main docs](https://qutip.org/).
- IBM Quantum Learning, [learning portal](https://quantum.cloud.ibm.com/learning/en).