CNOT gate Updated +Created
The CNOT gate is a controlled quantum gate that operates on two qubits, flipping the second (operand) qubit if the first (control) qubit is set.
This gate is the first example of a controlled quantum gate that you should study.
Figure 1.
CNOT gate symbol
. Source. The symbol follow the generic symbol convention for controlled quantum gates shown at Figure "Generic controlled quantum gate symbol", but replacing the generic "U" with the Figure "Quantum NOT gate symbol".
To understand why the gate is called a CNOT gate, you should think as follows.
First let's produce a generic quantum state vector where the control qubit is certain to be 0.
On the standard basis:
we see that this means that only and should be possible. Therefore, the state must be of the form:
where and are two complex numbers such that
If we operate the CNOT gate on that state, we obtain:
and so the input is unchanged as desired, because the control qubit is 0.
If however we take only states where the control qubit is for sure 1:
Therefore, in that case, what happened is that the probabilities of and were swapped from and to and respectively, which is exactly what the quantum NOT gate does.
So from this we understand more concretely what "the gate only operates if the first qubit is set to one" means.
Now go and study the Bell state and understand intuitively how this gate is used to produce it.
Hadamard gate Updated +Created
The Hadamard gate takes or (quantum states with probability 1.0 of measuring either 0 or 1), and produces states that have equal probability of 0 or 1.
Tensor product in quantum computing Updated +Created
We don't need to understand a super generalized version of tensor products to know what they mean in basic quantum computing!
Intuitively, taking a tensor product of two qubits simply means putting them together on the same quantum system/computer.
When we write the bra-ket notation: that is the same as .
The tensor product is called a "product" because it distributes over addition.
E.g. consider:
Intuitively, in this operation we just put a Hadamard gate qubit together with a second pure qubit.
And the outcome still has the second qubit as always 0, because we haven't made them interact.
The quantum state is called a separable state, because it can be written as a single product of two different qubits. We have simply brought two qubits together, without making them interact.
If we then add a CNOT gate to make a Bell state:
we can now see that the Bell state is non-separable: we've made the two qubits interact, and there is no way to write this state with a single tensor product. The qubits are fundamentally entangled.