0
$\begingroup$

The tensor product of two qubits yields a 4-row column vector. Once tensored, how are we supposed to apply common gates such as NOT on just one of the qubits, an operation which expects 2x2 or at least 1x2 input?

I understand how classical NOT works (1 qubit), and how CNOT works (2 qubits tensored). But circuit diagrams often show 2x2 gate operations applied onto just one of the qubits in a tensor product. Is it okay to just vertically partition the 4-row into two 2-row column vectors for the purposes of 2x2 matrix gate operations?

$\endgroup$
1
  • $\begingroup$ It is general approach to have an identity operator on a qubit where no gate is applied. As a result, you always have to something on each qubit and you can calculate tensor product of the gates. $\endgroup$ Nov 6, 2021 at 7:41

1 Answer 1

4
$\begingroup$

You can also tensor product the operations you are applying to your bipartite system. Suppose you have $X$ on the first qubit and nothing on the second qubit, i.e., the identity gate $I$. Thus, to get the matrix you multiply your four-vector by, you tensor product these operators as $X \otimes I$ (or $I \otimes X$ if you are following little endian convention). This tensor products works as usual:

$$ X \otimes I = \begin{bmatrix} 0&1 \\ 1&0 \end{bmatrix} \otimes \begin{bmatrix} 1 &0 \\ 0&1 \end{bmatrix} = \begin{bmatrix}0\begin{bmatrix} 1 &0 \\ 0&1 \end{bmatrix}&1\begin{bmatrix} 1 &0 \\ 0&1 \end{bmatrix} \\ 1\begin{bmatrix} 1 &0 \\ 0&1 \end{bmatrix}&0\begin{bmatrix} 1 &0 \\ 0&1 \end{bmatrix}\end{bmatrix} = \begin{bmatrix} 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & 1 \\ 1 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0\end{bmatrix} $$

Then, you can multiply this matrix times your column vector with four elements. Perhaps this is easier to do following ket notation, particularly if you have more than two qubits. For example, assuming you have the $\frac{1}{\sqrt{2}}(|01\rangle + |10\rangle)$ state, you can apply $X \otimes I$ as follows:

$$ \begin{align} X \otimes I \left[\frac{1}{\sqrt{2}}(|01\rangle + |10\rangle)\right] &= \frac{1}{\sqrt{2}}\left[ X\otimes I(|01\rangle + |10\rangle) \right] \\ &=\frac{1}{\sqrt{2}}(X|0\rangle I|1\rangle + X|1\rangle I|0\rangle) = \frac{1}{\sqrt{2}}(|11\rangle + |00\rangle) \end{align} $$

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.