# How would you represent the $T$ gate in terms of rotations around the $X$ and $Y$ axes?

I know that the $$T$$ gate is equivalent to a $$\frac{\pi}{4}$$ rotation around the $$Z$$-axis, but what about $$X$$ and $$Y$$?

• Not entirely sure if this is what you're asking, but you can't write the $T$ gate only as a product of $X$ and $Y$ gates. For a simple proof, notice that $\det(X)=\det(Y) = -1$, but $\det(T) = e^{\pi i/4}$. The determinant is multiplicative, but we cannot get $e^{\pi i/4}$ by multiplying copies of $(-1)$. Mar 13, 2023 at 21:33
• @FranklinPezzutiDyer the determinant is not everything. The restriction is stricter than that. Even if you want to get $T$ up to a global phase it is still not possible from $X$ and $Y$ only (they generate the Pauli group which does not include anything close to $T$). Mar 13, 2023 at 22:29

A $$T$$ gate is a rotation of $$\pi/4$$ around the $$Z$$-axis of the Bloch sphere. Meaning that $$T$$ is equivalent to $$R_Z(\pi/4)$$ up to a global phase (where $$R_Z(\theta)=\exp(-i\theta Z/2 )$$ is the rotation operator around the $$Z$$ axis).

You cannot get a $$T$$ gate from $$X$$ and $$Y$$ only. Multiplications of $$X,Y,Z$$ form a closed group (Pauli group), that does not include $$T$$.

Nevertheless you can write a rotation in $$Z$$-axis as multiples of rotations of around the axes $$X$$ and $$Y$$ axes: $$R_X(\pi/2)R_Y(\pi/4)R_X(-\pi/2)=R_Z(\pi/4).$$

As already mentioned by Mauricio in his answer, you can express the $$T$$ gate as a combination of rotations around the $$X$$ and the $$Y$$ axes (up to a global phase). In particular, this is how you can see this transformation by using the Qiskit transpiler:

from qiskit import QuantumCircuit, transpile

qc = QuantumCircuit(1)
qc.t(0)
qc = transpile(qc, basis_gates=['rx', 'ry'])

qc.draw('mpl')