Paul Dirac introduced a notation so compact and suggestive that it has become the universal language of
quantum mechanics. This lesson makes the bra, the ket, and their pairing precise.
Kets are vectors
A ket∣ψ⟩ is just a vector in a Hilbert space H. The symbol inside the
angle bracket is a label — it can be a name (∣ψ⟩), a number (∣0⟩, ∣1⟩), or any
identifier convenient for the problem. In Cn a ket is a column vector, for example
∣0⟩=(10),∣1⟩=(01).
A general single-qubit state is a complex linear combination ∣ψ⟩=α∣0⟩+β∣1⟩.
Bras are linear functionals
Every ket ∣ψ⟩ has a partner called a bra, written ⟨ψ∣. The bra is the
conjugate transpose of the ket: where the ket is a column vector, the bra is the row vector of
complex conjugates,
∣ψ⟩=(αβ)⟹⟨ψ∣=(αβ).
A bra is a machine that eats a ket and outputs a complex number — a linear functional. We will say
much more about this dual nature in the next lesson.
The bra-ket is the inner product
Placing a bra next to a ket and merging the two vertical bars gives a bra-ket, which is exactly the
inner product:
⟨ϕ∣ψ⟩=⟨ϕ∣∣ψ⟩=(row vector)×(column vector).
For ∣ϕ⟩=(γδ) and
∣ψ⟩=(αβ) this is
⟨ϕ∣ψ⟩=γα+δβ.
The notation makes the inner-product axioms visually obvious. Conjugate symmetry,
⟨ϕ∣ψ⟩=⟨ψ∣ϕ⟩, is the statement that swapping
row and column and conjugating recovers the same number's conjugate.
Orthonormality in bra-ket form
The computational basis is orthonormal:
⟨0∣0⟩=1,⟨1∣1⟩=1,⟨0∣1⟩=⟨1∣0⟩=0,
compactly ⟨i∣j⟩=δij with the Kronecker delta. Using this, the amplitude of
∣0⟩ in ∣ψ⟩=α∣0⟩+β∣1⟩ is extracted by a single bra-ket:
⟨0∣ψ⟩=α⟨0∣0⟩+β⟨0∣1⟩=α.
The equal superposition ∣+⟩
A state you will meet constantly is
∣+⟩=21(∣0⟩+∣1⟩)=21(11).
It has equal amplitude 1/2 on both basis kets, so ∣⟨0∣+⟩∣2=∣⟨1∣+⟩∣2=1/2:
measuring it yields 0 or 1 with equal probability. The Hadamard gate produces it from ∣0⟩,
H∣0⟩=∣+⟩, which is what you will build below.
Try it
Prepare the ket ∣+⟩=21(∣0⟩+∣1⟩) on one qubit and return the
circuit. The grader checks the full statevector, so both amplitudes must equal 1/2.
Run your code to see the quantum state.
Sign in on the full site to ask questions and join the discussion.