← Quantum Computing
Quantum Computing

Pauli-X Gate

The Pauli-X gate is the quantum NOT gate, flipping |0> to |1> and vice versa via a 180-degree rotation around the X axis

Source: mortalapps.com
TL;DR
  • The Pauli-X gate is the quantum equivalent of the classical NOT gate.
  • Its matrix representation is [[0, 1], [1, 0]].
  • It swaps the amplitudes of the |0⟩ and |1⟩ states.
  • Geometrically, it is a 180-degree (π radians) rotation around the X-axis of the Bloch sphere.
  • The eigenstates of the X gate are |+⟩ and |-⟩.
  • Applying the X gate twice returns the qubit to its original state (X^2 = I).

Why This Matters

The Pauli-X Gate, often simply called the X gate, is the quantum analogue of the classical NOT gate. It is one of the most fundamental operations in quantum computing, responsible for flipping the state of a qubit. If a qubit is in the state $|0\rangle$, the X gate transforms it to $|1\rangle$, and if it is in $|1\rangle$, the gate transforms it to $|0\rangle$. Beyond this simple bit-flip behavior, the X gate acts on superpositions in unique ways, making it a vital tool for constructing quantum algorithms and error-correction protocols.

Core Intuition

Imagine a standard household light switch. It has two states: OFF ($|0\rangle$) and ON ($|1\rangle$). Flipping the switch changes it from OFF to ON, or from ON to OFF. The Pauli-X gate is this exact flipping action. However, because it is a quantum gate, it can also act on a switch that is in a 'superposition' of being both ON and OFF at the same time. If you flip a coin that is already face-up, it becomes face-down; the X gate is the quantum hand that flips the coin, regardless of its starting state.

Visualization

Open interactive version ↗

Pauli-X Gate Bloch Sphere Rotation Shows that X gate is a 180° rotation around the X-axis of the Bloch sphere.

Technical Explanation

The Pauli-X Gate is represented by the unitary matrix: $X = \begin{pmatrix} 0 & 1 \\ 1 & 0 \end{pmatrix}$. When applied to the basis states $|0\rangle = \begin{pmatrix} 1 \\ 0 \end{pmatrix}$ and $|1\rangle = \begin{pmatrix} 0 \\ 1 \end{pmatrix}$, we see the bit-flip action explicitly: $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$, and $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$. For an arbitrary state $|\psi\rangle = \alpha|0\rangle + \beta|1\rangle$, applying the X gate swaps the amplitudes: $X|\psi\rangle = \beta|0\rangle + \alpha|1\rangle$. Geometrically, the X gate corresponds to a rotation of $\pi$ radians (180 degrees) around the X-axis of the Bloch sphere. Its eigenvalues are $\lambda = \pm 1$, with corresponding eigenstates $|+\rangle = \frac{|0\rangle + |1\rangle}{\sqrt{2}}$ (eigenvalue +1) and $|-\rangle = \frac{|0\rangle - |1\rangle}{\sqrt{2}}$ (eigenvalue -1). Because $|+\rangle$ lies directly on the X-axis, rotating it 180 degrees around the X-axis leaves it completely unchanged, which is why it is an eigenstate with eigenvalue +1.

Key Takeaways

The Pauli-X gate is the quantum equivalent of the classical NOT gate.
Its matrix representation is [[0, 1], [1, 0]].
It swaps the amplitudes of the |0⟩ and |1⟩ states.
Geometrically, it is a 180-degree (π radians) rotation around the X-axis of the Bloch sphere.
The eigenstates of the X gate are |+⟩ and |-⟩.
Applying the X gate twice returns the qubit to its original state (X^2 = I).