Just yesterday, I found the theory about quantum computing and I am studying by myself.

While trying to understand Toffoli gate on wiki (https://en.wikipedia.org/wiki/Toffoli_gate),

I faced the sentence ‘CNOT’ gate is the only non trivial for two input bits

like 00 -> 00, 01 -> 01, 10 -> 11, 11-> 10. At this point,

### Question 1

the question popped up that why not 00 -> 01, 01 -> 00, 10 -> 10, 11 -> 11. I think this matrix is presented by

$$

begin{bmatrix}

0 & 1 & 0 & 0 \

1 & 0 & 0 & 0\

0 & 0 & 1 & 0\

0 & 0 & 0 & 1\

end{bmatrix}

quad

$$

is different with $$

begin{bmatrix}

1 & 0 & 0 & 0 \

0 & 1 & 0 & 0\

0 & 0 & 0 & 1\

0 & 0 & 1 & 0\

end{bmatrix}

quad

$$

and is also unitary.

### Question 2.

Is the order of the basis matter whenever to present the operation as a matrix? If then, what is the rule?

### Question 3.

I am studying with this lecture note- https://homes.cs.washington.edu/~oskin/quantum-notes.pdf

Page 12 of the note, $$ frac{1}{sqrt{2}}(a |0 rangle (|00rangle +|11rangle)+b |1 rangle (|00 rangle + |11 rangle))= frac{1}{sqrt{2}} begin{bmatrix}

a \

0 \

0 \

a \

b \

0 \

0 \

b \

end{bmatrix}

quad

$$

but I think $$ |0 rangle in mathbb{C}^2 $$ and $$ |00 rangle, |11 rangle in mathbb{C}^4$$ so the product of two vector is non-sense. Should I consider it as a tensor product of the two vectors? If we consider it as a tensor product, then it’s okay and the order of basis vectors looks important..