QuantumSimulator
Interactive Course
Interactive chapters from intuition to mastery
Structured Lessons
Eight modules with formulas and self-checks
Quantum Brain
Navigate lessons, laws, gates, devices, and tools
Guided Experiments
Hands-on circuits that teach one idea each
Circuit Lab
Build circuits, run them, and see the results
Gate Reference
Quick reference for all quantum gates
Cryostat Studio
3D cryostat design and simulation
Component Catalog
Browse all cryostat components
System Checks
Check your design for errors
Menu
physics
Interactive Course
Interactive chapters from intuition to mastery
Structured Lessons
Eight modules with formulas and self-checks
Quantum Brain
Navigate lessons, laws, gates, devices, and tools
Guided Experiments
Hands-on circuits that teach one idea each
simulator
Circuit Lab
Build circuits, run them, and see the results
Gate Reference
Quick reference for all quantum gates
wiringStudio
Cryostat Studio
3D cryostat design and simulation
Component Catalog
Browse all cryostat components
System Checks
Check your design for errors
Home/Quantum Physics/Lessons/Pauli-X Gate (NOT)
X

Pauli-X Gate (NOT)

BasicSingle-qubitbit flip

Flips a qubit: ∣0⟩ becomes ∣1⟩, and ∣1⟩ becomes ∣0⟩.

Intuition

The X gate swaps ∣0⟩ and ∣1⟩. It is the quantum version of a classical NOT gate. On the Bloch sphere, this is a 180° rotation around the X axis, which swaps the north and south poles. Unlike classical NOT, which flips a definite bit, the X gate acts on superpositions too. If your qubit is in the state α∣0⟩+β∣1⟩, X swaps the amplitudes to give β∣0⟩+α∣1⟩. All quantum information is preserved.

Matrix representation
(01​10​)
Action on states
∣0⟩→∣1⟩,∣1⟩→∣0⟩
Bloch sphere
|0⟩
→
|1⟩
Circuit
q0X
State comparison
Before X Gate
|0⟩
|0\u27E9
100%
|1\u27E9
0%
Bloch: (0.00, 0.00, 1.00)
→
After X Gate
|1⟩
|0\u27E9
0%
|1\u27E9
100%
Bloch: (0.00, 0.00, -1.00)
Full technical statement

Pauli-X is one of three Pauli operators. The Pauli operators (X, Y, Z) are a set of three 2×2 matrices that form a basis for all single-qubit operations and correspond to spin measurements along the three spatial axes. X is unitary (it preserves probability), Hermitian (it equals its own conjugate transpose), and an involution (X² = I, meaning it is its own inverse). Its eigenvalues are +1 and −1. An eigenvalue is the factor by which an eigenstate is scaled when the operator acts on it. The corresponding eigenstates (states unchanged up to that scaling factor) are ∣+⟩=(∣0⟩+∣1⟩)/2​ and |−⟩ = (∣0⟩ − ∣1⟩/2​. In the computational basis, X acts as a bit flip: X(α∣0⟩+β∣1⟩=α∣1⟩+β∣0⟩. Combined with controlled operations, it becomes the building block for CNOT and Toffoli gates.

What changes in measurements

Every measurement outcome flips: 0 becomes 1, and 1 becomes 0.

Bloch sphere

Rotates the Bloch vector 180° around the X axis. The north pole (∣0⟩) and south pole (∣1⟩) swap. States on the X axis (∣+⟩, |−⟩) stay fixed because they are eigenstates of X.

Step-by-step example

Preparing |1⟩ from the default state

  1. 1Start with ∣0⟩. Every qubit begins in this state by default.
  2. 2Apply X. The state becomes ∣1⟩.
  3. 3Measure. The result is 1 with certainty.
  4. 4This is how you initialize helper qubits (ancillas) to ∣1⟩ for algorithms like Deutsch’s.
Where this gate appears
  • Initializing qubits to |1⟩, since hardware starts all qubits at |0⟩
  • Building the CNOT gate, where X is the operation applied conditionally to the target
  • Preparing |−⟩ = H|1⟩ by applying X then H
  • Embedding classical reversible logic inside quantum circuits
Connected gates
  • X² = I — two bit flips cancel out and return the qubit to its original state
  • HXH = Z — when you switch to the diagonal basis using H, a bit flip becomes a phase flip
  • RX(π) = −iX — a full π-rotation around X equals X up to a global phase factor that does not affect measurements
  • CNOT = controlled-X, and Toffoli = doubly-controlled-X, both built from X
Tempting but wrong

It is tempting to think X is just classical NOT with a different name. That sounds right because the truth table matches. What actually happens is that X swaps amplitudes in superpositions, not just definite bits. When a qubit is in a superposition, X rearranges the amplitudes, and that rearrangement affects interference in ways that classical NOT cannot.

Why this gate matters for what comes next

X is the simplest non-trivial quantum gate and the foundation of all controlled operations. Understanding how it acts on superpositions, not just basis states, is the first step toward understanding multi-qubit gates like CNOT.

Test your understanding

What is X|+⟩?

Quick reference →↗ Nielsen and Chuang, Quantum Computation and Quantum Information↗ MIT OCW 8.06: quantum computing notes
Next
Z Gate
→
← Back to all lessons