## 2.6 Phase gates galore

As well as the generic phase gate P_\varphi, let us mention three specific phase gates that will frequently pop up (two of which have rather confusing names, at first glance!).

 Generic phase-shift P_\varphi = \begin{bmatrix}1&0\\0&e^{i\varphi}\end{bmatrix} \begin{array}{lcr}|0\rangle&\longmapsto&|0\rangle\\|1\rangle&\longmapsto&e^{i\varphi}|1\rangle\end{array} Phase-flip Z = \begin{bmatrix}1&0\\0&-1\end{bmatrix} \begin{array}{lcr}|0\rangle&\longmapsto&|0\rangle\\|1\rangle&\longmapsto&-|1\rangle\end{array} \pi/4-phase S = \begin{bmatrix}1&0\\0&i\end{bmatrix} \begin{array}{lcr}|0\rangle&\longmapsto&|0\rangle\\|1\rangle&\longmapsto&i|1\rangle\end{array} \pi/8-phase T = \begin{bmatrix}1&0\\0&e^{i\frac{\pi}{4}}\end{bmatrix} \begin{array}{lcr}|0\rangle&\longmapsto&|0\rangle\\|1\rangle&\longmapsto&e^{i\frac{\pi}{4}}|1\rangle\end{array}

Note that the phase gate P_\varphi is only defined up to a global phase factor35, and so we can write its matrix either as P_\varphi = \begin{bmatrix} 1 & 0 \\0 & e^{i\varphi} \end{bmatrix} or as P_\varphi = \begin{bmatrix} e^{-i\frac{\varphi}{2}} & 0 \\0 & e^{i\frac{\varphi}{2}} \end{bmatrix} The first version is more common in the quantum information science community, but the second one is sometimes more convenient to use, as it has determinant 1, and hence belongs to the group \mathrm{SU}(2). We will occasionally switch to the \mathrm{SU}(2) version of a phase gates, and this is where the \pi/4-phase and \pi/8-phase gates get their names, since their \mathrm{SU}(2) versions have e^{\mp i\pi/4} and e^{\mp i\pi/8} (respectively) on the diagonal.

The remaining gate (Z) is arguably the most important specific phase gate, since it is one of the Pauli operators, which we will now discuss.

1. In general, states differing only by a global phase are physically indistinguishable, and so it is physical experimentation that leads us to this mathematical choice of only defining things up to a global phase.↩︎