# S gate **S gate** (or **$\sqrt{Z}$ gate**) is a single-qubit gate that adds a phase of $\pi/2$ to the $\lvert 1\rangle$ state while leaving $\lvert 0\rangle$ unchanged. It is a special case of the [[p-gate|phase gate]] with $\phi = \pi/2$, and satisfies $S^2 = Z$. $$S = \begin{pmatrix}1 & 0\\ 0 & i\end{pmatrix}$$ On the computational basis, $S\lvert 0\rangle = \lvert 0\rangle$ and $S\lvert 1\rangle = i\lvert 1\rangle$. On the [[bloch-sphere|Bloch sphere]], $S$ is a $\pi/2$ rotation about the $z$-axis; it maps $\lvert +\rangle$ to $\lvert +i\rangle$ and $\lvert -\rangle$ to $\lvert -i\rangle$. The S gate belongs to the Clifford group, meaning it maps [[pauli-gates|Pauli operators]] to Pauli operators under conjugation: $SXS^\dagger = Y$ and $SZS^\dagger = Z$. The [[t-gate|T gate]] is the square root of $S$: $T^2 = S$.