Controlled NOT gate

In computer science, the controlled NOT gate (also C-NOT or CNOT) is a quantum logic gate that is an essential component in the construction of a gate-based quantum computer. It can be used to entangle and disentangle Bell states. Any quantum circuit can be simulated to an arbitrary degree of accuracy using a combination of CNOT gates and single qubit rotations.
The gate is also used in classical reversible computing.
Operation.
The CNOT gate operates on a quantum register consisting of 2 qubits. The CNOT gate flips the second qubit (the target qubit) if and only if the first qubit (the control qubit) is formula_1.
If formula_2 and formula_3 terms over, while leaving the formula_4 and formula_5 terms alone. This is equivalent to a CNOT gate where qubit 2 is the control qubit and qubit 1 is the target qubit:
formula_6
Constructing the Bell State formula_7.
A common application of the CNOT gate is to maximally entangle two qubits into the formula_7 Bell state; this forms part of the setup of the superdense coding, quantum teleportation, and entangled quantum cryptography algorithms.
To construct formula_7, the inputs A (control) and B (target) to the CNOT gate are:
formula_10 and formula_11
After applying CNOT, the resulting Bell State formula_12 has the property that the individual qubits can be measured using any basis and will always present a 50/50 chance of resolving to each state. In effect, the individual qubits are in an undefined state. The correlation between the two qubits is the complete description of the state of the two qubits; if we both choose the same basis to measure both qubits and compare notes, the measurements will perfectly correlate.
When viewed in the computational basis, it appears that qubit A is affecting qubit B. Changing our viewpoint to the Hadamard basis demonstrates that, in a symmetrical way, qubit B is affecting qubit A.
The input state can alternately be viewed as:
formula_13 and formula_14
In the Hadamard view, the control and target qubits have conceptually swapped and qubit A is inverted when qubit B is formula_15. The output state after applying the CNOT gate is formula_16 which can be shown(|++\rangle + |--\rangle)</math>
formula_17
formula_18
formula_19
formula_20}} to be exactly the same state as formula_12.
C-ROT gate.
The C-ROT gate (controlled Rabi rotation) is equivalent to a C-NOT gate except for a formula_22 rotation of the nuclear spin around the z axis.