2. Linear Algebra: Matrices
Matrices
That's the correct progression. If vectors are the states of a quantum system, then matrices are the operations we perform on those states.
In Quantum Computing, a single-qubit quantum gate is represented by a $2 \times 2$ matrix. When you apply a gate to a qubit, you perform standard matrix-vector multiplication.
$$|\psi'\rangle = U |\psi\rangle$$Where $U$ is the matrix (the gate) and $|\psi\rangle$ is the state vector.
⚛️ Key Gate: The Pauli-X (Quantum NOT)
The most fundamental operation is the Pauli-X gate, often simply called $X$. This is the quantum equivalent of the classical NOT gate, which flips the bit: $0 \leftrightarrow 1$.
The matrix for the $X$ gate is:
$$X = \begin{pmatrix} 0 & 1 \\ 1 & 0 \end{pmatrix}$$You can verify that:
- $X|0\rangle = \begin{pmatrix} 0 & 1 \\ 1 & 0 \end{pmatrix} \begin{pmatrix} 1 \\ 0 \end{pmatrix} = \begin{pmatrix} 0 \\ 1 \end{pmatrix} = |1\rangle$
- $X|1\rangle = \begin{pmatrix} 0 & 1 \\ 1 & 0 \end{pmatrix} \begin{pmatrix} 0 \\ 1 \end{pmatrix} = \begin{pmatrix} 1 \\ 0 \end{pmatrix} = |0\rangle$
Your Task: Applying $X$ to Superposition
Let's test the linearity. Consider a superposition state $|\psi\rangle$ where the chance of being $|0\rangle$ or $|1\rangle$ is equal. Its normalized vector is:
$$|\psi\rangle = \frac{1}{\sqrt{2}}\begin{pmatrix} 1 \\ 1 \end{pmatrix}$$Calculate the resulting state, $|\psi'\rangle$, when you apply the $X$ gate to $|\psi\rangle$. What is the final column vector?