# Density matrices and subsystems {#density}

**Learning goals.** Represent mixtures, calculate partial traces, test physical density matrices, and use entropy and fidelity with explicit conventions.

## The density operator

For a pure state, define $\rho=|\psi\rangle\langle\psi|$. If
$|\psi\rangle=\alpha|0\rangle+\beta|1\rangle$, then

$$\rho=\begin{pmatrix}
|\alpha|^2&\alpha\beta^*\\
\beta\alpha^*&|\beta|^2
\end{pmatrix}.$$

For a preparation choosing states $|\psi_j\rangle$ with classical probabilities $p_j$,

$$\rho=\sum_jp_j|\psi_j\rangle\langle\psi_j|.$$

This is an average of outer products, not an average ket. A valid density operator is Hermitian, positive semidefinite, and trace one. Positivity means $\langle v|\rho|v\rangle\ge0$ for all vectors. The eigenvalues are probabilities in an eigenstate mixture.

The Born rule and unitary evolution become

$$p(m)=\operatorname{Tr}(P_m\rho),\qquad
\rho\longmapsto U\rho U^\dagger.$$

The trace identity $\operatorname{Tr}(AB)=\operatorname{Tr}(BA)$ explains why the formula agrees with $\langle\psi|P_m|\psi\rangle$ for a pure state.

## Coherence is basis dependent

Compare

$$\rho_+=|+\rangle\langle+|=\frac12\begin{pmatrix}1&1\\1&1\end{pmatrix},
\qquad
\rho_\mathrm{mix}=\frac12|0\rangle\langle0|+\frac12|1\rangle\langle1|
=\frac12\begin{pmatrix}1&0\\0&1\end{pmatrix}.$$

Both have Z probabilities $1/2,1/2$. But
$\operatorname{Tr}(|+\rangle\langle+|\rho_+)=1$, while the same expression for the mixture is $1/2$. The off-diagonal terms in the Z representation encode coherence between the Z alternatives.

The mixture has many ensemble decompositions:
$I/2=(|+\rangle\langle+|+|-\rangle\langle-|)/2$ as well.
No local measurement can reveal which of these preparation stories occurred if only the density operator is available. A density operator summarizes the statistics, not a unique hidden list of constituent pure states [@watrous].

## Bloch ball and purity

Every qubit density operator has the form

$$\rho=\frac{I+xX+yY+zZ}{2}
=\frac12\begin{pmatrix}1+z&x-iy\\x+iy&1-z\end{pmatrix}.$$

Its eigenvalues are $(1\pm r)/2$, where $r=\sqrt{x^2+y^2+z^2}$. Positivity requires $r\le1$. Pure states lie on the sphere; mixed states lie inside the ball. The center is $I/2$, which is not a pure state with zero amplitudes.

Purity is

$$\operatorname{Tr}(\rho^2)=\frac{1+r^2}{2}.$$

It equals one exactly for pure states. For a general $D$-dimensional system it lies between $1/D$ and one. Purity alone does not characterize every aspect of a state's usefulness.

## Partial trace: forgetting access, not measuring a hidden value

Let $|\Psi\rangle=\sum_{a,b}c_{ab}|a\rangle_A|b\rangle_B$. The state available to A is

$$\rho_A=\operatorname{Tr}_B|\Psi\rangle\langle\Psi|,
\qquad (\rho_A)_{aa'}=\sum_bc_{ab}c_{a'b}^*.$$

Derive this by expanding the joint outer product:

$$\rho_{AB}=\sum_{a,b,a',b'}c_{ab}c_{a'b'}^*
|a\rangle\langle a'|\otimes|b\rangle\langle b'|.$$

The trace of $|b\rangle\langle b'|$ is $\delta_{bb'}$, which eliminates terms with different environment indices. We sum matching indices, not all entries of the matrix.

For a Bell pair,

$$\rho_{AB}=\tfrac12(
|00\rangle\langle00|+|00\rangle\langle11|
+|11\rangle\langle00|+|11\rangle\langle11|).$$

The two cross terms vanish under $\operatorname{Tr}_B$ because
$\operatorname{Tr}(|0\rangle\langle1|)=0$. Hence $\rho_A=I/2$.
The joint state is pure, but each subsystem is mixed. A local mixed state need not reflect ordinary ignorance about an independently existing local pure state.

**Worked partial trace.** For
$|\chi\rangle=(|00\rangle+2i|01\rangle+2|10\rangle)/3$,

$$\rho_A=\frac19\begin{pmatrix}5&2\\2&4\end{pmatrix},\qquad
\rho_B=\frac19\begin{pmatrix}5&-2i\\2i&4\end{pmatrix}.$$

For example $(\rho_A)_{01}=c_{00}c_{10}^*+c_{01}c_{11}^*
=(1/3)(2/3)+(2i/3)(0)=2/9$.
Their purities both equal $(25+4+4+16)/81=49/81$, as required for the reductions of a bipartite pure state.

::: {.lab #lab-entanglement}
**Laboratory L07 — Entanglement and partial trace.** Edit all four complex amplitudes of two qubits. Inspect both reduced matrices, their Bloch vectors, purity, entropy, and pure-state concurrence. Compare a Bell state with a product having the same Z distribution on each subsystem.
:::

## Schmidt coefficients and entropy

The singular-value decomposition of the coefficient matrix gives the Schmidt form

$$|\Psi\rangle=\sum_j\sqrt{\lambda_j}|u_j\rangle_A|v_j\rangle_B,
\qquad \lambda_j\ge0,\quad\sum_j\lambda_j=1.$$

The $\lambda_j$ are the nonzero eigenvalues of both reduced density matrices. One nonzero Schmidt coefficient means a product state. More than one means entanglement for a pure joint state.

Von Neumann entropy is
$S(\rho)=-\operatorname{Tr}(\rho\log_2\rho)
=-\sum_j\lambda_j\log_2\lambda_j$.
For a bipartite pure state, $S(\rho_A)=S(\rho_B)$ quantifies entanglement. For a mixed joint state, local entropy alone is not an entanglement measure. A classically correlated mixture of 00 and 11 also has locally maximally mixed states.

## Distinguishability and generalized measurements

Our fidelity convention is the **squared** convention:

$$F(\rho,\sigma)=
\left(\operatorname{Tr}\sqrt{\sqrt\rho\,\sigma\sqrt\rho}\right)^2.$$

For two pure states it is $|\langle\psi|\phi\rangle|^2$.
Some papers use its square root; compare definitions before comparing numbers. Trace distance is
$D(\rho,\sigma)=\tfrac12\|\rho-\sigma\|_1$, where the trace norm sums singular values. It bounds the difference in probability assigned to any measurement event.

A generalized measurement, or POVM, consists of positive operators $E_m$ summing to I, with $p(m)=\operatorname{Tr}(E_m\rho)$. Effects specify outcome probabilities, but not the full postmeasurement state. For that one needs measurement operators $M_m$ or an instrument, with $E_m=M_m^\dagger M_m$ and conditioned state $M_m\rho M_m^\dagger/p(m)$. Several instruments can realize the same POVM.

## Exercises

:::: {.exercise #ex06-1}
**6.1.** Find $\rho$ for the recurring single-qubit example.

::: {.solution}

$\rho=\frac1{13}\begin{pmatrix}4&-6i\\6i&9\end{pmatrix}$.
Its determinant is $(36-36)/169=0$, trace one, and purity one.
:::

::::

:::: {.exercise #ex06-2}
**6.2.** Is $\begin{pmatrix}1/2&3/4\\3/4&1/2\end{pmatrix}$ physical?

::: {.solution}

No. It is Hermitian with trace one, but eigenvalues are $5/4,-1/4$. Positivity is a separate requirement.
:::

::::

:::: {.exercise #ex06-3}
**6.3.** Reduce $\sqrt{3/4}|00\rangle+\sqrt{1/4}|11\rangle$.

::: {.solution}

Each reduction is $\operatorname{diag}(3/4,1/4)$, purity $5/8$, and entropy $h_2(1/4)\approx0.8113$ bits. The off-diagonal joint terms vanish under the trace.
:::

::::

:::: {.exercise #ex06-4}
**6.4.** Explain why a locally maximally mixed state does not prove joint entanglement.

::: {.solution}

Both the Bell state and the separable mixture
$(|00\rangle\langle00|+|11\rangle\langle11|)/2$ have reduction $I/2$. Joint coherences or correlations in additional bases are needed.
:::

::::

:::: {.exercise #ex06-5}
**6.5.** Calculate fidelity of $|0\rangle$ with $|+\rangle$, and of $|0\rangle$ with $I/2$.

::: {.solution}

Both equal $1/2$ in the squared convention. Fidelity with a pure target is $\langle0|\rho|0\rangle$.
:::

::::

