QuantumCore

Lesson 13 · 60 min · core

Density Operators: Pure vs Mixed

Loading progress…

State vectors describe systems we know completely; real laboratories and subsystems of entangled registers require density operators. Starting from a statistical ensemble {(pi,∣ψi⟩)}\{(p_i,\lvert\psi_i\rangle)\} we derive ρ=∑ipi∣ψi⟩⟨ψi∣\rho=\sum_ip_i\lvert\psi_i\rangle\langle\psi_i\rvert, rewrite the Born rule as P(m)=Tr(Pmρ)P(m)=\mathrm{Tr}(P_m\rho) and expectation values as ⟨A⟩=Tr(Aρ)\langle A\rangle=\mathrm{Tr}(A\rho), characterise density operators by three properties (Hermitian, positive semidefinite, unit trace), prove that purity γ=Trρ2\gamma=\mathrm{Tr}\rho^2 lies in [1/d,1][1/d,1] with γ=1\gamma=1 exactly for pure states, and map every qubit state to a point of the Bloch ball.

Prerequisites: Postulate 4: Composite Systems

Objectives and key results
  • Build the density operator ρ=∑ipi∣ψi⟩⟨ψi∣\rho=\sum_ip_i\lvert\psi_i\rangle\langle\psi_i\rvert of an ensemble and derive P(m)=Tr(Pmρ)P(m)=\mathrm{Tr}(P_m\rho) and ⟨A⟩=Tr(Aρ)\langle A\rangle=\mathrm{Tr}(A\rho) from the ensemble average.

  • Verify the three defining properties ρ=ρ†\rho=\rho^\dagger, ρ⪰0\rho\succeq0, Trρ=1\mathrm{Tr}\rho=1, and reconstruct an ensemble from any such operator via its spectral decomposition.

  • Compute the purity γ=Trρ2\gamma=\mathrm{Tr}\rho^2, prove 1/d≤γ≤11/d\le\gamma\le1, and use γ=1\gamma=1 as the test for a pure state.

  • Convert a qubit density matrix to its Bloch vector rj=Tr(ρσj)r_j=\mathrm{Tr}(\rho\sigma_j) and back, and read off eigenvalues 12(1±∥r⃗∥)\tfrac12(1\pm\lVert\vec r\rVert) and purity 12(1+∥r⃗∥2)\tfrac12(1+\lVert\vec r\rVert^2).

  • Explain why different ensembles can give the same ρ\rho, and why that makes them physically indistinguishable.

definition · Density operator of an ensemble
ρ=∑ipi ∣ψi⟩⟨ψi∣,pi≥0, ∑ipi=1\rho=\sum_i p_i\,\lvert\psi_i\rangle\langle\psi_i\rvert,\qquad p_i\ge0,\ \sum_ip_i=1
formula · Born rule and expectation values for mixed states
P(m)=Tr(Pmρ),⟨A⟩=Tr(Aρ),ρ↦PmρPmTr(Pmρ)P(m)=\mathrm{Tr}(P_m\rho),\qquad \langle A\rangle=\mathrm{Tr}(A\rho),\qquad \rho\mapsto\frac{P_m\rho P_m}{\mathrm{Tr}(P_m\rho)}
theorem · Characterisation of density operators
ρ is a density operator  ⟺  ρ=ρ†,  ρ⪰0,  Tr ρ=1\rho\ \text{is a density operator}\iff\rho=\rho^\dagger,\ \ \rho\succeq0,\ \ \mathrm{Tr}\,\rho=1
theorem · Purity bounds
1d≤γ=Tr ρ2=∑kλk2≤1,γ=1  ⟺  ρ=∣ψ⟩⟨ψ∣\frac1d\le\gamma=\mathrm{Tr}\,\rho^2=\sum_k\lambda_k^2\le1,\qquad \gamma=1\iff\rho=\lvert\psi\rangle\langle\psi\rvert
identity · Bloch-ball form of a qubit
ρ=12(I+rxX+ryY+rzZ)=12(1+rzrx−iryrx+iry1−rz),∥r⃗∥≤1,γ=12(1+∥r⃗∥2)\rho=\tfrac12\big(I+r_xX+r_yY+r_zZ\big)=\tfrac12\begin{pmatrix}1+r_z&r_x-ir_y\\r_x+ir_y&1-r_z\end{pmatrix},\quad \lVert\vec r\rVert\le1,\quad \gamma=\tfrac12\big(1+\lVert\vec r\rVert^2\big)

From ensembles to density operators#

The postulates of Module 1.3 assume that we know the state vector ∣ψ⟩\lvert\psi\rangle exactly. In practice we often know only that the system was prepared in ∣ψ1⟩\lvert\psi_1\rangle with probability p1p_1, in ∣ψ2⟩\lvert\psi_2\rangle with probability p2p_2, and so on: a source that emits ∣0⟩\lvert0\rangle or ∣1⟩\lvert1\rangle depending on an unobserved coin flip, a qubit whose preparation pulse fluctuates, or — most importantly for quantum computing — one qubit of an entangled register, whose partner we ignore (the subject of the next lesson). Such a situation is described by an ensemble {(pi,∣ψi⟩)}i\{(p_i,\lvert\psi_i\rangle)\}_i of normalised states with classical probabilities pi≥0p_i\ge0, ∑ipi=1\sum_ip_i=1. The states ∣ψi⟩\lvert\psi_i\rangle need not be orthogonal and the number of members need not equal the dimension dd.

The goal is a single mathematical object that predicts every measurement statistic of the ensemble. It will turn out to be an operator, not a vector: the density operator.

Definition

Density operator (density matrix)

The density operator of the ensemble {(pi,∣ψi⟩)}\{(p_i,\lvert\psi_i\rangle)\} is ρ=∑ipi∣ψi⟩⟨ψi∣\rho=\sum_ip_i\lvert\psi_i\rangle\langle\psi_i\rvert. In the computational basis its matrix has entries ρrc=⟨r∣ρ∣c⟩=∑ipi ψi,rψi,c‾\rho_{rc}=\langle r\vert\rho\vert c\rangle=\sum_ip_i\,\psi_{i,r}\overline{\psi_{i,c}}. The diagonal entries ρrr\rho_{rr} are called populations and the off-diagonal entries ρrc\rho_{rc} (r≠cr\neq c) coherences. A state with ρ=∣ψ⟩⟨ψ∣\rho=\lvert\psi\rangle\langle\psi\rvert for a single vector is pure; every other density operator is mixed.

Derivation

The trace identity ⟨ψ∣A∣ψ⟩=Tr(A∣ψ⟩⟨ψ∣)\langle\psi\vert A\vert\psi\rangle=\mathrm{Tr}(A\lvert\psi\rangle\langle\psi\rvert)

  1. Step 1:
    Tr(B)=∑k=0d−1⟨k∣B∣k⟩\mathrm{Tr}(B)=\sum_{k=0}^{d-1}\langle k\vert B\vert k\rangle
    Definition of the trace as the sum of diagonal entries in an orthonormal basis {∣k⟩}\{\lvert k\rangle\}.
  2. Step 2:
    Tr(A∣ψ⟩⟨ψ∣)=∑k⟨k∣A∣ψ⟩⟨ψ∣k⟩\mathrm{Tr}\big(A\lvert\psi\rangle\langle\psi\rvert\big)=\sum_k\langle k\vert A\vert\psi\rangle\langle\psi\vert k\rangle
    Insert B=A∣ψ⟩⟨ψ∣B=A\lvert\psi\rangle\langle\psi\rvert and split the sandwich ⟨k∣A∣ψ⟩⟨ψ∣ ∣k⟩\langle k\vert A\lvert\psi\rangle\langle\psi\rvert\,\vert k\rangle into a product of two scalars.
  3. Step 3:
    =∑k⟨ψ∣k⟩⟨k∣A∣ψ⟩=⟨ψ∣(∑k∣k⟩⟨k∣)A∣ψ⟩=\sum_k\langle\psi\vert k\rangle\langle k\vert A\vert\psi\rangle=\langle\psi\vert\Big(\sum_k\lvert k\rangle\langle k\rvert\Big)A\vert\psi\rangle
    Scalars commute, so reorder the two factors; then pull the sum inside (linearity).
  4. Step 4:
    =⟨ψ∣A∣ψ⟩=\langle\psi\vert A\vert\psi\rangle
    Completeness relation ∑k∣k⟩⟨k∣=I\sum_k\lvert k\rangle\langle k\rvert=I. This is the cyclic property Tr(A∣ψ⟩⟨ψ∣)=Tr(⟨ψ∣A∣ψ⟩)\mathrm{Tr}(A\lvert\psi\rangle\langle\psi\rvert)=\mathrm{Tr}(\langle\psi\rvert A\lvert\psi\rangle) with a 1×11\times1 trace.

Result

⟨ψ∣A∣ψ⟩=Tr(A ∣ψ⟩⟨ψ∣) for every operator A\boxed{\langle\psi\vert A\vert\psi\rangle=\mathrm{Tr}\big(A\,\lvert\psi\rangle\langle\psi\rvert\big)\ \text{for every operator }A}
Derivation

Born rule, expectation values and state update from the ensemble average

  1. Step 1:
    P(m∣i)=⟨ψi∣Pm∣ψi⟩P(m\mid i)=\langle\psi_i\vert P_m\vert\psi_i\rangle
    Born rule (measurement postulate) for a projective measurement {Pm}\{P_m\} if the preparation was ∣ψi⟩\lvert\psi_i\rangle.
  2. Step 2:
    P(m)=∑ipi P(m∣i)=∑ipi⟨ψi∣Pm∣ψi⟩P(m)=\sum_ip_i\,P(m\mid i)=\sum_ip_i\langle\psi_i\vert P_m\vert\psi_i\rangle
    Law of total probability over the unobserved label ii.
  3. Step 3:
    =∑ipi Tr(Pm∣ψi⟩⟨ψi∣)=Tr(Pm∑ipi∣ψi⟩⟨ψi∣)=\sum_ip_i\,\mathrm{Tr}\big(P_m\lvert\psi_i\rangle\langle\psi_i\rvert\big)=\mathrm{Tr}\Big(P_m\sum_ip_i\lvert\psi_i\rangle\langle\psi_i\rvert\Big)
    Trace identity just derived, then linearity of the trace and of operator multiplication.
  4. Step 4:
    P(m)=Tr(Pmρ)P(m)=\mathrm{Tr}(P_m\rho)
    Recognise the density operator. The statistics depend on the ensemble only through ρ\rho.
  5. Step 5:
    ⟨A⟩=∑mm P(m)=∑mm Tr(Pmρ)=Tr((∑mmPm)ρ)=Tr(Aρ)\langle A\rangle=\sum_mm\,P(m)=\sum_mm\,\mathrm{Tr}(P_m\rho)=\mathrm{Tr}\Big(\Big(\sum_mmP_m\Big)\rho\Big)=\mathrm{Tr}(A\rho)
    For an observable with spectral decomposition A=∑mmPmA=\sum_mmP_m the mean outcome is ∑mm P(m)\sum_m m\,P(m); linearity of the trace collects the projectors into AA.
  6. Step 6:
    ρm=∑ip(i∣m) Pm∣ψi⟩⟨ψi∣Pm⟨ψi∣Pm∣ψi⟩=∑ipi⟨ψi∣Pm∣ψi⟩P(m)⋅Pm∣ψi⟩⟨ψi∣Pm⟨ψi∣Pm∣ψi⟩\rho_m=\sum_ip(i\mid m)\,\frac{P_m\lvert\psi_i\rangle\langle\psi_i\rvert P_m}{\langle\psi_i\vert P_m\vert\psi_i\rangle}=\sum_i\frac{p_i\langle\psi_i\vert P_m\vert\psi_i\rangle}{P(m)}\cdot\frac{P_m\lvert\psi_i\rangle\langle\psi_i\rvert P_m}{\langle\psi_i\vert P_m\vert\psi_i\rangle}
    After outcome mm, member ii collapses to Pm∣ψi⟩/P(m∣i)P_m\lvert\psi_i\rangle/\sqrt{P(m\mid i)}, and Bayes' rule gives the updated weights p(i∣m)=piP(m∣i)/P(m)p(i\mid m)=p_iP(m\mid i)/P(m).
  7. Step 7:
    ρm=PmρPmTr(Pmρ)\rho_m=\frac{P_m\rho P_m}{\mathrm{Tr}(P_m\rho)}
    The factors ⟨ψi∣Pm∣ψi⟩\langle\psi_i\vert P_m\vert\psi_i\rangle cancel; pull PmP_m out of the sum on both sides.

Result

P(m)=Tr(Pmρ),⟨A⟩=Tr(Aρ),ρ→mPmρPmTr(Pmρ)\boxed{P(m)=\mathrm{Tr}(P_m\rho),\qquad\langle A\rangle=\mathrm{Tr}(A\rho),\qquad\rho\xrightarrow{m}\frac{P_m\rho P_m}{\mathrm{Tr}(P_m\rho)}}

The three defining properties and their converse#

Theorem

Properties of a density operator

Every ensemble density operator ρ=∑ipi∣ψi⟩⟨ψi∣\rho=\sum_ip_i\lvert\psi_i\rangle\langle\psi_i\rvert is (i) Hermitian, ρ=ρ†\rho=\rho^\dagger; (ii) positive semidefinite, ⟨φ∣ρ∣φ⟩≥0\langle\varphi\vert\rho\vert\varphi\rangle\ge0 for all ∣φ⟩\lvert\varphi\rangle (written ρ⪰0\rho\succeq0); (iii) of unit trace, Trρ=1\mathrm{Tr}\rho=1.

Proof (3 steps)
  1. Step 1:
    ρ†=∑ipi‾ (∣ψi⟩⟨ψi∣)†=∑ipi ∣ψi⟩⟨ψi∣=ρ\rho^\dagger=\sum_i\overline{p_i}\,\big(\lvert\psi_i\rangle\langle\psi_i\rvert\big)^\dagger=\sum_ip_i\,\lvert\psi_i\rangle\langle\psi_i\rvert=\rho
    (i) The adjoint is antilinear, pip_i is real, and (∣a⟩⟨b∣)†=∣b⟩⟨a∣(\lvert a\rangle\langle b\rvert)^\dagger=\lvert b\rangle\langle a\rvert, so each projector is self-adjoint.
  2. Step 2:
    ⟨φ∣ρ∣φ⟩=∑ipi⟨φ∣ψi⟩⟨ψi∣φ⟩=∑ipi ∣⟨φ∣ψi⟩∣2≥0\langle\varphi\vert\rho\vert\varphi\rangle=\sum_ip_i\langle\varphi\vert\psi_i\rangle\langle\psi_i\vert\varphi\rangle=\sum_ip_i\,\big\lvert\langle\varphi\vert\psi_i\rangle\big\rvert^2\ge0
    (ii) ⟨ψi∣φ⟩=⟨φ∣ψi⟩‾\langle\psi_i\vert\varphi\rangle=\overline{\langle\varphi\vert\psi_i\rangle}, so each term is a non-negative weight times a squared modulus.
  3. Step 3:
    Tr ρ=∑ipi Tr(∣ψi⟩⟨ψi∣)=∑ipi⟨ψi∣ψi⟩=∑ipi=1\mathrm{Tr}\,\rho=\sum_ip_i\,\mathrm{Tr}\big(\lvert\psi_i\rangle\langle\psi_i\rvert\big)=\sum_ip_i\langle\psi_i\vert\psi_i\rangle=\sum_ip_i=1
    (iii) Linearity of the trace, the trace identity with A=IA=I, and normalisation of each ∣ψi⟩\lvert\psi_i\rangle and of the probabilities.

∎

Theorem

Converse: every such operator comes from an ensemble

If an operator ρ\rho on a dd-dimensional space satisfies ρ=ρ†\rho=\rho^\dagger, ρ⪰0\rho\succeq0 and Trρ=1\mathrm{Tr}\rho=1, then ρ=∑kλk∣ek⟩⟨ek∣\rho=\sum_k\lambda_k\lvert e_k\rangle\langle e_k\rvert is the density operator of the ensemble {(λk,∣ek⟩)}k=1d\{(\lambda_k,\lvert e_k\rangle)\}_{k=1}^d of its eigenvalues and orthonormal eigenvectors. Hence the three properties characterise density operators.

Proof (4 steps)
  1. Step 1:
    ρ=ρ† ⇒ ρ=∑k=1dλk∣ek⟩⟨ek∣,λk∈R, ⟨ek∣el⟩=δkl\rho=\rho^\dagger\ \Rightarrow\ \rho=\sum_{k=1}^d\lambda_k\lvert e_k\rangle\langle e_k\rvert,\quad\lambda_k\in\mathbb R,\ \langle e_k\vert e_l\rangle=\delta_{kl}
    Spectral theorem for Hermitian operators (Module 1.2): real eigenvalues and an orthonormal eigenbasis.
  2. Step 2:
    λk=⟨ek∣ρ∣ek⟩≥0\lambda_k=\langle e_k\vert\rho\vert e_k\rangle\ge0
    Evaluate the positivity condition at ∣φ⟩=∣ek⟩\lvert\varphi\rangle=\lvert e_k\rangle and use orthonormality.
  3. Step 3:
    ∑kλk=∑k⟨ek∣ρ∣ek⟩=Tr ρ=1\sum_k\lambda_k=\sum_k\langle e_k\vert\rho\vert e_k\rangle=\mathrm{Tr}\,\rho=1
    The trace is basis-independent, so compute it in the eigenbasis.
  4. Step 4:
    {(λk,∣ek⟩)} is an ensemble with ∑kλk∣ek⟩⟨ek∣=ρ\{(\lambda_k,\lvert e_k\rangle)\}\ \text{is an ensemble with}\ \sum_k\lambda_k\lvert e_k\rangle\langle e_k\rvert=\rho
    Non-negative weights summing to one attached to normalised vectors: exactly the definition of an ensemble, and its density operator is the spectral decomposition of ρ\rho.

∎

Quick check

Which of these 2×22\times2 matrices is a valid density matrix?

Select one answer

Purity: how mixed is a state?#

Definition

Purity

The purity of ρ\rho is γ(ρ)=Tr ρ2\gamma(\rho)=\mathrm{Tr}\,\rho^2. Because ρ=ρ†\rho=\rho^\dagger, Trρ2=∑r,cρrcρcr=∑r,cρrcρrc‾=∑r,c∣ρrc∣2\mathrm{Tr}\rho^2=\sum_{r,c}\rho_{rc}\rho_{cr}=\sum_{r,c}\rho_{rc}\overline{\rho_{rc}}=\sum_{r,c}\lvert\rho_{rc}\rvert^2, the squared Frobenius norm of the matrix — this is how the engine's purity function computes it without diagonalising.

Theorem

Purity bounds: 1/d≤Trρ2≤11/d\le\mathrm{Tr}\rho^2\le1

For every density operator on a dd-dimensional space, 1d≤γ(ρ)≤1\tfrac1d\le\gamma(\rho)\le1. Moreover γ=1\gamma=1 if and only if ρ\rho is pure, and γ=1d\gamma=\tfrac1d if and only if ρ=I/d\rho=I/d (the maximally mixed state).

Proof (7 steps)
  1. Step 1:
    ρ2=(∑kλk∣ek⟩⟨ek∣)(∑lλl∣el⟩⟨el∣)=∑k,lλkλl∣ek⟩⟨ek∣el⟩⟨el∣=∑kλk2∣ek⟩⟨ek∣\rho^2=\Big(\sum_k\lambda_k\lvert e_k\rangle\langle e_k\rvert\Big)\Big(\sum_l\lambda_l\lvert e_l\rangle\langle e_l\rvert\Big)=\sum_{k,l}\lambda_k\lambda_l\lvert e_k\rangle\langle e_k\vert e_l\rangle\langle e_l\rvert=\sum_k\lambda_k^2\lvert e_k\rangle\langle e_k\rvert
    Spectral decomposition and orthonormality ⟨ek∣el⟩=δkl\langle e_k\vert e_l\rangle=\delta_{kl}.
  2. Step 2:
    γ=Tr ρ2=∑kλk2,λk≥0, ∑kλk=1\gamma=\mathrm{Tr}\,\rho^2=\sum_k\lambda_k^2,\qquad \lambda_k\ge0,\ \sum_k\lambda_k=1
    Trace in the eigenbasis; the constraints on λk\lambda_k come from the converse theorem.
  3. Step 3:
    1=(∑kλk)2=∑kλk2+2∑k<lλkλl ≥ ∑kλk2=γ1=\Big(\sum_k\lambda_k\Big)^2=\sum_k\lambda_k^2+2\sum_{k<l}\lambda_k\lambda_l\ \ge\ \sum_k\lambda_k^2=\gamma
    Expand the square; every cross term λkλl\lambda_k\lambda_l is non-negative. This is the upper bound.
  4. Step 4:
    γ=1  ⟺  λkλl=0  ∀k≠l  ⟺  exactly one λk0≠0\gamma=1\iff\lambda_k\lambda_l=0\ \ \forall k\neq l\iff\text{exactly one }\lambda_{k_0}\neq0
    Equality requires every cross term to vanish (a sum of non-negative terms is zero only if each term is), i.e. at most one non-zero eigenvalue; since ∑λk=1\sum\lambda_k=1 there is exactly one.
  5. Step 5:
    λk0=1 ⇒ ρ=∣ek0⟩⟨ek0∣;ρ=∣ψ⟩⟨ψ∣⇒ρ2=∣ψ⟩⟨ψ∣ψ⟩⟨ψ∣=ρ⇒γ=Trρ=1\lambda_{k_0}=1\ \Rightarrow\ \rho=\lvert e_{k_0}\rangle\langle e_{k_0}\rvert;\qquad \rho=\lvert\psi\rangle\langle\psi\rvert\Rightarrow\rho^2=\lvert\psi\rangle\langle\psi\vert\psi\rangle\langle\psi\rvert=\rho\Rightarrow\gamma=\mathrm{Tr}\rho=1
    The single non-zero eigenvalue must equal 11, so ρ\rho is a rank-one projector (pure); conversely a pure state is idempotent and has purity 11.
  6. Step 6:
    1=(∑k=1d1⋅λk)2≤(∑k=1d12)(∑k=1dλk2)=d γ1=\Big(\sum_{k=1}^d1\cdot\lambda_k\Big)^2\le\Big(\sum_{k=1}^d1^2\Big)\Big(\sum_{k=1}^d\lambda_k^2\Big)=d\,\gamma
    Cauchy–Schwarz inequality in Rd\mathbb R^d for the vectors (1,…,1)(1,\dots,1) and (λ1,…,λd)(\lambda_1,\dots,\lambda_d). Dividing by dd gives the lower bound γ≥1/d\gamma\ge1/d.
  7. Step 7:
    γ=1d  ⟺  (λ1,…,λd)∝(1,…,1)  ⟺  λk=1d ∀k  ⟺  ρ=1dI\gamma=\tfrac1d\iff(\lambda_1,\dots,\lambda_d)\propto(1,\dots,1)\iff\lambda_k=\tfrac1d\ \forall k\iff\rho=\tfrac1dI
    Cauchy–Schwarz is an equality iff the vectors are parallel; with ∑λk=1\sum\lambda_k=1 all eigenvalues equal 1/d1/d, and ∑k1d∣ek⟩⟨ek∣=1dI\sum_k\tfrac1d\lvert e_k\rangle\langle e_k\rvert=\tfrac1dI by completeness.

∎

I2=(120012),γ(I2)=14+14=12=1d\frac I2=\begin{pmatrix}\tfrac12&0\\0&\tfrac12\end{pmatrix},\qquad \gamma\Big(\frac I2\Big)=\tfrac14+\tfrac14=\tfrac12=\frac1d
Maximally mixed qubit I/22×2

For nn qubits d=2nd=2^n, so γ∈[2−n,1]\gamma\in[2^{-n},1]. The quantity 1−γ1-\gamma, the linear entropy, is a quick measure of how mixed a state is; the next lessons refine it into the von Neumann entropy and use it to quantify entanglement. On hardware, decoherence drives a qubit prepared in a pure state towards a mixed state and its purity decreases from 11 towards 12\tfrac12.

Quick check

What is the purity of the maximally mixed two-qubit state I4/4I_4/4?

tolerance ±1e-9

Qubits: the Bloch ball#

Derivation

Every qubit state is ρ=12(I+r⃗⋅σ⃗)\rho=\tfrac12(I+\vec r\cdot\vec\sigma) with ∥r⃗∥≤1\lVert\vec r\rVert\le1

  1. Step 1:
    Tr σj=0,σjσk+σkσj=2δjkI,Tr(σjσk)=2δjk\mathrm{Tr}\,\sigma_j=0,\qquad \sigma_j\sigma_k+\sigma_k\sigma_j=2\delta_{jk}I,\qquad \mathrm{Tr}(\sigma_j\sigma_k)=2\delta_{jk}
    Pauli algebra for σ1=X,σ2=Y,σ3=Z\sigma_1=X,\sigma_2=Y,\sigma_3=Z: traceless, anticommuting, squaring to II; the trace identity follows by taking half the trace of the anticommutator.
  2. Step 2:
    ρ=12(c0I+∑jrjσj),c0,rj∈R\rho=\tfrac12\Big(c_0I+\sum_jr_j\sigma_j\Big),\qquad c_0,r_j\in\mathbb R
    {I,X,Y,Z}\{I,X,Y,Z\} is a basis of the 2×22\times2 matrices that is orthogonal for ⟨A,B⟩=Tr(A†B)\langle A,B\rangle=\mathrm{Tr}(A^\dagger B); Hermitian ρ\rho has real coefficients because the basis elements are Hermitian.
  3. Step 3:
    Trρ=12⋅2c0=c0=1,Tr(ρσj)=12∑krkTr(σkσj)=rj\mathrm{Tr}\rho=\tfrac12\cdot2c_0=c_0=1,\qquad \mathrm{Tr}(\rho\sigma_j)=\tfrac12\sum_kr_k\mathrm{Tr}(\sigma_k\sigma_j)=r_j
    Take traces using the Pauli identities: unit trace fixes c0=1c_0=1, and the Bloch components are the expectation values rj=⟨σj⟩r_j=\langle\sigma_j\rangle.
  4. Step 4:
    ρ=12(1+rzrx−iryrx+iry1−rz) ⇒ rx=2 Re ρ01,  ry=−2 Im ρ01,  rz=ρ00−ρ11\rho=\tfrac12\begin{pmatrix}1+r_z&r_x-ir_y\\r_x+ir_y&1-r_z\end{pmatrix}\ \Rightarrow\ r_x=2\,\mathrm{Re}\,\rho_{01},\ \ r_y=-2\,\mathrm{Im}\,\rho_{01},\ \ r_z=\rho_{00}-\rho_{11}
    Add 12I\tfrac12I, 12rxX\tfrac12r_xX, 12ryY\tfrac12r_yY with Y=(0−ii0)Y=\begin{pmatrix}0&-i\\i&0\end{pmatrix} and 12rzZ\tfrac12r_zZ entry by entry; note ρ01=12(rx−iry)\rho_{01}=\tfrac12(r_x-ir_y).
  5. Step 5:
    (r⃗⋅σ⃗)2=∑j,krjrkσjσk=12∑j,krjrk(σjσk+σkσj)=∥r⃗∥2I(\vec r\cdot\vec\sigma)^2=\sum_{j,k}r_jr_k\sigma_j\sigma_k=\tfrac12\sum_{j,k}r_jr_k(\sigma_j\sigma_k+\sigma_k\sigma_j)=\lVert\vec r\rVert^2I
    Symmetrise the double sum (the coefficient rjrkr_jr_k is symmetric) and use the anticommutator.
  6. Step 6:
    spec(r⃗⋅σ⃗)={+∥r⃗∥,−∥r⃗∥}\mathrm{spec}(\vec r\cdot\vec\sigma)=\{+\lVert\vec r\rVert,-\lVert\vec r\rVert\}
    Its eigenvalues square to ∥r⃗∥2\lVert\vec r\rVert^2 so they are ±∥r⃗∥\pm\lVert\vec r\rVert; being traceless, the two eigenvalues sum to 00, so both signs occur (for r⃗=0\vec r=0 both are 00).
  7. Step 7:
    λ±(ρ)=12(1±∥r⃗∥)\lambda_\pm(\rho)=\tfrac12\big(1\pm\lVert\vec r\rVert\big)
    ρ=12(I+r⃗⋅σ⃗)\rho=\tfrac12(I+\vec r\cdot\vec\sigma) shares eigenvectors with r⃗⋅σ⃗\vec r\cdot\vec\sigma; add 11 and halve.
  8. Step 8:
    ρ⪰0  ⟺  λ−=12(1−∥r⃗∥)≥0  ⟺  ∥r⃗∥≤1\rho\succeq0\iff\lambda_-=\tfrac12\big(1-\lVert\vec r\rVert\big)\ge0\iff\lVert\vec r\rVert\le1
    Positivity is non-negativity of the smaller eigenvalue: qubit states are exactly the points of the closed unit ball.
  9. Step 9:
    γ=λ+2+λ−2=14[(1+∥r⃗∥)2+(1−∥r⃗∥)2]=12(1+∥r⃗∥2)\gamma=\lambda_+^2+\lambda_-^2=\tfrac14\Big[(1+\lVert\vec r\rVert)^2+(1-\lVert\vec r\rVert)^2\Big]=\tfrac12\big(1+\lVert\vec r\rVert^2\big)
    Purity as the sum of squared eigenvalues; the cross terms ±2∥r⃗∥\pm2\lVert\vec r\rVert cancel.

Result

ρ=12(I+r⃗⋅σ⃗),rj=Tr(ρσj),λ±=12(1±∥r⃗∥),γ=12(1+∥r⃗∥2)\boxed{\rho=\tfrac12\big(I+\vec r\cdot\vec\sigma\big),\quad r_j=\mathrm{Tr}(\rho\sigma_j),\quad\lambda_\pm=\tfrac12(1\pm\lVert\vec r\rVert),\quad\gamma=\tfrac12\big(1+\lVert\vec r\rVert^2\big)}

Geometry. Pure states (γ=1\gamma=1) are exactly ∥r⃗∥=1\lVert\vec r\rVert=1: the Bloch sphere of Module 2.1, with r⃗=(sin⁡θcos⁡ϕ,sin⁡θsin⁡ϕ,cos⁡θ)\vec r=(\sin\theta\cos\phi,\sin\theta\sin\phi,\cos\theta) for cos⁡θ2∣0⟩+eiϕsin⁡θ2∣1⟩\cos\tfrac\theta2\lvert0\rangle+e^{i\phi}\sin\tfrac\theta2\lvert1\rangle. Mixed states fill the interior, and the centre r⃗=0\vec r=0 is the maximally mixed state I/2I/2. A mixture pρ1+(1−p)ρ2p\rho_1+(1-p)\rho_2 has Bloch vector pr⃗1+(1−p)r⃗2p\vec r_1+(1-p)\vec r_2 (the map ρ↦r⃗\rho\mapsto\vec r is affine), so mixing moves the point along the chord between the two states — towards the centre.

Worked example. Take ρ=(0.70.2−0.1i0.2+0.1i0.3)\rho=\begin{pmatrix}0.7&0.2-0.1i\\0.2+0.1i&0.3\end{pmatrix}. It is Hermitian (ρ10=ρ01‾\rho_{10}=\overline{\rho_{01}}) with trace 11. Then rx=2 Re(0.2−0.1i)=0.4r_x=2\,\mathrm{Re}(0.2-0.1i)=0.4, ry=−2 Im(0.2−0.1i)=0.2r_y=-2\,\mathrm{Im}(0.2-0.1i)=0.2, rz=0.7−0.3=0.4r_z=0.7-0.3=0.4. So ∥r⃗∥2=0.16+0.04+0.16=0.36\lVert\vec r\rVert^2=0.16+0.04+0.16=0.36, ∥r⃗∥=0.6≤1\lVert\vec r\rVert=0.6\le1 (a valid, mixed state), eigenvalues 12(1±0.6)=0.8, 0.2\tfrac12(1\pm0.6)=0.8,\,0.2, and γ=12(1+0.36)=0.68\gamma=\tfrac12(1+0.36)=0.68. Cross-check with the Frobenius formula: 0.72+0.32+2∣0.2−0.1i∣2=0.49+0.09+2(0.05)=0.680.7^2+0.3^2+2\lvert0.2-0.1i\rvert^2=0.49+0.09+2(0.05)=0.68.

ρ=(0.70.2−0.1i0.2+0.1i0.3)=12(I+0.4X+0.2Y+0.4Z)\rho=\begin{pmatrix}0.7&0.2-0.1i\\0.2+0.1i&0.3\end{pmatrix}=\tfrac12\big(I+0.4X+0.2Y+0.4Z\big)
Worked example ρ2×2

Quick check

Compute the purity γ=Trρ2\gamma=\mathrm{Tr}\rho^2 of ρ=(0.70.2−0.1i0.2+0.1i0.3)\rho=\begin{pmatrix}0.7&0.2-0.1i\\0.2+0.1i&0.3\end{pmatrix}.

tolerance ±0.001

Quick check

A qubit has ρ01=0.1+0.3i\rho_{01}=0.1+0.3i. What is its Bloch component ryr_y?

tolerance ±1e-9

Different ensembles, same density operator#

Derivation

12(∣0⟩⟨0∣+∣1⟩⟨1∣)=12(∣+⟩⟨+∣+∣−⟩⟨−∣)\tfrac12(\lvert0\rangle\langle0\rvert+\lvert1\rangle\langle1\rvert)=\tfrac12(\lvert+\rangle\langle+\rvert+\lvert-\rangle\langle-\rvert)

  1. Step 1:
    12(∣0⟩⟨0∣+∣1⟩⟨1∣)=12[(1000)+(0001)]=(120012)\tfrac12\big(\lvert0\rangle\langle0\rvert+\lvert1\rangle\langle1\rvert\big)=\tfrac12\left[\begin{pmatrix}1&0\\0&0\end{pmatrix}+\begin{pmatrix}0&0\\0&1\end{pmatrix}\right]=\begin{pmatrix}\tfrac12&0\\0&\tfrac12\end{pmatrix}
    Ensemble A: a fair coin chooses ∣0⟩\lvert0\rangle or ∣1⟩\lvert1\rangle. The outer products are the diagonal matrix units.
  2. Step 2:
    ∣±⟩⟨±∣=12(1±1)(1±1)=12(1±1±11)\lvert\pm\rangle\langle\pm\rvert=\tfrac12\begin{pmatrix}1\\\pm1\end{pmatrix}\begin{pmatrix}1&\pm1\end{pmatrix}=\tfrac12\begin{pmatrix}1&\pm1\\\pm1&1\end{pmatrix}
    Outer products of ∣±⟩=12(1,±1)T\lvert\pm\rangle=\tfrac1{\sqrt2}(1,\pm1)^T (real entries, so the bra is the transpose).
  3. Step 3:
    12(∣+⟩⟨+∣+∣−⟩⟨−∣)=14[(1111)+(1−1−11)]=14(2002)=(120012)\tfrac12\big(\lvert+\rangle\langle+\rvert+\lvert-\rangle\langle-\rvert\big)=\tfrac14\left[\begin{pmatrix}1&1\\1&1\end{pmatrix}+\begin{pmatrix}1&-1\\-1&1\end{pmatrix}\right]=\tfrac14\begin{pmatrix}2&0\\0&2\end{pmatrix}=\begin{pmatrix}\tfrac12&0\\0&\tfrac12\end{pmatrix}
    Ensemble B: a fair coin chooses ∣+⟩\lvert+\rangle or ∣−⟩\lvert-\rangle. The coherences ±14\pm\tfrac14 cancel.
  4. Step 4:
    PA(m)=Tr(PmρA)=Tr(PmρB)=PB(m)for every measurementP_A(m)=\mathrm{Tr}(P_m\rho_A)=\mathrm{Tr}(P_m\rho_B)=P_B(m)\quad\text{for every measurement}
    Both ensembles have the same ρ=I/2\rho=I/2, and all statistics are Tr(Pmρ)\mathrm{Tr}(P_m\rho): no experiment can tell which coin was flipped.

Result

12(∣0⟩⟨0∣+∣1⟩⟨1∣)=12(∣+⟩⟨+∣+∣−⟩⟨−∣)=12I\boxed{\tfrac12\big(\lvert0\rangle\langle0\rvert+\lvert1\rangle\langle1\rvert\big)=\tfrac12\big(\lvert+\rangle\langle+\rvert+\lvert-\rangle\langle-\rvert\big)=\tfrac12I}
Proposition

Ensembles related by a unitary mixing give the same state

Write an ensemble as unnormalised vectors ∣ψ~i⟩=pi∣ψi⟩\lvert\tilde\psi_i\rangle=\sqrt{p_i}\lvert\psi_i\rangle, so ρ=∑i∣ψ~i⟩⟨ψ~i∣\rho=\sum_i\lvert\tilde\psi_i\rangle\langle\tilde\psi_i\rvert. If ∣φ~j⟩=∑iuji∣ψ~i⟩\lvert\tilde\varphi_j\rangle=\sum_iu_{ji}\lvert\tilde\psi_i\rangle for a unitary matrix uu (pad the shorter list with zero vectors), then ∑j∣φ~j⟩⟨φ~j∣=ρ\sum_j\lvert\tilde\varphi_j\rangle\langle\tilde\varphi_j\rvert=\rho. (The converse — any two ensembles with the same ρ\rho are related this way — is Theorem 2.6 of Nielsen & Chuang.)

Proof (3 steps)
  1. Step 1:
    ∑j∣φ~j⟩⟨φ~j∣=∑j(∑iuji∣ψ~i⟩)(∑kujk‾⟨ψ~k∣)\sum_j\lvert\tilde\varphi_j\rangle\langle\tilde\varphi_j\rvert=\sum_j\Big(\sum_iu_{ji}\lvert\tilde\psi_i\rangle\Big)\Big(\sum_k\overline{u_{jk}}\langle\tilde\psi_k\rvert\Big)
    Substitute; the bra of ∑iuji∣ψ~i⟩\sum_iu_{ji}\lvert\tilde\psi_i\rangle carries complex-conjugated coefficients.
  2. Step 2:
    =∑i,k(∑jujk‾ uji)∣ψ~i⟩⟨ψ~k∣=∑i,k(u†u)ki ∣ψ~i⟩⟨ψ~k∣=\sum_{i,k}\Big(\sum_j\overline{u_{jk}}\,u_{ji}\Big)\lvert\tilde\psi_i\rangle\langle\tilde\psi_k\rvert=\sum_{i,k}(u^\dagger u)_{ki}\,\lvert\tilde\psi_i\rangle\langle\tilde\psi_k\rvert
    Exchange the finite sums and recognise ∑jujk‾uji=(u†u)ki\sum_j\overline{u_{jk}}u_{ji}=(u^\dagger u)_{ki}.
  3. Step 3:
    =∑i,kδki∣ψ~i⟩⟨ψ~k∣=∑i∣ψ~i⟩⟨ψ~i∣=ρ=\sum_{i,k}\delta_{ki}\lvert\tilde\psi_i\rangle\langle\tilde\psi_k\rvert=\sum_i\lvert\tilde\psi_i\rangle\langle\tilde\psi_i\rvert=\rho
    Unitarity u†u=Iu^\dagger u=I.

∎

The example above is this proposition with u=Hu=H: 12∣±⟩=12(12∣0⟩±12∣1⟩)\sqrt{\tfrac12}\lvert\pm\rangle=\tfrac1{\sqrt2}\big(\sqrt{\tfrac12}\lvert0\rangle\pm\sqrt{\tfrac12}\lvert1\rangle\big). The lesson is conceptual: the density operator, not the ensemble, is the physical state. An ensemble is a story about how ρ\rho was prepared, and many stories — infinitely many for any mixed state — are observationally equivalent. The spectral ensemble of the converse theorem is the distinguished one with orthogonal members and the fewest terms.

Check it numerically. The cell below computes the Bloch vector, purity and eigenvalues of the worked example and verifies the two-ensemble identity.

Pythonrunnable
import numpy as np

rho = np.array([[0.7, 0.2 - 0.1j], [0.2 + 0.1j, 0.3]])
X = np.array([[0, 1], [1, 0]])
Y = np.array([[0, -1j], [1j, 0]])
Z = np.array([[1, 0], [0, -1]])
r = [float(np.real(np.trace(rho @ P))) for P in (X, Y, Z)]
print(np.round(r, 4))
print(round(float(np.real(np.trace(rho @ rho))), 4))
print(np.round(np.linalg.eigvalsh(rho), 4))
ket0, ket1 = np.array([1, 0]), np.array([0, 1])
plus, minus = (ket0 + ket1) / np.sqrt(2), (ket0 - ket1) / np.sqrt(2)
A = 0.5 * (np.outer(ket0, ket0) + np.outer(ket1, ket1))
B = 0.5 * (np.outer(plus, plus) + np.outer(minus, minus))
print(np.allclose(A, B), np.round(B, 4).tolist())

Expected output

[0.4 0.2 0.4]
0.68
[0.2 0.8]
True [[0.5, 0.0], [0.0, 0.5]]

References

  1. M. A. Nielsen and I. L. Chuang, Quantum Computation and Quantum Information, 10th anniversary ed., Cambridge University Press (2010), §2.4 (the density operator), Theorems 2.5 and 2.6, Exercise 2.72 (Bloch sphere for mixed states).
  2. J. Preskill, Lecture Notes for Physics 219: Quantum Computation, Chapter 2 (foundations I: states and ensembles).theory.caltech.edu
  3. J. Watrous, The Theory of Quantum Information, Cambridge University Press (2018), §2.1 (registers, states and density operators).cs.uwaterloo.ca

Hands-on labs

  • Bloch vector and purity of a mixed qubit

    1 step · auto-graded

    Read the Bloch vector r⃗=(rx,ry,rz)\vec r=(r_x,r_y,r_z) with rj=Tr(ρσj)r_j=\mathrm{Tr}(\rho\sigma_j) and the purity γ=Trρ2=12(1+∥r⃗∥2)\gamma=\mathrm{Tr}\rho^2=\tfrac12(1+\lVert\vec r\rVert^2) directly off the entries of a 2×22\times2 density matrix, using the Bloch-ball form ρ=12(I+rxX+ryY+rzZ)\rho=\tfrac12(I+r_xX+r_yY+r_zZ).

    Open lab