Difference between CNOT and 2nd bit bitflip
The controlled NOT gate is represented by the matrix
$$
\begin{pmatrix}
1&amp;0&amp;0&amp;0\\
0&amp;1&amp;0&amp;0\\
0&amp;0&amp;0&amp;1\\
0&amp;0&amp;1&amp;0
\end{pmatrix}
$$
In contrast, the matrix corresponding to negating the second bit is
$$
\begin{pmatrix}
0&amp;1&amp;0&amp;0\\
1&amp;0&amp;0&amp;0\\
0&amp;0&amp;0&amp;1\\
0&amp;0&amp;1&amp;0
\end{pmatrix}
$$