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/density_matrices_and_partial_trace.ipynb](https://github.com/montekkundan/quantum-code/blob/main/notebooks/by_concept/density_matrices_and_partial_trace.ipynb)
> - [qcourse/density.py](https://github.com/montekkundan/quantum-code/blob/main/qcourse/density.py)
> - [tests/test_states_density_entanglement.py](https://github.com/montekkundan/quantum-code/blob/main/tests/test_states_density_entanglement.py)
[TODO: add video - Density Matrices and Partial Trace]
## What This Concept Is
Statevectors are elegant, but they are not the whole story. The moment you want to describe a subsystem of a larger entangled system, or a system with classical preparation uncertainty, you need the [[quantum/Glossary#Density matrix|density matrix]] formalism.
This formalism is not an optional add-on for later noise lectures. It is the correct language whenever "the whole state" is not available or not relevant. The [[quantum/Glossary#Partial trace|partial trace]] is the operation that lets you move from a full joint description to the reduced description of one subsystem.
## Foundation Terms You Need First
A [[quantum/Glossary#Density matrix|density matrix]] describes both pure states and mixed states. A [[quantum/Glossary#Reduced density matrix|reduced density matrix]] is the state of a subsystem obtained from a larger joint state. The [[quantum/Glossary#Partial trace|partial trace]] is the operation that produces that reduced description.
The conceptual order matters here: whole-system description first, subsystem description second. The reduced state is not guessed from local measurements alone. It is computed from the joint state by tracing out what you choose to ignore.
## How The Idea Actually Works
If a pure state is written as $|\psi\rangle$, then its density matrix is
$
\rho = |\psi\rangle \langle \psi |.
$
This already shows one advantage of the formalism: pure states fit inside it naturally. Mixed states then appear as probabilistic combinations of such projectors, but the density-matrix language handles both with one set of tools.
Now consider a bipartite system $AB$. Even if the joint state $\rho_{AB}$ is pure, the state of subsystem $A$ is not generally pure. It is given by:
$
\rho_A = \mathrm{Tr}_B(\rho_{AB}).
$
That trace over subsystem $B$ is not just bookkeeping. It is the mathematical expression of "ignore or discard subsystem $B$." This is why entanglement is so important: a globally pure entangled state can produce a locally mixed reduced state after the partial trace.
This is one of the deepest lessons in the early course. Mixedness is not always classical ignorance about preparation. It can also arise because your system is only part of a larger entangled whole.
## Worked Example: Bell Pair Partial Trace
Start with
$
|\Phi^+\rangle=\frac{|00\rangle+|11\rangle}{\sqrt2}.
$
The joint density matrix is
$
\rho_{AB}=\frac12\left(|00\rangle\langle00|+|00\rangle\langle11|+|11\rangle\langle00|+|11\rangle\langle11|\right).
$
Trace out Bob. Terms survive only when Bob's ket and bra labels match:
$
\mathrm{Tr}_B(|00\rangle\langle00|)=|0\rangle\langle0|,
\qquad
\mathrm{Tr}_B(|11\rangle\langle11|)=|1\rangle\langle1|.
$
The cross terms vanish because $\langle1|0\rangle=\langle0|1\rangle=0$. Therefore
$
\rho_A=\frac12|0\rangle\langle0|+\frac12|1\rangle\langle1|=\frac{I}{2}.
$
The global state is pure, but Alice's local state is maximally mixed. That is not because Alice is missing a classical note from the source. It is because Alice's qubit is entangled with Bob's.
## Source Reading Lens
Use `qclec.pdf` Lecture 6 for density matrices and Lecture 11 for the entanglement interpretation. Read this before entropy: the partial trace is the bridge between a joint state and every later reduced-state quantity.
## Why It Matters
- It is the right mathematical language for subsystems, noise, and decoherence.
- It explains why local observers can see mixed states even when the universe's description is pure on a larger space.
- It prepares you for entanglement entropy, PPT tests, and error-correction noise models later.
## Related Questions
> [!question] Why not just keep using statevectors forever?
>> [!answer] Statevectors describe pure states of a whole closed system. Density matrices also describe mixtures, open-system noise, and subsystem states obtained by tracing out part of a larger entangled state.
> [!question] What does the partial trace mean physically?
>> [!answer] It is the formal operation for discarding or ignoring a subsystem. The result predicts every measurement statistic available to an observer who can access only the remaining subsystem.
> [!question] Why can the reduced state of one qubit in a Bell pair be maximally mixed?
>> [!answer] The global Bell state is pure, but neither qubit alone has a definite pure state. Tracing out the partner leaves $\rho = I/2$, meaning local measurements are uniformly random even though the joint state has perfect structure.
## Additional Study Notes
**Check yourself: local state from unequal Schmidt weights** For $\sqrt{2/3}|10\rangle-\sqrt{1/3}|01\rangle$, Alice's reduced state is $\frac13\begin{bmatrix}1&0\\0&2\end{bmatrix}$. Alice is in $|0\rangle$ with weight $1/3$ and $|1\rangle$ with weight $2/3$ after Bob is traced out.
**Check yourself: local unitaries do not change the other side** If Bob applies a Hadamard to his qubit, Alice's reduced density matrix stays the same. A local unitary on Bob's subsystem cannot change Alice's local state.
**Key fact: reduced states predict local measurements** Once you have $\rho_A$, it contains all statistics for measurements Alice can perform alone. Information about joint correlations is lost when Bob is traced out.
**Question: Why do off-diagonal terms sometimes disappear under a partial trace?** Terms survive the trace over Bob only when Bob's basis labels match in bra and ket. Cross terms with orthogonal Bob labels vanish, which is why many entangled pure states produce diagonal local density matrices.
## Study Checks
Use these after the explanation, not before it.
### Quick Checks
- What does the partial trace compute? **Answer:** It computes the reduced density matrix of a subsystem by tracing out the subsystem being ignored.
- MCQ: What is the reduced state of one qubit of a Bell pair? A. $|0\rangle\langle0|$ B. $|1\rangle\langle1|$ C. $I/2$ D. The original Bell state **Answer:** C. I/2.
- MCQ: Which condition must a valid density matrix satisfy? A. Trace one and positive semidefinite B. Trace zero and negative eigenvalues C. Nonunitary always D. Only diagonal entries allowed **Answer:** A. Trace one and positive semidefinite.
### Oral Exam Anchors
> [!question] Oral exam anchor
> Compute the reduced state of one qubit of a Bell pair and explain the result.
A good answer should say:
Start with
|Phi+> = (|00> + |11>) / sqrt(2).
The density matrix is
rho_AB = (1/2)(|00><00| + |00><11| + |11><00| + |11><11|).
Trace out Bob. The terms |00><00| and |11><11| survive as |0><0| and |1><1| on Alice's system. The cross terms vanish because Bob's labels are orthogonal:
<1|0> = 0 and <0|1> = 0.
Therefore
rho_A = (1/2)|0><0| + (1/2)|1><1| = I/2.
The global Bell state is pure, but either qubit alone is maximally mixed. This mixedness is not merely classical ignorance about preparation; it comes from looking at one subsystem of a larger entangled state.
## Practical Lab
Use this lab to get comfortable with reduced-state workflows before they become unavoidable.
- Construct a Bell-state density matrix and take the partial trace over one qubit.
- Construct a classically mixed two-qubit state and compare its reduced description against the Bell-state reduction.
- Compute purity and eigenvalues for the reduced states and explain what they tell you.
## Homework
Tie the matrix formalism back to physical interpretation.
- Compute a reduced density matrix by hand for a simple bipartite pure state.
- Explain what the partial trace means physically and not just algebraically.
- State one reason density matrices are necessary even if you already know statevectors.
## 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).