# 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 ## Relations - [[quantum-gate-phase|Phase gates]]: category containing T and other phase gates - [[quantum-gate-t-dagger|T† gate]]: inverse of T; $T^\dagger T = I$ - [[quantum-gate-s|S gate]]: $T^2 = S$; intermediate in phase gate hierarchy - [[quantum-gate-z|Z gate]]: $T^4 = Z$; related via phase accumulation - [[quantum-gate-rz|RZ gate]]: $T = R_Z(\pi/4)$ - [[quantum-gate-clifford|Clifford gates]]: T is non-Clifford, unlike S - [[quantum-gate-single-qubit|Single-qubit gates]]: fundamental building block - Fault tolerance: magic state distillation required for T gates in FTQC