Curriculum / Quantum Gates Deep Dive / The Clifford+T Gate Set
The Clifford+T Gate Set
Use only H, S, T, and CNOT to build complex circuits and understand T-count.
The Clifford+T Gate Set
The Clifford+T gate set {H, S, T, CNOT} is universal for quantum computation. Every quantum algorithm can be compiled into sequences of these four gates.
T Gate Review
The T gate applies a π/4 phase shift to |1⟩:
qc.t(qubit) # T = RZ(π/4)- •S = T² (two T gates make one S gate)
- •Z = S² = T⁴ (four T gates make one Z gate)
- •T† (T-dagger, inverse) = T⁷ (seven T gates)
T-Count: The Cost Metric
In fault-tolerant quantum computing, each T gate requires ~1000× more overhead than a Clifford gate. Minimizing T-count directly reduces hardware requirements. A circuit with T-count 10 is approximately 10× cheaper to run fault-tolerantly than one with T-count 100.
When you hear 'circuit optimization' in the context of fault-tolerant computing, it almost always means T-count reduction. Research teams at IBM, Google, and academic groups work on algorithms to automatically reduce the number of T gates in compiled circuits.
Your Challenge
Build a circuit using only {H, S, T, CNOT} that:
- 1.Creates a Bell state (|00⟩ + |11⟩)/√2 using H and CNOT
- 2.Applies a T gate to qubit 0 (contributes 1 to T-count)
- 3.Applies an S gate to qubit 1 (Clifford — free in fault-tolerant sense)
- 4.Creates another Bell state layer with CNOT + H
The circuit should produce a non-trivial mixed distribution — not just |00⟩ — confirming that all four steps are implemented.
How this lesson works
A hands-on coding challenge. You write Qiskit-compatible Python in the browser editor, run it instantly via WebAssembly, watch the circuit and Bloch sphere react, and pass automatic output checks. The AI tutor Qubitus gives Socratic hints if you get stuck.
Part of: Quantum Gates Deep Dive
Master single-qubit and multi-qubit gates. Understand rotations, phases, and the math behind every gate in Qiskit.
This lesson is part of Pro
Unlock Quantum Gates Deep Dive and all 10 tracks with Pro: $12.99/month, $79/year, or $97 lifetime. Start with the free track first if you are new.