Qubits

ianmcloughlin.github.io linkedin github

Representation

A qubit, like a bit, can take on one of two values when measured.

It is represented by two complex numbers, usually in a \(2 \times 1\) matrix, often called a ket.

Basis

\(|0\rangle = \begin{bmatrix} 1 \\ 0 \end{bmatrix} \qquad |1\rangle = \begin{bmatrix} 0 \\ 1 \end{bmatrix}\)

\(|\psi\rangle = \alpha |0\rangle + \beta |1\rangle\)

As matrices

\(|\psi\rangle = \alpha \begin{bmatrix} 1 \\ 0 \end{bmatrix} + \beta \begin{bmatrix} 0 \\ 1 \end{bmatrix}\)

\(|\psi\rangle = \begin{bmatrix} \alpha \\ \beta \end{bmatrix}\)

\(|\alpha|^2 + |\beta|^2 = 1\)

Probability Amplitudes

\(|\alpha|^2 + |\beta|^2 = 1\)

\(\alpha = \alpha_0 + \alpha_1 i \qquad \beta = \beta_0 + \beta_1 i \qquad \alpha_0,\alpha_1,\beta_0,\beta_1 \in \mathbb{R}\)

\(|\alpha| = \sqrt{\alpha_0^2 + \alpha_1^2}\)

\(|\alpha|^2 = \alpha_0^2 + \alpha_1^2\)

Note:

\(\alpha^* = \alpha_0 - \alpha_1 i\)

\(\alpha \alpha^* = (\alpha_0 + \alpha_1 i)(\alpha_0 - \alpha_1 i) = \alpha_0^2 + \alpha_1^2 = |\alpha|^2\)

\(|\alpha|^2 = \alpha \alpha^* = \alpha^* \alpha\)

Examples

\(|\psi_1\rangle = \begin{bmatrix} \frac{1}{\sqrt{2}} \\ \frac{1}{\sqrt{2}} \end{bmatrix} \qquad \left|\frac{1}{\sqrt{2}}\right|^2 = \left( \frac{1}{\sqrt{2}} \right)^2 = \frac{1}{2} \)

\(|\psi_2\rangle = \begin{bmatrix} \frac{i}{\sqrt{2}} \\ \frac{1}{\sqrt{2}} \end{bmatrix} \qquad \left|\frac{i}{\sqrt{2}}\right|^2 = \left( \frac{1}{\sqrt{2}} \right)^2 = \frac{1}{2} \)

\(|\psi_3\rangle = \begin{bmatrix} \frac{-i}{\sqrt{2}} \\ \frac{-1}{\sqrt{2}} \end{bmatrix} \qquad \left|\frac{-i}{\sqrt{2}}\right|^2 = \left|\frac{-1}{\sqrt{2}}\right|^2 = \frac{1}{2}\)