|q⟩ Bad Qubits

intermediate · Physics · Density Matrices & Mixed States

Properties of ρ

A matrix qualifies as a density operator only if it satisfies three conditions. These conditions are exactly what guarantees it produces sensible probabilities for every possible measurement.

The three defining properties

A density operator ρ\rho on a Hilbert space must be:

  1. Unit trace: Tr⁡(ρ)=1\operatorname{Tr}(\rho) = 1. The trace collects the total probability, so it must equal one.
  2. Hermitian: ρ=ρ†\rho = \rho^{\dagger}. Equivalently ρij=ρji∗\rho_{ij} = \rho_{ji}^*. Hermiticity guarantees real eigenvalues and real expectation values for observables.
  3. Positive semidefinite: ⟨ϕ∣ρ∣ϕ⟩≥0\langle\phi|\rho|\phi\rangle \ge 0 for every ∣ϕ⟩|\phi\rangle. Equivalently, all eigenvalues of ρ\rho are ≥0\ge 0. This makes every measurement probability non-negative.

Conversely, any matrix with these three properties is the density operator of some physical state. This is the complete characterization.

Why each property is forced

Write ρ=∑ipi∣ψi⟩⟨ψi∣\rho = \sum_i p_i |\psi_i\rangle\langle\psi_i|. The probability of obtaining outcome ∣ϕ⟩|\phi\rangle is ⟨ϕ∣ρ∣ϕ⟩=∑ipi∣⟨ϕ∣ψi⟩∣2\langle\phi|\rho|\phi\rangle = \sum_i p_i |\langle\phi|\psi_i\rangle|^2. Because each pi≥0p_i \ge 0 and each ∣⟨ϕ∣ψi⟩∣2≥0|\langle\phi|\psi_i\rangle|^2 \ge 0, the sum is non-negative — positivity. Each ∣ψi⟩⟨ψi∣|\psi_i\rangle\langle\psi_i| is Hermitian and the pip_i are real, so ρ\rho is Hermitian. And Tr⁡(∣ψi⟩⟨ψi∣)=⟨ψi∣ψi⟩=1\operatorname{Tr}\big(|\psi_i\rangle\langle\psi_i|\big) = \langle\psi_i|\psi_i\rangle = 1, so Tr⁡(ρ)=∑ipi=1\operatorname{Tr}(\rho) = \sum_i p_i = 1.

The eigenvalue picture

Because ρ\rho is Hermitian, the spectral theorem diagonalizes it:

ρ=∑kλk ∣k⟩⟨k∣,λk≥0,∑kλk=1.\rho = \sum_k \lambda_k\, |k\rangle\langle k|, \qquad \lambda_k \ge 0, \quad \sum_k \lambda_k = 1.

The eigenvalues {λk}\{\lambda_k\} are themselves a probability distribution. So every density operator is a mixture of orthonormal pure states (its eigenvectors) with weights given by its eigenvalues — its spectral decomposition. This is the canonical, ambiguity-free ensemble hiding inside ρ\rho.

Try it

Build ρ=12∣0⟩⟨0∣+12∣+⟩⟨+∣\rho = \tfrac12|0\rangle\langle0| + \tfrac12|+\rangle\langle+| and check all three properties. Return true only if the trace is 11, the matrix is Hermitian, and both eigenvalues are non-negative.

Run your code to see the quantum state.

Sign in on the full site to ask questions and join the discussion.