# T Gate **T gate** applies a 45° phase to the $|1\rangle$ state. Crucial for universal quantum computation and magic state distillation. Matrix: $$T = \begin{pmatrix} 1 & 0 \\ 0 & e^{i\pi/4} \end{pmatrix}$$ Action: $T|0\rangle = |0\rangle$, $T|1\rangle = e^{i\pi/4}|1\rangle$ (adds $\pi/4$ phase to $|1\rangle$). ## Properties - **$T^8 = I$**: applying T eight times returns to identity - **$T^4 = Z$**: four T gates equal one Z gate - **$T^2 = S$**: two T gates equal one S gate - **Inverse**: $T^\dagger = e^{-i\pi/4}$ (or equivalently, $T^7$) - **Non-Clifford**: T is not in the Clifford group (universality comes from T) ## Relation to Phase Gates $$T = R_Z(\pi/4) = e^{-i\pi Z/8}$$ $$S = T^2 = R_Z(\pi/2)$$ $$Z = T^4 = R_Z(\pi)$$ ## Expense Analysis - **Non-Clifford**: T cannot be simulated classically, unlike Clifford gates - **Magic state distillation**: fault-tolerant systems require distillation; one logical T costs ~1000 physical qubits - **Bottleneck**: primary cost limiting fault-tolerant quantum computation ## Uses - **Universal computation**: T + Clifford gates (Hadamard, CNOT) form universal set - **Variational algorithms**: T gates appear in some ansatze but should be minimized - **Exact circuits**: Solovay-Kitaev approximation requires T gates ## Implementation - **Superconducting qubits**: RZ($\pi/4$) via microwave pulse or virtual rotation; ~20 ns - **Trapped ions**: controlled phase via laser - **Photonic**: phase shifter - **Cost note**: typically ~20 ns on NISQ hardware, but bottleneck for fault-tolerant systems