Exercise 4.13#
The Hadmard gate, Pauli \(X, Y\) and \(Z\) gate are defined as
(1)#\[\begin{split}
H = \frac{1}{\sqrt{2}}\begin{pmatrix}
1 & 1 \\ 1 & -1
\end{pmatrix}, \,X = \begin{pmatrix}
0 & 1\\ 1 &0
\end{pmatrix},\,Y = \begin{pmatrix}
0 & -i\\ i &0
\end{pmatrix},\, Z = \begin{pmatrix}
1 & 0\\ 0 &-1
\end{pmatrix}
\end{split}\]
Thus, we have
(2)#\[\begin{split}
\begin{align}
HXH &=\frac{1}{2}\begin{pmatrix}
1 & 1 \\ 1 & -1
\end{pmatrix}\begin{pmatrix}
0 & 1\\ 1 &0
\end{pmatrix}\begin{pmatrix}
1 & 1 \\ 1 & -1
\end{pmatrix} \\
&= \frac{1}{2}\begin{pmatrix}
1 & 1\\ -1 & 1
\end{pmatrix}\begin{pmatrix}
1 & 1 \\ 1 & -1
\end{pmatrix}\\
&= \frac{1}{2}\begin{pmatrix}
2 & 0 \\ 0 & -2
\end{pmatrix} = \begin{pmatrix}
1 & 0 \\ 0 & -1
\end{pmatrix} = Z
\end{align}
\end{split}\]
and
(3)#\[\begin{split}
\begin{align}
HYH &=\frac{1}{2}\begin{pmatrix}
1 & 1 \\ 1 & -1
\end{pmatrix}\begin{pmatrix}
0 & -i\\ i &0
\end{pmatrix}\begin{pmatrix}
1 & 1 \\ 1 & -1
\end{pmatrix} \\
&= \frac{1}{2}\begin{pmatrix}
i & -i\\ -i & -i
\end{pmatrix}\begin{pmatrix}
1 & 1 \\ 1 & -1
\end{pmatrix}\\
&= \frac{1}{2}\begin{pmatrix}
0 & 2i \\ -2i & 0
\end{pmatrix} = \begin{pmatrix}
0 & i \\ -i & 0
\end{pmatrix} = -Y
\end{align}
\end{split}\]
Also
(4)#\[\begin{split}
\begin{align}
HZH &=\frac{1}{2}\begin{pmatrix}
1 & 1 \\ 1 & -1
\end{pmatrix}\begin{pmatrix}
1 & 0\\ 0 &-1
\end{pmatrix}\begin{pmatrix}
1 & 1 \\ 1 & -1
\end{pmatrix} \\
&= \frac{1}{2}\begin{pmatrix}
1 & -1\\ 1 & 1
\end{pmatrix}\begin{pmatrix}
1 & 1 \\ 1 & -1
\end{pmatrix}\\
&= \frac{1}{2}\begin{pmatrix}
0 & 2 \\ 2 & 0
\end{pmatrix} = \begin{pmatrix}
0 & 1 \\ 1 & 0
\end{pmatrix} = X
\end{align}
\end{split}\]