DeepPractise
DeepPractise

Pauli-X Gate

Track: Quantum Gates & Circuits · Difficulty: Beginner · Est: 12 min

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

X0=1,X1=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)=αX0+βX1=α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

ψ=350+451.|\psi\rangle = \tfrac{3}{5}|0\rangle + \tfrac{4}{5}|1\rangle.

Apply X:

Xψ=351+450=450+351.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.