## Quantum Country exercise 2

This is one in a series of posts working through the exercises in the Quantum Country online introduction to quantum computing and related topics. The exercises in the original document are not numbered; I have added my own numbers for convenience in referring to them.

Exercise 2. Suppose that instead of the Hadamard matrix $H$ we’d defined a matrix $J = \frac{1}{\sqrt{2}} \begin{bmatrix} 1&1 \\ 1&1 \end{bmatrix}$. Explain why $J$ would not make a suitable quantum gate by applying it to the quantum state $\frac{| 0 \rangle - | 1 \rangle}{\sqrt{2}}$. $\frac{\vert 0 \rangle - \vert 1 \rangle}{\sqrt{2}} = \frac{1}{\sqrt{2}} \left( \begin{bmatrix} 1 \\ 0 \end{bmatrix} - \begin{bmatrix} 0 \\ 1 \end{bmatrix} \right) = \frac{1}{\sqrt{2}} \begin{bmatrix} 1 \\ -1 \end{bmatrix}$
so that applying $J$ to $\frac{\vert 0 \rangle - \vert 1 \rangle}{\sqrt{2}}$ gives us $\frac{1}{\sqrt{2}} \begin{bmatrix} 1 & 1 \\ 1& 1 \end{bmatrix} \frac{1}{\sqrt{2}} \begin{bmatrix} 1 \\ -1 \end{bmatrix} = \frac{1}{2} \begin{bmatrix} 1 - 1 \\ 1 - 1 \end{bmatrix}$ $= \frac{1}{2} \begin{bmatrix} 0 \\ 0 \end{bmatrix} = \begin{bmatrix} 0 \\ 0 \end{bmatrix} = 0$
So $J$ applied to $\frac{\vert 0 \rangle - \vert 1 \rangle}{\sqrt{2}}$ gives us the zero state. That is not a result we’d want from applying a quantum gate.