The T gate

A 45° phase rotation about the z-axis. The third gate in the H–T–CNOT universal set.

Sohum Thakkar
Sohum Thakkar · CEO, Qolour
May 8, 2026

The T gate rotates the qubit 45° about the z-axis of the Bloch sphere. It leaves |0⟩ alone and multiplies |1⟩ by eiπ/4, a complex phase that's invisible on basis states but very real for superpositions, which is why the demo above starts at |+⟩.

T is the third member of the H–T–CNOT universal gate set. Any unitary operation, on any number of qubits, can be built from those three to whatever precision you want.

Frequently asked questions

Why is the T gate important?

Together with H and CNOT, the T gate forms a universal gate set: any quantum operation can be approximated to arbitrary precision using just these three.

Is T self-inverse?

No. T⁸ = I, and T² = S (the phase gate). The inverse of T is T, which rotates by −π/4 about z.

Why is the T gate sometimes called the π/8 gate?

Historical convention. After factoring out a global phase, the matrix can be written with eigenvalues e±iπ/8. The actual rotation about the z-axis is π/4 (45°).