Single qubit. A unitary can be written exactly as a product of and gates (equivalently, of single-qubit Clifford and gates) if and only if every entry of lies in . Moreover there is an efficient classical algorithm that produces a circuit for such a using the minimal possible number of and of gates (Kliuchnikov, Maslov and Mosca).
Many qubits. An -qubit unitary has an exact representation as a Clifford+T circuit using ancillas initialised to and returned in if and only if its entries lie in ; one ancilla always suffices (Giles and Selinger, proving a conjecture of Kliuchnikov, Maslov and Mosca). Giles and Selinger also characterise which such operators need no ancilla.
The key quantity in the single-qubit algorithm is the smallest denominator exponent: every element of the ring can be written as with , and multiplying by a suitably chosen factor of the form lowers this exponent by one, so a greedy reduction brings it below a small constant (4 in their analysis), where a precomputed table of the finitely many remaining unitaries finishes the circuit. Since the ring is countable and dense in , the theorem also explains why generic rotations need approximation rather than exact synthesis.