Controlled NOT gate

From Wikipedia, the free encyclopedia

CNOT gate classic analog is XOR gate.
CNOT gate classic analog is XOR gate.
How CNOT gate make computation on value changed after Hadamard gate.
How CNOT gate make computation on value changed after Hadamard gate.
It is that can represent CNOT gate.
It is that can represent CNOT gate.
Answer on ouptput depending of input and CNOT function.
Answer on ouptput depending of input and CNOT function.
first qubit flips only if second qubit is 1.
first qubit flips only if second qubit is 1.

The Controlled NOT (also C-NOT or CNOT) gate is an essential component in the construction of a quantum computer. But since we can't just use it to accomplish all the basic operations, it is not a universal gate. It can be used to disentangle EPR states. Specifically, 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 flips the second qubit (the target qubit) if and only if the first qubit (the control qubit) is 1.

Before After
Control Target Control Target
0 0 0 0
0 1 0 1
1 0 1 1
1 1 1 0

The resulting value of the second qubit corresponds to the result of a classical XOR gate.

The CNOT gate can be represented by the matrix:

 \operatorname{CNOT} =  \begin{bmatrix} 1 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 \\ 0 & 0 & 0 & 1 \\  0 & 0 & 1 & 0 \end{bmatrix}.

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.


[edit] How it works

Let | 0 \rangle = \begin{bmatrix} 1 \\ 0 \end{bmatrix} and | 1 \rangle = \begin{bmatrix} 0 \\ 1 \end{bmatrix} be the orthonormal basis, | \psi \rangle = a | 0 \rangle + b | 1 \rangle =  \begin{bmatrix} a \\ b \end{bmatrix} and  | \phi \rangle = b | 0 \rangle + a | 1 \rangle = \begin{bmatrix} b \\ a \end{bmatrix} the flip qubit of  | \psi \rangle

First prove that  CNOT | 0 \rangle \otimes | \psi \rangle = | 0 \rangle \otimes | \psi \rangle

It's not difficult to verify that 
| 0 \rangle \otimes | \psi \rangle = \begin{bmatrix} a \\ b \\ 0 \\ 0 \end{bmatrix}
then

CNOT | 0 \rangle \otimes | \psi \rangle = \begin{bmatrix} 1 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 \\ 0 & 0 & 0 & 1 \\  0 & 0 & 1 & 0 \end{bmatrix} \begin{bmatrix} a \\ b \\ 0 \\ 0 \end{bmatrix} = a \begin{bmatrix} 1 \\ 0 \\ 0 \\ 0 \end{bmatrix} + b \begin{bmatrix} 0 \\ 1 \\ 0 \\ 0 \end{bmatrix}
As we can see  | 0 \rangle \otimes | 0 \rangle = \begin{bmatrix} 1 \\ 0 \\ 0 \\ 0 \end{bmatrix} and  | 0 \rangle \otimes | 1 \rangle = \begin{bmatrix} 0 \\ 1 \\ 0 \\ 0 \end{bmatrix}, using these on the equation above
 CNOT | 0 \rangle \otimes | \psi \rangle = a | 0 \rangle \otimes | 0 \rangle + b | 0 \rangle \otimes | 1 \rangle
 CNOT | 0 \rangle \otimes | \psi \rangle = | 0 \rangle \otimes \left( a | 0 \rangle  + b | 1 \rangle \right)
 CNOT | 0 \rangle \otimes | \psi \rangle = | 0 \rangle \otimes | \psi \rangle Therefore CNOT gate doesn't flip the  | \psi \rangle qubit if the first qubit is 0.

Now, prove that  CNOT | 1 \rangle \otimes | \psi \rangle = | 1 \rangle \otimes | \phi \rangle, means that the CNOT gate flips the  | \psi \rangle qubit.

As the first demostration we have  
| 1 \rangle \otimes | \psi \rangle = \begin{bmatrix} 0\\ 0 \\ a \\ b \end{bmatrix}
then
 
CNOT | 1 \rangle \otimes | \psi \rangle = \begin{bmatrix} 1 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 \\ 0 & 0 & 0 & 1 \\  0 & 0 & 1 & 0 \end{bmatrix} \begin{bmatrix} 0\\ 0 \\ a \\ b \end{bmatrix} = a \begin{bmatrix} 0 \\ 0 \\ 0 \\ 1 \end{bmatrix} + b \begin{bmatrix} 0 \\ 0 \\ 1 \\ 0 \end{bmatrix}
As we can see that  | 1 \rangle \otimes | 1 \rangle = \begin{bmatrix} 0 \\ 0 \\ 0 \\ 1 \end{bmatrix} and  | 1 \rangle \otimes | 0 \rangle = \begin{bmatrix} 0 \\ 0 \\ 1 \\ 0 \end{bmatrix} using these on the equation above
 CNOT | 1 \rangle \otimes | \psi \rangle = a | 1 \rangle \otimes | 1 \rangle + b | 1 \rangle \otimes | 0 \rangle
 CNOT | 1 \rangle \otimes | \psi \rangle = | 1 \rangle \otimes \left( a | 1 \rangle  + b | 0 \rangle \right)
 CNOT | 1 \rangle \otimes | \psi \rangle = | 1 \rangle \otimes | \phi \rangle
Therefore the CNOT gate flip the  | \psi \rangle qubit into | \phi \rangle if the control qubit is set to 1. A simple way to observe this is to multiply the CNOT matrix by a column vector, noticing that the operation on the first bit is identity, and a NOT gate on the second bit.

[edit] References

  • Nielsen, Michael A. & Chuang, Isaac L. (2000). Quantum Computation and Quantum Information. Cambridge University Press. ISBN 0-521-63235-8. 
  • Monroe, C. & Meekhof, D. & King, B. & Itano, W. & Wineland, D. (1995). "Demonstration of a Fundamental Quantum Logic Gate". Physical Review Letters (75): 4714–4717. doi:10.1103/PhysRevLett.75.4714.  [1]
Languages