Descriptions of the quantum conditional not (CNOT) gate can be very terse. I would like some help so that I can understand this gate more clearly.
When the control qubit is |0> or |1>, then the behavior of CNOT on the target qubit is easy to understand: Swap the target qubit vector components around. But when the control bit has a superposition state, then I do not know how the gate is anticipated to behave. I want to simulate this gate on classical hardware, so it is important to properly understand its behavior in terms of state transitions.
Specifically, does CNOT behave as a NO-OP on the target qubit for all non-|1> control states?
Or does CNOT swap the target qubit vector components around for all non-|0> control states?
Or yet some other behavior? Does CNOT leave the 0/4 pi, 1/4 pi, 2/4 pi, ... eight unit circle points entirely?
Oh, I was naively multiplying the CNOT transform matrix upon a concatenation of the two qubit vectors, instead of their tensor product. Now the swap operation lines up with the classical edge cases. Makes a lot more sense that way.
CNOT always swaps the two bottom-most components in the tensor product of the input qubit vectors.