![]() | ||
In computing science, the controlled NOT gate (also C-NOT or CNOT) is a quantum gate that is an essential component in the construction of a quantum computer. It can be used to entangle and disentangle EPR states. Any quantum circuit can be simulated to an arbitrary degree of accuracy using a combination of CNOT gates and single qubit rotations. The CNOT gate is the "quantization" of a classical gate.
Contents
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
If one allows only
More generally, the inputs are allowed to be a linear superposition of
into:
The CNOT gate can be represented by the matrix (permutation matrix form):
The first experimental realization of a CNOT gate was accomplished in 1995. Here, a single Beryllium ion in a trap was used. The two qubits were encoded into an optical state and into the vibrational state of the ion within the trap. At the time of the experiment, the reliability of the CNOT-operation was measured to be on the order of 90%.
In addition to a regular controlled NOT gate, one could construct a function-controlled NOT gate, which accepts an arbitrary number n+1 of qubits as input, where n+1 is greater than or equal to 2 (a quantum register). This gate flips the last qubit of the register if and only if a built-in function, with the first n qubits as input, returns a 1. The function-controlled NOT gate is an essential element of the Deutsch-Jozsa algorithm.
Behaviour of CNOT in the Hadamard basis
When viewed only in the computational basis
Insight can be won by expressing the CNOT gate with respect to a Hadamard basis
and the corresponding basis of a 2-qubit register is
etc. Viewing CNOT in this basis, the state of the second qubit remains unchanged, and the state of the first qubit is flipped, according to the state of the second bit. (For details see below.) "Thus, in this basis the sense of which bit is the control bit and which the target bit has reversed. But we have not changed the transformation at all, only the way we are thinking about it."
The "computational" basis
The observation that both qubits are (equally) affected in a CNOT interaction is of importance when considering information flow in entangled quantum systems.
Details of the computation
We now proceed to give the details of the computation. Working through each of the Hadamard basis states, the first qubit flips between
A quantum circuit that performs a Hadamard transform followed by CNOT then another Hadamard transform can be described in terms of matrix operators:
(H1 ⊗ H1)−1 . CNOT . (H1 ⊗ H1)
The single-qubit Hadamard transform, H1, is the negative of its own inverse. The tensor product of two Hadamard transforms operating (independently) on two qubits is labelled H2. We can therefore write the matrices as:
H2 . CNOT . H2
When multiplied out, this yields a matrix that swaps the
Constructing the Bell State | Φ + ⟩ {\displaystyle |\Phi ^{+}\rangle }
A common application of the CNOT gate is to maximally entangle two qubits into the
To construct
After applying CNOT, the resulting Bell State
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:
In the Hadamard view, the control and target qubits have conceptually swapped and qubit A is inverted when qubit B is