Dirac notation
February 2, 2025
Dirac notation is a compact language for quantum states and operators.
Kets, bras, and inner products
A state vector is written as a ket:
If you choose a basis , you can expand a qubit state as
where are complex amplitudes.
The conjugate-transpose (Hermitian adjoint) of a ket is a bra:
In matrix terms:
- behaves like a column vector
- behaves like a row vector
Multiplying a bra by a ket gives an inner product:
You will often see written with the middle bars “merged” into a single bar; this is where the word bra-ket comes from.
Operators acting on states
Linear maps (matrices) are written as operators, such as . Applying an operator to a ket is written as
This is simply “matrix times vector,” producing a new ket.
It is also common to take an inner product after applying an operator:
Read this as: start with , apply , then take the inner product with .
Expectation values (a common pattern)
When is an observable (Hermitian operator), the expected value in state is
This expression shows up everywhere in quantum computing: energies, measurement statistics, and algorithm analysis.
Basis states, wavefunctions, and “resolution of the identity”
One common source of confusion is that the same notation is used both for:
- the inner product between two abstract states, and
- the components of a state in a particular basis.
Discrete basis (finite or countable)
If is an orthonormal basis, then the coefficients
are just the components of in that basis, and you can reconstruct the state as
This motivates the identity operator:
Continuous basis (position as an example)
For position, the basis is labeled by a continuous variable (or in 3D). The wavefunction is defined by
and its complex conjugate is
The “sum over basis states” becomes an integral:
Accordingly, the identity operator is written as
This is called a resolution of the identity. It means: if you insert this operator anywhere, it does nothing—but it lets you rewrite abstract expressions in a concrete basis.
Why operators are not “just chilling” in
The operator acts on the ket first, producing a new state . Then the bra takes an inner product with that new state.
If you insert a resolution of the identity in the position basis, you get a more familiar-looking integral:
When is diagonal in the basis (for example, the position operator ), this reduces to the classical-looking form:
So the operator is absolutely doing work—it is what connects the abstract state to the measurable quantity you care about.
Tensor products
Multi-qubit kets use the tensor product symbol (often omitted in writing):
Operators on separate qubits combine as Kronecker products .
Projectors and measurement
A projective measurement can be described using projectors onto orthogonal subspaces. For example, the projector onto on a single qubit is .