Fredkin gate

Last updated
Fredkin (controlled-swap) Gate Qcircuit Fredkin.svg
Fredkin (controlled-swap) 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.

Contents

Background

The Fredkin gate, [1] 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, [2] 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 [3] is a controlled swap gate (CSWAP 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.

Truth table Permutation matrix form
InputOutput
CI1I2CO1O2
000000
001001
010010
011011
100100
101110
110101
111111

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:

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 I2 = 0, then O2 = C AND I1.
If I2 = 1, then O1 = C OR I1.
If I1 = 0 and I2 = 1, then O2 = NOT C.

Hardware description

We can encode the truth table in a hardware description language such as Verilog:

modulefredkin_gate(inputu,inputx1,inputx2,outputv,outputy1,outputy2);always@(*)beginv=u;y1=(~u&x1)|(u&x2);y2=(u&x1)|(~u&x2);endendmodule

Example

Three-bit full adder (add with carry) using five Fredkin gates Full Adder using reversible Fredkin gates.svg
Three-bit full adder (add with carry) using five Fredkin gates

Three-bit full adder (add with carry) using five Fredkin gates. The "garbage" output bit g is (p NOR q) if r = 0, and (p NAND q) if r = 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.

Applications

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. [4]

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. [5]

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. [5]

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. [5] [6]

See also

Related Research Articles

In computing, a linear-feedback shift register (LFSR) is a shift register whose input bit is a linear function of its previous state.

<span class="mw-page-title-main">Exclusive or</span> True when either but not both inputs are true

Exclusive or, exclusive disjunction, exclusive alternation, logical non-equivalence, or logical inequality is a logical operator whose negation is the logical biconditional. With two inputs, XOR is true if and only if the inputs differ. With multiple inputs, XOR is true if and only if the number of true inputs is odd.

In logic circuits, the Toffoli gate, also known as the CCNOT gate (“controlled-controlled-not”), invented by Tommaso Toffoli, is a CNOT gate with two control qubits and one target qubit. That is, the target qubit will be inverted if the first and second qubits are both 1. It is a universal reversible logic gate, which means that any classical reversible circuit can be constructed from Toffoli gates.

An adder, or summer, is a digital circuit that performs addition of numbers. In many computers and other kinds of processors, adders are used in the arithmetic logic units (ALUs). They are also used in other parts of the processor, where they are used to calculate addresses, table indices, increment and decrement operators and similar operations.

<span class="mw-page-title-main">Quantum circuit</span> Model of quantum computing

In quantum information theory, a quantum circuit is a model for quantum computation, similar to classical circuits, in which a computation is a sequence of quantum gates, measurements, initializations of qubits to known values, and possibly other actions. The minimum set of actions that a circuit needs to be able to perform on the qubits to enable quantum computation is known as DiVincenzo's criteria.

<span class="mw-page-title-main">Quantum logic gate</span> Basic circuit in quantum computing

In quantum computing and specifically the quantum circuit model of computation, a quantum logic gate is a basic quantum circuit operating on a small number of qubits. Quantum logic gates are the building blocks of quantum circuits, like classical logic gates are for conventional digital circuits.

Reversible computing is any model of computation where the computational process, to some extent, is time-reversible. In a model of computation that uses deterministic transitions from one state of the abstract machine to another, a necessary condition for reversibility is that the relation of the mapping from states to their successors must be one-to-one. Reversible computing is a form of unconventional computing.

Optical computing or photonic computing uses light waves produced by lasers or incoherent sources for data processing, data storage or data communication for computing. For decades, photons have shown promise to enable a higher bandwidth than the electrons used in conventional computers.

<span class="mw-page-title-main">Controlled NOT gate</span> Quantum logic gate

In computer science, the controlled NOT gate, controlled-X gate, controlled-bit-flip gate, Feynman gate or controlled Pauli-X 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 sometimes named after Richard Feynman who developed an early notation for quantum gate diagrams in 1986.

XOR gate is a digital logic gate that gives a true output when the number of true inputs is odd. An XOR gate implements an exclusive or from mathematical logic; that is, a true output results if one, and only one, of the inputs to the gate is true. If both inputs are false (0/LOW) or both are true, a false output results. XOR represents the inequality function, i.e., the output is true if the inputs are not alike otherwise the output is false. A way to remember XOR is "must have one or the other but not both".

Unconventional computing is computing by any of a wide range of new or unusual methods.

A molecular logic gate is a molecule that performs a logical operation based on at least one physical or chemical inputs and a single output. The field has advanced from simple logic systems based on a single chemical or physical input to molecules capable of combinatorial and sequential operations such as arithmetic operations. Molecular logic gates work with input signals based on chemical processes and with output signals based on spectroscopic phenomena.

<span class="mw-page-title-main">Billiard-ball computer</span> Type of conservative logic circuit

A billiard-ball computer, a type of conservative logic circuit, is an idealized model of a reversible mechanical computer based on Newtonian dynamics, proposed in 1982 by Edward Fredkin and Tommaso Toffoli. Instead of using electronic signals like a conventional computer, it relies on the motion of spherical billiard balls in a friction-free environment made of buffers against which the balls bounce perfectly. It was devised to investigate the relation between computation and reversible processes in physics.

<span class="mw-page-title-main">Incremental computing</span> Software feature

Incremental computing, also known as incremental computation, is a software feature which, whenever a piece of data changes, attempts to save time by only recomputing those outputs which depend on the changed data. When incremental computing is successful, it can be significantly faster than computing new outputs naively. For example, a spreadsheet software package might use incremental computation in its recalculation features, to update only those cells containing formulas which depend on the changed cells.

Natural computing, also called natural computation, is a terminology introduced to encompass three classes of methods: 1) those that take inspiration from nature for the development of novel problem-solving techniques; 2) those that are based on the use of computers to synthesize natural phenomena; and 3) those that employ natural materials to compute. The main fields of research that compose these three branches are artificial neural networks, evolutionary algorithms, swarm intelligence, artificial immune systems, fractal geometry, artificial life, DNA computing, and quantum computing, among others.

Norman H. Margolus is a Canadian-American physicist and computer scientist, known for his work on cellular automata and reversible computing. He is a research affiliate with the Computer Science and Artificial Intelligence Laboratory at the Massachusetts Institute of Technology.

<span class="mw-page-title-main">Reversible cellular automaton</span> Cellular automaton that can be run backwards

A reversible cellular automaton is a cellular automaton in which every configuration has a unique predecessor. That is, it is a regular grid of cells, each containing a state drawn from a finite set of states, with a rule for updating all cells simultaneously based on the states of their neighbors, such that the previous state of any cell before an update can be determined uniquely from the updated states of all the cells. The time-reversed dynamics of a reversible cellular automaton can always be described by another cellular automaton rule, possibly on a much larger neighborhood.

<span class="mw-page-title-main">Ancilla bit</span> Extra bits required in reversible and quantum computation, as bits cannot be modified arbitrarily

In reversible computing, ancilla bits are extra bits being used to implement irreversible logical operations. In classical computation, any memory bit can be turned on or off at will, requiring no prior knowledge or extra complexity. However, this is not the case in quantum computing or classical reversible computing. In these models of computing, all operations on computer memory must be reversible, and toggling a bit on or off would lose the information about the initial value of that bit. For this reason, in a quantum algorithm there is no way to deterministically put bits in a specific prescribed state unless one is given access to bits whose original state is known in advance. Such bits, whose values are known a priori, are known as ancilla bits in a quantum or reversible computing task.

<span class="mw-page-title-main">Phase kickback</span>

In quantum computing, phase kickback refers to the fact that controlled operations have effects on their controls, in addition to on their targets, and that these effects correspond to phasing operations. The phase of one qubit is effectively transferred to another qubit during a controlled operation, creating entanglement and computational advantages that enable various popular quantum algorithms and protocols.

References

  1. Fredkin, Edward; Toffoli, Tommaso (April 1982). "Conservative logic". International Journal of Theoretical Physics. 21 (3–4): 219–253. doi:10.1007/bf01857727. ISSN   0020-7748.
  2. Landauer, R. (July 1961). "Irreversibility and Heat Generation in the Computing Process". IBM Journal of Research and Development. 5 (3): 183–191. doi:10.1147/rd.53.0183. ISSN   0018-8646.
  3. Brown, Julian, The Quest for the Quantum Computer, New York : Touchstone, 2000.
  4. Li, Yuan; Wan, Lingxiao; Zhang, Hui; Zhu, Huihui; Shi, Yuzhi; Chin, Lip Ket; Zhou, Xiaoqi; Kwek, Leong Chuan; Liu, Ai Qun (2022-09-15). "Quantum Fredkin and Toffoli gates on a versatile programmable silicon photonic chip". npj Quantum Information. 8 (1). doi: 10.1038/s41534-022-00627-y . ISSN   2056-6387.
  5. 1 2 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
  6. "Quantum computing is now a big step closer thanks to a new breakthrough: The Fredkin gate".

Further reading