So I wish to show that surrounding a CNOT with Hadamard gates switches the role of the control-bit and target-bit of CNOT. Explicitly I want to show
($H\otimes H$)CNOT($H\otimes H$) is the 2-qubit gate where the second bit controls whether the first bit is negated.
I tried computing the above explicitly and gotten the matrix
\begin{bmatrix} 1 & 0 & 0 & 0\\ 0 & 0 & 0 & 1\\ 0 & 0 & 1 & 0\\ 0 & 1 & 0 & 0 \end{bmatrix}
Assuming my computation is correct, I don't see how this reflects this "change of role". How do I see this easily ?
Cheers
Showing that
is equivalent to computing the matrices of the circuits on each side of the equality and showing that they are the same. By checking how it acts on the basis states, you can see that the matrix of the circuit on the right hand side is
\begin{equation}\begin{pmatrix} 1 & 0 & 0 & 0\\ 0 & 0& 0&1\\0&0&1&0\\0&1&0&0 \end{pmatrix},\end{equation} and you have already shown that this is the same as the matrix corresponding to the circuit on the left hand side.