Fredkin gate

Circuit representation of Fredkin gate

The Fredkin gate (also CSWAP gate) is a computational circuit suitable for reversible computing, invented by Ed Fredkin. It is universal, which means that any logical or arithmetic operation can be constructed entirely of Fredkin gates. The Fredkin gate is the three-bit gate that swaps the last two bits if the first bit is 1.

Definition

The basic Fredkin gate[1] is a controlled swap gate that maps three inputs (C, I1, I2) onto three outputs (C, O1, O2). The C input is mapped directly to the C output. If C = 0, no swap is performed; I1 maps to O1, and I2 maps to O2. Otherwise, the two outputs are swapped so that I1 maps to O2, and I2 maps to O1. It is easy to see that this circuit is reversible, i.e., "undoes" itself when run backwards. A generalized n×n Fredkin gate passes its first n-2 inputs unchanged to the corresponding outputs, and swaps its last two outputs if and only if the first n-2 inputs are all 1.

The Fredkin gate is the reversible three-bit gate that swaps the last two bits if the first bit is 1.

Truth table Permutation matrix form
INPUT OUTPUT
C I1 I2 C O1 O2
 0   0   0   0   0   0 
0 0 1 0 0 1
0 1 0 0 1 0
0 1 1 0 1 1
1 0 0 1 0 0
1 0 1 1 1 0
1 1 0 1 0 1
1 1 1 1 1 1


\begin{bmatrix}
1 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\
0 & 1 & 0 & 0 & 0 & 0 & 0 & 0 \\
0 & 0 & 1 & 0 & 0 & 0 & 0 & 0 \\
0 & 0 & 0 & 1 & 0 & 0 & 0 & 0 \\
0 & 0 & 0 & 0 & 1 & 0 & 0 & 0 \\
0 & 0 & 0 & 0 & 0 & 0 & 1 & 0 \\
0 & 0 & 0 & 0 & 0 & 1 & 0 & 0 \\
0 & 0 & 0 & 0 & 0 & 0 & 0 & 1 \\
\end{bmatrix}

It has the useful property that the numbers of 0s and 1s are conserved throughout, which in the billiard ball model means the same number of balls are output as input. This corresponds nicely to the conservation of mass in physics, and helps to show that the model is not wasteful.

Truth functions with AND, OR, XOR, and NOT

O1 = I1 XOR S
O2 = I2 XOR S
Cout= Cin

where S = (I1 XOR I2) AND C

Alternatively:

O1 = (NOT C AND I1) OR (C AND I2)
O2 = (C AND I1) OR (NOT C AND I2)
Cout= Cin

Completeness

One way to see that the Fredkin gate is universal is to observe that it can be used to implement AND, NOT and OR:

If I_2 = 0, then O_2 = C \operatorname{AND} I_1.
If I_1 = 0 and I_2 = 1, then O_2 = \operatorname{NOT} C.
If I_2 = 1, then O_1 = C \operatorname{OR} I_1.

Example

Here is a diagram of a three-bit adder implemented using Fredkin gates. The three inputs are A, B and C, supplemented by the constant T and F. In the diagram, the leftmost input (before the colon) swaps the two rightmost inputs if it is true.

Quantum Fredkin gate

On March 25, 2016, researchers from Griffith University and the University of Queensland announced they had built a quantum Fredkin gate that uses the quantum entanglement of particles of light to swap qubits. The availability of quantum Fredkin gates may facilitate the construction of quantum computers.[2][3]

See also

References

  1. Brown, Julian, The Quest for the Quantum Computer, New York : Touchstone, 2000.
  2. http://www.pcworld.com/article/3048763/hardware/quantum-computing-is-now-a-big-step-closer-thanks-to-this-new-breakthrough.html
  3. A quantum Fredkin gate Raj B. Patel, Joseph Ho, Franck Ferreyrol, Timothy C. Ralph and Geoff J. Pryde, Science Advances, 25 Mar 2016, Vol. 2, no. 3, e1501531, DOI: 10.1126/sciadv.1501531

Further reading

This article is issued from Wikipedia - version of the Wednesday, March 30, 2016. The text is available under the Creative Commons Attribution/Share Alike but additional terms may apply for the media files.