Fredkin gate

The Fredkin gate (also controlled-SWAP gate and conservative logic gate) is a computational circuit suitable for reversible computing, invented by Edward Fredkin. It is universal, which means that any logical or arithmetic operation can be constructed entirely of Fredkin gates. The Fredkin gate is a circuit or device with three inputs and three outputs that transmits the first bit unchanged and swaps the last two bits if, and only if, the first bit is 1.

Background
The Fredkin gate, conceptualized by Edward Fredkin and Tommaso Toffoli at the MIT Laboratory for Computer Science, represents a pivotal advancement in the field of reversible computing and conservative logic. Developed within the framework of conservative logic, this gate is designed to align computing processes with fundamental physical principles such as the reversibility of dynamical laws and the conservation of energy. The technical rationale behind the Fredkin gate is rooted in addressing the inefficiencies of traditional computing, where irreversible operations typically result in significant energy dissipation.

In contrast to conventional logic gates, which often erase information and thus dissipate heat as per Landauer's principle, the Fredkin gate maintains reversibility — a property that ensures no information is lost during the computation process. Each output state of the gate uniquely determines its input state, which not only preserves information but also aligns with energy conservation principles. This characteristic is particularly crucial as the demand for computational power grows, making energy efficiency a key consideration.

The invention of the Fredkin gate was motivated by the quest to minimize the energy footprint of computational operations. It allows for the construction of computing systems that are not only efficient in terms of processing speed and power consumption but also environmentally sustainable. By embodying principles of reversible computing, the Fredkin gate offers a practical solution to reducing the energy costs associated with digital computations, marking a significant shift towards more sustainable computing technologies.

Definition
The basic Fredkin gate is a controlled swap gate (CSWAP gate) that maps three inputs $(C, I_{1}, I_{2})$ onto three outputs $(C, O_{1}, O_{2})$. The C input is mapped directly to the C output. If C = 0, no swap is performed; $I_{1}$ maps to $O_{1}$, and $I_{2}$ maps to $O_{2}$. Otherwise, the two outputs are swapped so that $I_{1}$ maps to $O_{2}$, and $I_{2}$ maps to $O_{1}$. 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.


 * Controlled-SWAP Logic: The Fredkin gate, a three-bit controlled-SWAP gate, operates by conditionally swapping two target bits based on the state of a control bit. If the control bit is 1, the gate swaps the target bits; if 0, the bits pass through unchanged.


 * Reversible Computing: The gate is reversible, meaning that no information is lost during computation. This property aligns with principles of conservative logic, preserving data and reducing energy dissipation. 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
The Fredkin gate can be defined using truth functions with AND, OR, XOR, and NOT, as follows:


 * Cout = Cin,
 * Cout = Cin,
 * Cout = Cin,

where $I_{1}$.

Alternatively:


 * Cout = Cin.
 * Cout = Cin.
 * 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}$, then $O_{1}$.
 * If $O_{2}$, then $O_{1} = I_{1} XOR S$.
 * If $O_{2} = I_{2} XOR S$ and $S = (I_{1} XOR I_{2}) AND C$, then $O_{1} = (NOT C AND I_{1}) OR (C AND I_{2})$.

Example
Three-bit full adder (add with carry) using five Fredkin gates. The "garbage" output bit $g$ is $O_{2} = (C AND I_{1}) OR (NOT C AND I_{2})$ if $I_{2} = 0$, and $O_{2} = C AND I_{1}$ if $I_{2} = 1$.

Inputs on the left, including two constants, go through three gates to quickly determine the parity. The 0 and 1 bits swap places for each input bit that is set, resulting in parity bit on the 4th row and inverse of parity on 5th row.

Then the carry row and the inverse parity row swap if the parity bit is set and swap again if one of the $p$ or $q$ input bits are set (it doesn't matter which is used) and the resulting carry output appears on the 3rd row.

The $p$ and $q$ inputs are only used as gate controls so they appear unchanged in the output.

Quantum Photonic Chip Implementation
Recent research has demonstrated the Fredkin gate on programmable silicon photonic chips. These chips use a network of Mach-Zehnder interferometers to route photons efficiently, creating a versatile and scalable platform that can handle multiple quantum gates. This approach allows for integrating Fredkin gates into large-scale quantum processors, paving the way for future quantum computing advancements.

Efficient Controlled-SWAP Operation
In a photonic setup, the Fredkin gate serves as an effective controlled-SWAP mechanism, enabling the conditional swap of target qubits. This is particularly valuable in generating high-fidelity Greenberger-Horne-Zeilinger (GHZ) states, which are crucial for quantum communication and other protocols. The gate thus provides a powerful tool for quantum protocols that require efficient conditional operations.

Quantum State Estimation
The Fredkin gate's controlled operations allow for estimating the overlap between quantum states without requiring resource-intensive quantum state tomography. This makes it particularly useful for quantum communication, measurement, and cryptography, where efficiency and accuracy are paramount.

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.