T gate (π/8 gate)
An eighth-turn of phase. The gate that makes the Clifford set universal.
Phase · 1 qubit · reviewed November 2026
Matrix
[ 1 0 ] [ 0 e^(iπ/4) ]
What it does
| |1⟩ | → | e^(iπ/4)|1⟩ |
In plain words
T is the square root of S. Clifford gates plus T can approximate any single-qubit operation to any accuracy, which is why the T count is the standard cost measure in fault-tolerant estimates. In most error-correction schemes each T gate needs a costly extra resource called a magic state.
Identities
- T·T = S
- T·T† = I
- T⁸ = I
Where it is used
- Universal gate sets
- Resource estimates for fault-tolerant machines
- Quantum Fourier transforms
Code
# Qiskit qc.t(0) // OpenQASM 2.0 t q[0];
Qiskit prints qubit 0 on the right of a bitstring. The builder prints it on the left.
Related gates
Questions
Why do people count T gates?
In error-corrected machines T gates are far more expensive than Clifford gates, so the T count roughly sets the cost of an algorithm.