|q⟩ Bad Qubits

intermediate · Physics · Hilbert Spaces & Dirac Formalism

Outer Products and Projectors

If a bra-ket ⟨ϕ∣ψ⟩\langle\phi|\psi\rangle multiplies a row by a column to give a number, what happens when we multiply a column by a row? We get an operator — the outer product — and the most important operators built this way are projectors.

The outer product

The outer product of ∣ϕ⟩|\phi\rangle with ⟨ψ∣\langle\psi| is written ∣ϕ⟩⟨ψ∣|\phi\rangle\langle\psi|. In Cn\mathbb{C}^n it is a column times a row, producing an n×nn \times n matrix:

∣ϕ⟩⟨ψ∣=(ϕ1⋮ϕn)(ψ1‾⋯ψn‾)=(ϕ1ψ1‾⋯ϕ1ψn‾⋮⋮ϕnψ1‾⋯ϕnψn‾).|\phi\rangle\langle\psi| = \begin{pmatrix} \phi_1 \\ \vdots \\ \phi_n \end{pmatrix} \begin{pmatrix} \overline{\psi_1} & \cdots & \overline{\psi_n} \end{pmatrix} = \begin{pmatrix} \phi_1\overline{\psi_1} & \cdots & \phi_1\overline{\psi_n} \\ \vdots & & \vdots \\ \phi_n\overline{\psi_1} & \cdots & \phi_n\overline{\psi_n} \end{pmatrix}.

It is an operator: acting on a ket ∣χ⟩|\chi\rangle it gives ∣ϕ⟩⟨ψ∣χ⟩=(⟨ψ∣χ⟩) ∣ϕ⟩|\phi\rangle\langle\psi|\chi\rangle = (\langle\psi|\chi\rangle)\,|\phi\rangle — the vector ∣ϕ⟩|\phi\rangle scaled by the number ⟨ψ∣χ⟩\langle\psi|\chi\rangle.

Projectors

A projector is the outer product of a normalized ket with its own bra:

Pψ=∣ψ⟩⟨ψ∣,⟨ψ∣ψ⟩=1.P_\psi = |\psi\rangle\langle\psi|, \qquad \langle\psi|\psi\rangle = 1.

Two defining properties make it a projector.

Idempotence. Applying it twice is the same as applying it once:

Pψ2=∣ψ⟩⟨ψ∣ψ⟩⟨ψ∣=∣ψ⟩(1)⟨ψ∣=Pψ,P_\psi^2 = |\psi\rangle\langle\psi|\psi\rangle\langle\psi| = |\psi\rangle (1) \langle\psi| = P_\psi,

because ⟨ψ∣ψ⟩=1\langle\psi|\psi\rangle = 1. Once you have projected, projecting again changes nothing.

Hermiticity. It equals its own conjugate transpose, Pψ†=PψP_\psi^\dagger = P_\psi, since (∣ψ⟩⟨ψ∣)†=∣ψ⟩⟨ψ∣(|\psi\rangle\langle\psi|)^\dagger = |\psi\rangle\langle\psi|. Hermitian idempotent operators are exactly the orthogonal projectors.

Projectors and the completeness relation

The completeness relation from the previous lesson is a sum of projectors onto the basis states:

∑k∣ek⟩⟨ek∣=∑kPek=I.\sum_k |e_k\rangle\langle e_k| = \sum_k P_{e_k} = I.

Each PekP_{e_k} projects onto one basis direction, and together they reconstruct the whole identity — a complete, non-overlapping decomposition of the space.

Expectation values and the Born rule

The expectation value of a projector in a state ∣ψ⟩|\psi\rangle is a probability. For Pϕ=∣ϕ⟩⟨ϕ∣P_\phi = |\phi\rangle\langle\phi|,

⟨ψ∣Pϕ∣ψ⟩=⟨ψ∣ϕ⟩⟨ϕ∣ψ⟩=∣⟨ϕ∣ψ⟩∣2.\langle\psi|P_\phi|\psi\rangle = \langle\psi|\phi\rangle\langle\phi|\psi\rangle = |\langle\phi|\psi\rangle|^2.

This is exactly the Born-rule probability of finding the system, prepared in ∣ψ⟩|\psi\rangle, to be in state ∣ϕ⟩|\phi\rangle. Measurement in quantum mechanics is described by a set of orthogonal projectors summing to the identity; the probability of each outcome is the expectation value of the corresponding projector.

Worked example

Let ∣ψ⟩=cos⁡(θ/2) ∣0⟩+sin⁡(θ/2) ∣1⟩|\psi\rangle = \cos(\theta/2)\,|0\rangle + \sin(\theta/2)\,|1\rangle with θ=π/3\theta = \pi/3. The projector onto ∣0⟩|0\rangle is P0=∣0⟩⟨0∣P_0 = |0\rangle\langle 0|, and

⟨ψ∣P0∣ψ⟩=∣⟨0∣ψ⟩∣2=cos⁡2(θ/2)=cos⁡2(π/6).\langle\psi|P_0|\psi\rangle = |\langle 0|\psi\rangle|^2 = \cos^2(\theta/2) = \cos^2(\pi/6).

Since cos⁡(π/6)=3/2\cos(\pi/6) = \sqrt{3}/2, the probability is (3/2)2=3/4=0.75(\sqrt{3}/2)^2 = 3/4 = 0.75.

Try it

This is a numerical exercise — your code should return a number, not a circuit. For the state above with θ=π/3\theta = \pi/3, compute ⟨ψ∣P0∣ψ⟩\langle\psi|P_0|\psi\rangle, the probability of measuring outcome 0.

Run your code to see the quantum state.

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