= Solution
In the ordered <computational basis> $|0\rangle,|1\rangle$, the <Pauli X gate>, <Pauli Y gate>, <Pauli Z gate>, <Hadamard gate> and <T gate> are
$$
\boxed{\begin{aligned}
X&=\begin{pmatrix}0&1\\1&0\end{pmatrix},\quad
Y=\begin{pmatrix}0&-i\\i&0\end{pmatrix},\quad
Z=\begin{pmatrix}1&0\\0&-1\end{pmatrix},\\
H&=\frac1{\sqrt2}\begin{pmatrix}1&1\\1&-1\end{pmatrix},\quad
T=\begin{pmatrix}1&0\\0&e^{i\pi/4}\end{pmatrix}.
\end{aligned}}
$$
In the ordered two-<qubit> <computational basis> $|00\rangle,|01\rangle,|10\rangle,|11\rangle$, with the first <qubit> controlling the second, the <controlled-NOT gate> is
$$
\boxed{\operatorname{CNOT}_{1\to2}=\begin{pmatrix}1&0&0&0\\0&1&0&0\\0&0&0&1\\0&0&1&0\end{pmatrix}.}
$$
Here the <T gate> uses the conventional representative with first diagonal entry one; another common representative differs only by a <global phase>.
Back to article page