I understand how the outcome of each is supposed to be different, but in matrix form are these gates not the same? The CNOT matrix negates the second bit regardless of the input of the first.
Asked
Active
Viewed 48 times
1 Answers
1
The controlled NOT gate is represented by the matrix $$ \begin{pmatrix} 1&0&0&0\\ 0&1&0&0\\ 0&0&0&1\\ 0&0&1&0 \end{pmatrix} $$ In contrast, the matrix corresponding to negating the second bit is $$ \begin{pmatrix} 0&1&0&0\\ 1&0&0&0\\ 0&0&0&1\\ 0&0&1&0 \end{pmatrix} $$
Yuval Filmus
- 280,205
- 27
- 317
- 514