Track
Gates & Circuits
Single-qubit gates, multi-qubit gates, universal gate sets, OpenQASM, and your first circuit on real hardware.
- Level
- Beginner → Intermediate
- Tutorials
- 8
- Reading time
- ~156 min
Curriculum
- 01
Unitary Operators and the Universal Gate Set
Quantum gates are unitary matrices — reversible, norm-preserving operations on state vectors. This tutorial proves why, derives the universal {H, T, CNOT} set, and shows why any quantum computation decomposes into these primitives. With full Qiskit verification.
beginner · ~22 min · prereq: Foundations track (Tutorials 1-3)
- 02
Pauli, Phase, and Rotation Gates
Every single-qubit gate is a rotation of the Bloch sphere. This tutorial derives the Pauli matrices, the phase gates (S, T), and the continuous Rx/Ry/Rz rotation family — and shows how to decompose any single-qubit unitary into three Euler-angle rotations. With visualizations and Qiskit verification.
beginner · ~20 min · prereq: Tutorial 4: Unitary Operators
- 03
Multi-Qubit Gates: CNOT, CZ, SWAP, Toffoli, and Controlled Everything
CNOT is the workhorse of entanglement, but the two-qubit gate zoo is richer than that. This tutorial walks through CZ, SWAP, iSWAP, Toffoli, and arbitrary controlled unitaries — plus the decomposition theorems that turn them all into CNOT + single-qubit primitives for real hardware.
intermediate · ~23 min · prereq: Tutorial 5: Pauli, Phase, and Rotation Gates
- 04
OpenQASM 3 and Your First Real Hardware Run
Qiskit circuits are a convenience. OpenQASM 3 is the portable assembly language underneath — and what you actually send to hardware. This tutorial walks through the OpenQASM 3 syntax that matters, IBM Quantum's free tier, transpilation, and how to interpret noisy results honestly on your first real-hardware run.
intermediate · ~24 min · prereq: Tutorial 6: Multi-Qubit Gates
- 05
The Solovay-Kitaev Theorem: Approximating Any Single-Qubit Unitary with Clifford+T
The Solovay-Kitaev theorem says any single-qubit unitary can be approximated to accuracy ε by a sequence of Clifford and T gates of length polylogarithmic in 1/ε. This is the structural reason fault-tolerant quantum computing can use a finite gate set without losing expressivity. The original proof gives O(log^3.97(1/ε)) gates; modern algorithms achieve nearly optimal O(log(1/ε)) for restricted classes. This tutorial covers the theorem, the algorithm, and the practical compilation tooling that descends from it.
advanced · ~18 min · prereq: Tutorial 25: The Clifford Group, Tutorial 26: The Eastin-Knill Theorem
- 06
Toffoli Decomposition and T-Count Optimization: How Reversible Logic Becomes Fault-Tolerant
The Toffoli gate (controlled-controlled-NOT) is the universal classical reversible gate, the building block of every quantum arithmetic circuit, and the dominant non-Clifford operation in most fault-tolerant algorithms. Naive Toffoli decomposition uses 7 T gates; Selinger's 2013 optimization uses 4; Jones-Glassman's measurement-based variant uses 3 with a small probability of failure. This tutorial covers the standard decomposition, the optimized variants, and the T-count optimization passes that follow.
advanced · ~16 min · prereq: Tutorial 53: The Solovay-Kitaev Theorem
- 07
Controlled-Unitary Synthesis: How to Build C-U for Arbitrary U
Quantum phase estimation, amplitude amplification, and block encoding all rely on controlled-unitary operations C-U for arbitrary U. The naive construction is via phase kickback through the eigenbasis; practical constructions go through Barenco-style multi-control decomposition, lazy controlled-U for amplitude amplification, and qubitization-style controlled block-encodings. This tutorial covers the standard constructions and their gate-count costs.
advanced · ~16 min · prereq: Tutorial 11: QFT and Phase Estimation, Tutorial 54: Toffoli Decomposition
- 08
ZX-Calculus: A Visual Quantum Calculus for Circuit Optimization
ZX-calculus is a graphical rewriting language for quantum circuits, introduced by Coecke and Duncan in 2008. Quantum circuits become diagrams of green and red 'spiders'; circuit equivalences become diagrammatic rewrites. The 2017 completeness result and the PyZX 2019 toolchain made ZX a practical T-count optimization framework, and 2022-2024 results extend it to mixed states, error correction, and ground-state algorithms. This tutorial covers the core diagrammatic rules, the rewriting strategy, and what ZX delivers in production compilers.
advanced · ~17 min · prereq: Tutorial 53: The Solovay-Kitaev Theorem, Tutorial 54: Toffoli Decomposition