DeepPractise
DeepPractise
Quantum Gates & Circuits

Pauli-X Gate

Beginner 12 min 1 prerequisite

Pauli-X Gate

Overview

The first named gate to learn is Pauli-X (often just “X”).

It is the closest single-qubit gate to a classical NOT:

  • it swaps ∣0⟩|0\rangle and ∣1⟩|1\rangle.

But because it is a quantum gate, it also acts sensibly on superpositions. This page builds both the basis-state intuition and the Bloch-sphere picture.

Intuition

In the Bloch-sphere picture:

  • ∣0⟩|0\rangle is the +zz direction (north pole).
  • ∣1⟩|1\rangle is the −zz direction (south pole).

The X gate flips those two poles. So it acts like a 180° rotation that sends +zz to −zz.

It also flips any state’s Bloch vector accordingly. If a state points somewhere on the sphere, X rotates it to the opposite point across the xx-axis rotation.

A key idea:

  • gates don’t just change probabilities; they can change the direction of a superposition on the sphere.

Formal Description

Action on basis states

The defining action is

X∣0⟩=∣1⟩,X∣1⟩=∣0⟩.X|0\rangle = |1\rangle,\qquad X|1\rangle = |0\rangle.

By linearity, this already tells you what X does to any superposition. For example, if

∣ψ⟩=α∣0⟩+β∣1⟩,|\psi\rangle = \alpha|0\rangle + \beta|1\rangle,

then

X∣ψ⟩=X(α∣0⟩+β∣1⟩)=αX∣0⟩+βX∣1⟩=α∣1⟩+β∣0⟩.X|\psi\rangle = X(\alpha|0\rangle + \beta|1\rangle) = \alpha X|0\rangle + \beta X|1\rangle = \alpha|1\rangle + \beta|0\rangle.

So X swaps the amplitudes associated with ∣0⟩|0\rangle and ∣1⟩|1\rangle.

Minimal matrix form (introduced gently)

If we write states as coordinate vectors in the computational basis, X can be represented by a 2×2 matrix.

We choose the basis vectors as

∣0⟩≡(10),∣1⟩≡(01).|0\rangle \equiv \begin{pmatrix}1\\0\end{pmatrix},\qquad |1\rangle \equiv \begin{pmatrix}0\\1\end{pmatrix}.

The unique matrix that sends ∣0⟩|0\rangle to ∣1⟩|1\rangle and ∣1⟩|1\rangle to ∣0⟩|0\rangle is

X=(0110).X = \begin{pmatrix} 0 & 1\\ 1 & 0 \end{pmatrix}.

Read the matrix as “swap the two components.”

Worked Example

Take the state

∣ψ⟩=35∣0⟩+45∣1⟩.|\psi\rangle = \tfrac{3}{5}|0\rangle + \tfrac{4}{5}|1\rangle.

Apply X:

X∣ψ⟩=35∣1⟩+45∣0⟩=45∣0⟩+35∣1⟩.X|\psi\rangle = \tfrac{3}{5}|1\rangle + \tfrac{4}{5}|0\rangle = \tfrac{4}{5}|0\rangle + \tfrac{3}{5}|1\rangle.

So the probabilities in the computational basis are swapped:

  • before: P(0)=9/25P(0)=9/25, P(1)=16/25P(1)=16/25
  • after: P(0)=16/25P(0)=16/25, P(1)=9/25P(1)=9/25

Bloch-sphere interpretation:

  • X flips the state across a 180° rotation about the xx axis.

Turtle Tip

Turtle Tip

To learn a gate quickly, memorize what it does to ∣0⟩|0\rangle and ∣1⟩|1\rangle, then use linearity to handle any superposition.

Common Pitfalls

Common Pitfalls
  • Don’t think X “measures and flips.” X is not measurement; it is deterministic evolution.
  • Don’t assume X always “makes randomness.” It only swaps amplitudes; whether outcomes look random depends on the state and the measurement basis.

Quick Check

Quick Check
  1. If ∣ψ⟩=α∣0⟩+β∣1⟩|\psi\rangle = \alpha|0\rangle + \beta|1\rangle, what is X∣ψ⟩X|\psi\rangle?
  2. Geometrically on the Bloch sphere, what kind of rotation is X?

What’s Next

X is the “bit-flip-like” Pauli gate. Next we study Pauli-Z, which leaves computational-basis probabilities unchanged but changes relative phase—a deeply quantum effect.