QUANTUM 04
Pauli, phase, and Hadamard gates as matrices and rotations, plus CNOT
Sinclair College - Dr. Mike Libassi
TODAY
01 · GATES AS MATRICES
Quantum gates are unitary: they can always be run backward, so no information is ever destroyed.
02 · THE CATALOG
| Gate | Matrix | What it does | Bloch rotation |
|---|---|---|---|
| X | [[0, 1], [1, 0]] | bit flip (quantum NOT) | 180° about x |
| Y | [[0, −i], [i, 0]] | bit flip + phase | 180° about y |
| Z | [[1, 0], [0, −1]] | phase flip: |+⟩ ↔ |−⟩ | 180° about z |
| S | [[1, 0], [0, i]] | quarter-turn phase | 90° about z |
| T | [[1, 0], [0, e^(iπ/4)]] | eighth-turn phase | 45° about z |
| H | 1/√2 [[1, 1], [1, −1]] | creates superposition | 180° about x+z |
03 · IDENTITIES
Flipping twice does nothing. Every Pauli gate is its own inverse.
The Hadamard undoes itself: interference in action.
A phase flip between Hadamards becomes a bit flip.
Two quarter turns make a half turn.
Two eighth turns make a quarter turn.
Y|0⟩ = i|1⟩. The factor i changes nothing measurable.
04 · CNOT
| Input |control target⟩ | Output | Why |
|---|---|---|
| |00⟩ | |00⟩ | control is 0: nothing happens |
| |01⟩ | |01⟩ | control is 0: nothing happens |
| |10⟩ | |11⟩ | control is 1: target flips |
| |11⟩ | |10⟩ | control is 1: target flips |
WHY IT MATTERS
H, T, and CNOT together can approximate any quantum circuit.
Shor's algorithm must do arithmetic with reversible gates, which costs many qubits.
H creates superposition; CNOT creates entanglement.
WRAP-UP
A gate is a 2×2 unitary matrix; applying it is matrix × vector
On the Bloch sphere, gates are rotations about an axis
Sequences multiply into one matrix: HZH = X, S·S = Z
CNOT is the two-qubit gate that makes entanglement possible
DISCUSSION
A classical NOT gate has a quantum version. Why can't a classical AND gate be a quantum gate directly?
Hint: given only the output of AND, can you always recover the inputs?