# Why is the CNOT gate matrix a valid representation for two-qubit states?

Can anyone explain how the CNOT matrix below is a valid presentation for the four-qubit states that follow after?

|0 0> -> |0 0>
|0 1> -> |0 1>
|1 0> -> |1 1>
|1 1> -> |1 0>


Source: Wikipedia

• how what? Can you clarify what you do not find clear in the wiki page? – glS Oct 27 '18 at 18:41
• Is your confusion about the choice of ordering the basis for which of 00,01,10 and 11 go with rows/columns 1,2,3,4 of the matrix? So you know which rows/columns to put 1s vs 0s. – AHusain Oct 27 '18 at 19:09

The one concept that I think would really help you is knowing how to turn those 4 states, $$|00\rangle, |01\rangle, |10\rangle, |11\rangle$$, into vectors, so that you can do the matrix multiplication.

Let me show you.

\begin{align} |00\rangle = \begin{bmatrix} 1 \\ 0 \\ 0 \\ 0 \end{bmatrix},|01\rangle = \begin{bmatrix} 0 \\ 1 \\ 0 \\ 0 \end{bmatrix}, |10\rangle = \begin{bmatrix} 0 \\ 0 \\ 1 \\ 0 \end{bmatrix}, |11\rangle = \begin{bmatrix} 0 \\ 0 \\ 0 \\ 1 \end{bmatrix} \end{align}

Now if you do the matrix multplication: $$\rm{CNOT} \times |00\rangle$$
You will see that you will get exactly what you said, which is $$|00\rangle$$, and the same is true for the rest of them!

This is using the convention that $$|0\rangle = \begin{bmatrix} 1 \\ 0 \end{bmatrix}$$ and $$|1\rangle = \begin{bmatrix} 0 \\ 1 \end{bmatrix}$$, and $$|ab\rangle = |a\rangle \otimes |b\rangle$$ where $$\otimes$$ is the left Kronecker product.

• Thank you -- can you give me a bit more details on how you turned |11> into a vector of [0 0 0 1] (imagine is as a column vector please!) – DrHamed Oct 27 '18 at 19:42
• I gave the formula |ab> = a $\otimes$ b. So please try |11> = |1> $\otimes$ |1> ! – user1271772 Oct 27 '18 at 19:58
• @DrHamed: Please look at the formula after the words "We can write out the matrix form", in this PDF: cs.cmu.edu/~odonnell/quantum15/lecture02.pdf . I believe that concludes my answer to this question. – user1271772 Oct 27 '18 at 20:12
• Great, I have the Michael Nielsen book, it completely skipped this step, which I found it frustrating. Thanks again for this detailed answer! – DrHamed Oct 27 '18 at 20:13
• Typo in 00 state, too small to make as suggested edit. – AHusain Oct 27 '18 at 20:53