A comprehensive reference for quantum gate matrix representations and their effects on qubit states.
X
The Pauli-X gate performs a bit flip operation, equivalent to a classical NOT gate.
|0⟩ → |1⟩, |1⟩ → |0⟩
Y
The Pauli-Y gate performs a bit and phase flip operation.
|0⟩ → i|1⟩, |1⟩ → -i|0⟩
Z
The Pauli-Z gate performs a phase flip operation.
|0⟩ → |0⟩, |1⟩ → -|1⟩
H
The Hadamard gate creates superposition by rotating the qubit state.
|0⟩ → (|0⟩ + |1⟩)/√2, |1⟩ → (|0⟩ - |1⟩)/√2
S
The S gate applies a π/2 phase shift.
|0⟩ → |0⟩, |1⟩ → i|1⟩
S†
The S† (S-dagger) gate applies a -π/2 phase shift.
|0⟩ → |0⟩, |1⟩ → -i|1⟩
T
The T gate applies a π/4 phase shift.
|0⟩ → |0⟩, |1⟩ → e^(iπ/4)|1⟩
T†
The T† (T-dagger) gate applies a -π/4 phase shift.
|0⟩ → |0⟩, |1⟩ → e^(-iπ/4)|1⟩
RX(θ)
The RX gate rotates the qubit around the X-axis by angle θ.
Rotates qubit state around X-axis
RY(θ)
The RY gate rotates the qubit around the Y-axis by angle θ.
Rotates qubit state around Y-axis
RZ(θ)
The RZ gate rotates the qubit around the Z-axis by angle θ.
Rotates qubit state around Z-axis
CNOT
The Controlled-NOT gate flips the target qubit if the control qubit is |1⟩.
|00⟩ → |00⟩, |01⟩ → |01⟩, |10⟩ → |11⟩, |11⟩ → |10⟩
CZ
The Controlled-Z gate applies a phase flip to the target qubit if the control qubit is |1⟩.
|00⟩ → |00⟩, |01⟩ → |01⟩, |10⟩ → |10⟩, |11⟩ → -|11⟩
SWAP
The SWAP gate exchanges the states of two qubits.
|01⟩ ↔ |10⟩, other states unchanged
All quantum gates are unitary operations, meaning they preserve the norm of quantum states and are reversible.
U†U = I (where U† is the conjugate transpose)
When multiple gates are applied sequentially, their effects are combined through matrix multiplication.
|ψ⟩ → U₂U₁|ψ⟩ (U₁ applied first, then U₂)
Visit the Playground to see these gates in action with real-time matrix multiplication visualization.
Go to Playground