Table of Contents

Dirac notation

Dirac notation (or bra-ket notation) is a convenient way to name vectors in a Hilbert space $\mathcal{H}$ (via “kets”) and its dual space $\mathcal{H}^*$ (via “bras”). Kets are written as $\lvert\text{ket}\rangle$ and bras are written as $\langle\text{bra}\rvert$. The text inside a bra or ket has no intrinsic meaning — it is simply a label, much like naming a variable in programming.

Kets

A ket $\lvert\psi\rangle$ represents a column vector in a Hilbert space. For qubits, the Hilbert space is $\mathbb{C}^2$, so kets are column vectors of two complex numbers $a, b \in \mathbb{C}$.

$$\lvert\psi\rangle = \begin{pmatrix}a\\b\end{pmatrix}$$

Any label can be placed inside a ket: $\lvert 0\rangle$, $\lvert 1\rangle$, $\lvert +\rangle$, $\lvert\psi\rangle$, $\lvert\text{cat}\rangle$, or even $\lvert 42\rangle$. The conventional labels $\lvert 0\rangle$ and $\lvert 1\rangle$ for the computational basis states are just names for the following column vectors.

$$\lvert 0\rangle = \begin{pmatrix}1\\0\end{pmatrix}\qquad \lvert 1\rangle = \begin{pmatrix}0\\1\end{pmatrix}$$

Bras

A bra $\langle\psi\rvert$ is the conjugate transpose (Hermitian adjoint) of the corresponding ket $\lvert\psi\rangle$. If $\lvert\psi\rangle$ is a column vector, then $\langle\psi\rvert$ is the corresponding row vector with complex-conjugated entries.

$$\lvert\psi\rangle = \begin{pmatrix}a\\b\end{pmatrix}\qquad \langle\psi\rvert = \begin{pmatrix}a^* & b^*\end{pmatrix}$$

Inner product

The bra-ket (bracket) $\langle\phi\vert\psi\rangle$ is the inner product of $\lvert\phi\rangle$ with $\lvert\psi\rangle$. For qubits it is the standard complex dot product.

$$\langle\phi\vert\psi\rangle = \begin{pmatrix}c^* & d^*\end{pmatrix}\begin{pmatrix}a\\b\end{pmatrix} = c^*a + d^*b$$

The inner product of a state with itself gives the squared norm. Normalized qubit states satisfy $\langle\psi\vert\psi\rangle = |a|^2 + |b|^2 = 1$.

Outer product

The ket-bra $\lvert\psi\rangle\langle\psi\rvert$ is the outer product, which is a matrix. It is used to define projection operators and density matrices.

$$\lvert 0\rangle\langle 0\rvert = \begin{pmatrix}1\\0\end{pmatrix}\begin{pmatrix}1 & 0\end{pmatrix} = \begin{pmatrix}1 & 0\\ 0 & 0\end{pmatrix}$$