# CNOT quantum gate using tensor products

In textbook, it states that the CNOT gate with the X gate applied on second qubit is $$\begin{array}{cccc} 1&0&0&0\\ 0&1&0&0\\ 0&0&0&1\\ 0&0&1&0 \end{array}$$ However, By tensor products, wouldn't it be $$I$$ $$\otimes$$ $$U_{x}$$ , which gives $$\begin{array}{cccc} 0&1&0&0\\ 1&0&0&0\\ 0&0&0&1\\ 0&0&1&0 \end{array}$$

• May I ask the title of the book you are reading? Commented May 31, 2019 at 3:56
• QM by david mcyintire Commented May 31, 2019 at 4:03

The way that we can write controlled-not operation explicitly algebraically with the control on the first qubit is as follows: $$\mathit{CNOT} \;=\; \def\ket#1{\lvert #1 \rangle}\def\bra#1{\langle #1 \rvert}\ket{0}\!\bra{0} \!\otimes\! \mathbf 1 \,+\, \ket{1}\!\bra{1} \!\otimes\! \: \sigma_x$$ where $$\mathbf 1$$ is an identity matrix of $$2\times2$$ order.
• BY same logic, if x gate was now acting on first qubit, control on second, then wouldn't it be $$\mathit{CNOT} \;=\; \def\ket#1{\lvert #1 \rangle}\def\bra#1{\langle #1 \rvert}\ket{0}\!\bra{0} \!\otimes\! \sigma_x \,+\, \ket{1}\!\bra{1} \!\otimes\! \: \mathbf 1$$, which gives incorrect operator matrix? Commented Feb 13, 2019 at 6:55