Bra-ket notation

Also known as: Dirac notation

On this page 7

Bra-ket notation, also called Dirac notation, is the standard mathematical shorthand for writing quantum states, their duals and the operators that act on them, using angle brackets such as |ψ⟩ and ⟨φ|. In quantum computing, it is the everyday language for describing qubits, superposition, measurement probabilities and gate operations, because it expresses vectors in a Hilbert space without committing to a particular matrix representation.

Introduced by Paul Dirac in 1939, the notation splits the word bracket into two halves: the ket |ψ⟩ represents a state vector, and the bra ⟨φ| represents its dual, a linear functional. Joining them produces a bracket ⟨φ|ψ⟩, the inner product, which is the source of every probability amplitude in quantum theory.

Kets, bras and brackets

A ket |ψ⟩ is a column vector of complex numbers that describes a quantum state. For a single qubit, the two computational basis states are written |0⟩ and |1⟩, corresponding to the column vectors (1, 0) and (0, 1). Any pure qubit state is a linear combination α|0⟩ + β|1⟩, where α and β are complex amplitudes.

A bra ⟨ψ| is the conjugate transpose of the matching ket: a row vector whose entries are the complex conjugates of the ket entries. This step matters because amplitudes are complex, and only the conjugate guarantees that the squared length of a state is a real, non-negative number.

SymbolNameMathematical objectMeaning in quantum computing
|ψ⟩KetColumn vectorA quantum state
⟨ψ|BraRow vector, conjugate transposeDual of a state
⟨φ|ψ⟩Bracket or inner productComplex numberProbability amplitude
|ψ⟩⟨φ|Outer productMatrix (operator)Projector or transition operator
⟨φ|A|ψ⟩Matrix elementComplex numberOperator entry or expectation value
Core objects of Dirac notation

Inner products, normalization and the Born rule

The inner product ⟨φ|ψ⟩ measures how much one state overlaps with another. Its squared magnitude |⟨φ|ψ⟩|² gives the probability that a system prepared in |ψ⟩ is found in |φ⟩ upon measurement, which is the Born rule expressed in a single line.

Every physical state must be normalized, meaning ⟨ψ|ψ⟩ = 1. For a qubit α|0⟩ + β|1⟩ this condition becomes |α|² + |β|² = 1, so the measurement probabilities always sum to one. Two states are orthogonal when ⟨φ|ψ⟩ = 0, which means they can be distinguished perfectly by a single measurement.

The same formalism describes measurement in any basis, not only the computational one. Measuring in the Hadamard basis {|+⟩, |−⟩} simply means computing |⟨+|ψ⟩|² and |⟨−|ψ⟩|². This basis independence is the main reason physicists prefer Dirac notation over explicit vectors: a ket names the state itself, while a column of numbers depends on the chosen basis and must be recalculated whenever the basis changes.

ExpressionResultInterpretation
⟨0|0⟩1Normalized basis state
⟨0|1⟩0Orthogonal basis states
⟨0|+⟩ with |+⟩ = (|0⟩ + |1⟩)/√21/√2Probability 1/2 of outcome 0
⟨+|−⟩0Plus and minus states are orthogonal
Worked inner products for one qubit

Operators, gates and outer products

Operators act on kets from the left: U|ψ⟩ is the state after applying gate U. Quantum gates are unitary operators, satisfying U†U = I, which preserves normalization. The dagger symbol † denotes the Hermitian adjoint, the operator counterpart of turning a ket into a bra.

The outer product |ψ⟩⟨φ| builds operators directly from states. For example, the Pauli X gate is |0⟩⟨1| + |1⟩⟨0|, which swaps the basis states, and |0⟩⟨0| is the projector onto outcome 0. The completeness relation Σ|i⟩⟨i| = I lets practitioners insert a basis anywhere in a calculation, which is one of the most useful tricks in the notation.

GateDirac formEffect
Pauli X|0⟩⟨1| + |1⟩⟨0|Bit flip
Pauli Z|0⟩⟨0| − |1⟩⟨1|Phase flip on |1⟩
Hadamard|+⟩⟨0| + |−⟩⟨1|Creates equal superposition
CNOT|0⟩⟨0| ⊗ I + |1⟩⟨1| ⊗ XFlips target when control is 1
Common gates written in Dirac notation

Multi-qubit states and tensor products

Multi-qubit systems combine single-qubit spaces through the tensor product, written |a⟩ ⊗ |b⟩ and usually shortened to |a⟩|b⟩ or |ab⟩. A register of n qubits lives in a space of dimension 2ⁿ, so the shorthand |101⟩ stands for a single basis vector among eight in a three-qubit register.

Entangled states show the compactness of the notation. The Bell state (|00⟩ + |11⟩)/√2 fits on one line, yet it cannot be factored into a product of two single-qubit kets, which is the formal definition of quantum entanglement. Writing the same state as a four-element column vector hides that structure.

Mixed states use the density matrix ρ = Σ pᵢ|ψᵢ⟩⟨ψᵢ|, a weighted sum of outer products. Expectation values then follow from the trace formula ⟨A⟩ = Tr(ρA), which reduces to ⟨ψ|A|ψ⟩ for a pure state.

Large registers also reveal a practical benefit. A uniform superposition of ten qubits requires 1,024 amplitudes as a column vector, yet Dirac notation writes it as a short sum over all bit strings with a single normalization factor of 1/32. Algorithm descriptions such as Grover search and the quantum Fourier transform rely on this compact summation form.

Common mistakes when reading Dirac notation

Most errors with bra-ket notation come from forgetting complex conjugation or misreading the order of factors. Experienced practitioners check these points automatically.

  • The bra of a sum conjugates coefficients: the bra of α|0⟩ + β|1⟩ is α*⟨0| + β*⟨1|.
  • `⟨φ|ψ⟩` and `⟨ψ|φ⟩` differ: they are complex conjugates, not equal numbers.
  • `|ψ⟩⟨φ|` is not a number but an operator, while ⟨φ|ψ⟩ is a scalar.
  • A global phase is unobservable: |ψ⟩ and e^(iθ)|ψ⟩ describe the same physical state, but a relative phase between terms is physical.
  • Qubit ordering conventions vary: some software lists the least significant qubit first, which changes how |01⟩ maps to hardware.

Stripped to the essentials

Bra-ket notation is a short way to write down quantum states. A ket looks like |0⟩ and names a state. A bra looks like ⟨0| and is its mirror image.

When a bra meets a ket, they form a bracket. The bracket gives a number that tells how alike two states are. Square that number and you get a probability. It works like a compact grammar: a few symbols replace long tables of numbers.

Where it is applied

A software engineer is learning to program a cloud quantum processor and builds a two-qubit circuit with a Hadamard gate followed by a CNOT. Instead of multiplying four-by-four matrices, she tracks the state in Dirac notation: |00⟩ becomes (|0⟩ + |1⟩)|0⟩/√2 after the Hadamard, and then (|00⟩ + |11⟩)/√2 after the CNOT.

From the final ket she reads the prediction directly: outcomes 00 and 11 each with probability 1/2, and never 01 or 10. She runs 1,000 shots on the device and sees roughly 500 results of each expected outcome, plus a few percent of 01 and 10 caused by gate and readout errors. The notation lets her separate the ideal prediction from hardware noise in minutes, and the same symbols appear in the documentation of every major quantum software framework.