Quantum Lab
Quantum Lab

An interactive quantum mechanics learning platform and cryostat wiring co-design tool. From plain-language intuition to formal mathematics.

contact@quantumcircuitsimulator.com

Product

  • Circuit Lab
  • Learn
  • Hardware Studio
  • Pricing

Legal

  • Privacy Policy
  • Terms of Service

© 2026 Quantum Lab. All rights reserved.

This site, including its original quantum simulations, cryostat reference systems, 3D models, and interface design, contains protected proprietary material.

Home/Quantum Physics/Lessons/Pauli-X Gate (NOT)
X

Pauli-X Gate (NOT)

BasicSingle-qubitbit flip

Flips |0⟩ ↔ |1⟩ for the target qubit.

Intuition

The X gate is the quantum version of a classical NOT gate. It swaps the two basis states: if your qubit is in |0⟩, it becomes |1⟩, and vice versa. On the Bloch sphere, this is a 180° rotation around the X axis, flipping the north and south poles. But unlike classical NOT, which only works on definite bits, the X gate acts linearly on superpositions — it swaps the amplitudes of |0⟩ and |1⟩, preserving all quantum information.

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)
Precise explanation

Pauli-X is one of three Pauli operators (X, Y, Z) that form a basis for single-qubit operations. It is a unitary, Hermitian involution (X² = I) with eigenvalues ±1 and eigenstates |+⟩ and |−⟩. In the computational basis, it acts as a bit flip: X(α|0⟩ + β|1⟩) = α|1⟩ + β|0⟩. Combined with controlled operations, it becomes the fundamental building block for CNOT and Toffoli gates.

Observable effect

The measured bit result flips: 0 becomes 1 and 1 becomes 0.

Bloch sphere

Rotates 180° around the X axis. Swaps the north pole (|0⟩) and south pole (|1⟩). Equatorial states on the X axis (|+⟩, |−⟩) are unchanged.

Worked example

Preparing |1⟩ from the default state

  1. 1Start with |0⟩, the default initial state of every qubit.
  2. 2Apply X: the state becomes |1⟩.
  3. 3Measurement gives 1 with certainty.
  4. 4This is how you prepare ancilla qubits in the |1⟩ state for algorithms like Deutsch’s.
Common use cases
  • Initializing qubits to |1⟩ (since hardware starts at |0⟩)
  • Building the CNOT gate — X is the operation applied conditionally
  • Preparing |−⟩ = H|1⟩ by doing X then H
  • Classical reversible logic emulation inside quantum circuits
Relation to other gates
  • X² = I — two bit flips return to the original state
  • HXH = Z — bit flip becomes phase flip in the diagonal basis
  • RX(π) = −iX — a full X-rotation equals X up to global phase
  • CNOT = controlled-X, Toffoli = doubly-controlled-X
Common misconception

The X gate looks simple, but it is not merely classical NOT. When acting on superpositions, it swaps amplitudes rather than flipping a definite bit, and this difference matters in interference.

Why this gate matters

X is the simplest non-trivial gate and the foundation of controlled operations. Understanding it fully — including how it interacts with superposition — is essential before moving to multi-qubit gates.

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