Fact-checked by Grok 2 weeks ago

Fredkin gate

The Fredkin gate, also known as the controlled-SWAP (CSWAP) gate, is a reversible three-bit computational circuit that operates on binary inputs to produce outputs while preserving both the total number of 1s (conservation of information) and the ability to reverse the computation without loss. It takes three input bits, typically denoted as control bit c and data bits a and b, and outputs the control bit unchanged, along with the data bits swapped if c = 1 (i.e., outputs: c, b, a) or passed through unchanged if c = 0 (i.e., outputs: c, a, b). Invented by Edward Fredkin and Tommaso Toffoli as a foundational element of conservative logic—a model of computation reflecting physical principles like reversibility and energy conservation—the gate was introduced in their 1982 paper and serves as a universal primitive for building any reversible Boolean function, including arithmetic operations, when combined with constant inputs. In , the Fredkin gate enables error-free logic operations by avoiding information erasure, which aligns with thermodynamic constraints on computation, and it is self-inverse, meaning applying the gate twice returns the original inputs. Its nonlinearity allows it to implement fundamental operations like , and NOT gates within the conservative framework, where "" outputs may be produced but can always be reconstructed. Beyond classical applications, the Fredkin gate has been adapted for processing as a three-qubit gate, demonstrating high-fidelity implementations in photonic systems, which promise scalable quantum algorithms for tasks like quantum simulation and error correction. These quantum realizations, such as those using orbital modes of , highlight its versatility in bridging classical reversible logic with quantum technologies.

Introduction and Background

Historical Development

The development of the emerged within the broader framework of , which sought to mitigate fundamental physical limits on computational efficiency. In , Tommaso Toffoli laid foundational groundwork by formalizing the theory of , emphasizing invertible primitives and composition rules that preserve invertibility to enable without information loss. This work highlighted the potential for computational models aligned with physical reversibility, setting the stage for subsequent innovations in logic design. Edward Fredkin introduced the Fredkin gate in 1982 as a key component of conservative logic systems, co-authoring the seminal paper "Conservative Logic" with Toffoli, which proposed a reflecting principles such as the of . The gate was initially proposed in the context of model, a collision-based where elastic interactions of idealized spheres simulate logical operations without , illustrating how reversible could underpin physically realizable . This model demonstrated the gate's role in arranging signal paths through controlled swaps, conserving both the number and integrity of information-bearing particles. The Physics of Computation workshop, held May 6-8, 1981, at MIT's Endicott House, with proceedings published in , contributed to the development of ideas in reversible and conservative . The primary motivation for its invention stemmed from addressing energy dissipation limits in irreversible , as articulated by Rolf Landauer's 1961 , which established that erasing one bit of incurs a minimum thermodynamic cost of kT \ln 2 (where k is Boltzmann's constant and T is ), leading to inevitable generation in traditional . By enabling permutation-based operations that avoid such erasure, the Fredkin gate offered a pathway to dissipationless , influencing subsequent in low-power and physically conservative architectures.

Role in Reversible Computing

Reversible computing encompasses computational models where every logical operation is bijective, ensuring a mapping between inputs and outputs that preserves all without . This approach contrasts with traditional irreversible computing by allowing the full recovery of prior states from subsequent ones, thereby minimizing dissipation associated with information loss. In conservative logic, a framework for reversible computation, gates operate on binary strings while maintaining both reversibility and the conservation of the number of 1s (or "energy units") in the inputs and outputs. The motivation for stems from , which establishes that the irreversible erasure of one bit of incurs a minimum thermodynamic cost of kT \ln 2, where k is Boltzmann's constant and T is the absolute temperature, leading to heat dissipation as a fundamental limit. Irreversible gates, such as AND or OR, exemplify this issue by mapping multiple input combinations to the same output, effectively discarding and generating . By contrast, reversible gates like the Fredkin gate avoid such erasure, enabling computations that approach energy requirements, particularly in low-power or nanoscale systems where thermal limits become critical. The serves as a foundational in , recognized as for conservative logic alongside the , which is for general . It facilitates the of arbitrary reversible circuits through compositions that permute input states bijectively while conserving the , providing essential building blocks for information-preserving operations. These permutation-based and conservative properties underpin the gate's role in enabling scalable, energy-efficient logic designs without the need for auxiliary bits in certain contexts.

Classical Fredkin Gate

Definition and Inputs/Outputs

The Fredkin gate is a reversible with three inputs, denoted as A (the input), B, and C, and three corresponding outputs. It operates by leaving the input A unchanged in the first output while conditionally swapping the data inputs B and C based on the value of A. The outputs can be expressed notationally as (A, B if A=0 else C, C if A=0 else B), meaning that when A = 0, the outputs are (A, B, C) with no swap, and when A = 1, the outputs are (A, C, B) with B and C exchanged. In Boolean algebra, the outputs are defined as follows: \begin{align*} \text{Output}_1 &= A, \\ \text{Output}_2 &= \bar{A} B + A C, \\ \text{Output}_3 &= \bar{A} C + A B, \end{align*} where \bar{A} denotes the logical NOT of A. This formulation ensures the gate is bijective and self-inverse, preserving the number of inputs and outputs for reversibility. The gate's signal flow is visualized in a standard diagram with three parallel input lines for A, B, and C. The line for A connects straight to its output without alteration, serving as the control. The lines for B and C connect directly to their respective outputs when A = 0, but include a conditional crossover switch that interchanges them when A = 1, often represented by a diamond-shaped symbol or crossed paths activated by the control signal. Unlike the unconditional SWAP gate, which always exchanges two bits regardless of any control, the Fredkin gate's conditional swapping mechanism based on the control bit A classifies it as a controlled-SWAP (CSWAP) gate.

Truth Table and Permutation Behavior

The Fredkin gate operates on three input bits, typically denoted as a control bit C and two target bits A and B, producing three output bits where the control bit remains unchanged, and the target bits are either preserved or swapped depending on the control value. The complete truth table enumerates all eight possible input combinations and their corresponding outputs, demonstrating the conditional swap behavior: when C = 0, the outputs are C' = 0, A' = A, B' = B; when C = 1, the outputs are C' = 1, A' = B, B' = A.
Input CInput AInput BOutput C'Output A'Output B'
000000
001001
010010
011011
100100
101110
110101
111111
This mapping defines the Fredkin gate as a permutation of the 8 possible 3-bit states, represented in cycle notation as the product of fixed points (000), (001), (010), (011), (100), (111) and a single 2-cycle (101 110), where the binary strings denote the states in order CAB. The permutation swaps the states 101 and 110 while leaving all others unchanged, reflecting the conditional swap on the target bits only when the control bit is 1. As a permutation, the Fredkin gate is bijective, meaning every input state maps to a unique output state and vice versa, which guarantees its reversibility since applying the gate twice returns the original inputs. This bijectivity ensures no information loss, a key property for , and the cycle structure highlights its minimal disruption to the state space beyond the necessary swap.

Construction of Basic Gates

The Fredkin gate enables the synthesis of fundamental irreversible logic gates such as , XOR, and NOT by incorporating constant ancilla bits (fixed at 0 or 1) as inputs and employing cascades of Fredkin gates where required to maintain reversibility, with garbage outputs accepted on unused lines. These constructions leverage the gate's conditional swap operation, where the control bit remains unchanged, and the two bits are swapped only if the control is 1.

AND Gate

The is constructed using a single Fredkin gate with an fixed at 0. The inputs are configured as follows: receives input A, first line receives the constant 0 ancilla, and second line receives input B. The outputs are the (A, ), first line (A AND B, desired result), and second line (\bar{A} AND B, ). This preserves the total number of 1s across inputs and outputs, ensuring reversibility. The circuit can be represented as:
  • Inputs: A (control), 0 (data 1, ancilla), B (data 2)
  • Fredkin Gate
  • Outputs: A (garbage), A ∧ B (desired), \bar{A} ∧ B (garbage)
Verification against the confirms the desired output matches standard AND behavior when selecting the appropriate line.

OR Gate

Similarly, the OR gate uses a single Fredkin gate with an fixed at 1. Inputs are: control line A, first data line B, second data line constant 1 ancilla. Outputs are control line (A, ), first data line (A OR B, desired), and second data line (\bar{A} OR B, ). Reversibility is maintained through balanced 1s conservation. The circuit is:
  • Inputs: A (control), B (data 1), 1 (data 2, ancilla)
  • Fredkin Gate
  • Outputs: A (garbage), A ∨ B (desired), \bar{A} ∨ B (garbage)

XOR Gate

The XOR gate exploits the Fredkin gate's swap property and is synthesized using cascades of Fredkin gates with ancillas initialized to 0 or 1, allowing computation of the exclusive-or while managing outputs to preserve reversibility and the number of 1s. Detailed constructions typically involve multiple gates and may require additional ancilla bits beyond a single 3-bit line to route signals correctly.

NOT Gate

The NOT gate is implemented with a single Fredkin gate using constants 0 and as ancillas. Inputs are: control line A, first data line 0 (ancilla), second data line (ancilla). Outputs are control line (A, garbage), first data line (A, garbage), and second data line (NOT A, desired). This configuration effectively inverts A through the conditional swap, conserving 1s count for reversibility. The circuit is:
  • Inputs: A (control), 0 (data 1, ancilla), 1 (data 2, ancilla)
  • Fredkin Gate
  • Outputs: A (garbage), A (garbage), ¬A (desired)

Theoretical Properties

Conservativeness

Conservative logic gates are those that preserve the of their inputs, meaning the number of 1s in the input equals the number of 1s in the output . This property ensures that the gate rearranges bits without creating or destroying them, aligning with principles of in physical systems. The Fredkin gate exemplifies conservativeness through its controlled-swap operation on three bits, denoted as inputs A, B, and C, producing outputs A', B', and C'. When A = 0, the outputs are A' = 0, B' = B, and C' = C, directly preserving the inputs. When A = 1, the outputs are A' = 1, B' = C, and C' = B, swapping B and C while keeping A unchanged. In both cases, the Hamming weight remains invariant because the swap does not alter the total number of 1s. This can be expressed mathematically as the sum of the outputs equaling the sum of the inputs: A' + B' + C' = A + B + C This equality holds regardless of the input values, confirming the gate's conservativeness. The conservativeness of the Fredkin gate has significant implications for physical implementations in reversible computing, as it avoids the energy dissipation associated with charge creation or annihilation that occurs in non-conservative operations. By maintaining the number of signal carriers (e.g., electrons or particles), such gates enable low-power designs where energy loss is minimized, approaching the theoretical limits set by Landauer's principle for reversible processes. In contrast, other reversible gates like the , which performs a controlled-controlled-NOT operation, do not preserve ; for instance, it can increase or decrease the number of 1s depending on the input configuration. This distinction highlights the Fredkin gate's stricter adherence to conservation laws, making it particularly suitable for energy-efficient conservative logic systems.

Functional Completeness

In , a gate set is functionally complete if it can generate all possible functions through compositions of its gates, possibly with the aid of ancillary bits initialized to constant values. The Fredkin gate achieves this universality when combined with constants (such as 0 or 1) and allowances for outputs, enabling the of irreversible operations within a reversible framework. The proof of the Fredkin gate's functional completeness relies on its ability to construct the basic irreversible gates NOT, AND, and OR, which together form a complete set for classical . For the , set the to a, the first input to constant 0, and the second input to b; the first output then carries a \land b, with on the and second output. Similarly, the is realized by setting the to a, the first input to b, and the second input to constant 1, producing a \lor b on the first output alongside . The NOT gate is obtained by setting the to the input bit, the first input to constant 1, and the second input to constant 0, resulting in the inverted bit on the first output, with on the and second output. These constructions demonstrate that the Fredkin gate, augmented by constants, can replicate any by embedding standard gates and managing through uncomputation. To achieve full reversible universality for arbitrary computations, Bennett's embeds irreversible algorithms into reversible ones using the Fredkin gate as the primitive. This involves reversible where each irreversible step is expanded into a sequence of reversible operations, with ancillas used to store intermediate results and garbage cleaned up by running computations backward, ensuring no net information loss. The approach scales with additional space proportional to the computation's depth, allowing . In the quantum domain, the Fredkin gate serves an analogous role to the classical but emphasizes controlled swaps over controlled-not operations, contributing to quantum gate sets when paired with single-qubit rotations. However, like its classical counterpart, it requires ancillas for completeness and cannot generate all reversible functions without them, as it preserves the of inputs.

Permutation Characteristics

The Fredkin gate, as a 3-bit reversible logic gate, induces a permutation on the set of 8 possible input states, thereby representing an element of the symmetric group S_8, where the states are identified with binary strings from 000 to 111. The cycle decomposition of this permutation can be determined by examining the gate's action on each state. The gate leaves all states with control bit A = 0 unchanged, resulting in four fixed points (1-cycles): (000), (001), (010), (011). For states with A = 1, the gate fixes those where the target bits B and C are equal—(100) and (111)—while swapping the states where B ≠ C, yielding the 2-cycle (101 110). Thus, the full cycle decomposition consists of six 1-cycles and one 2-cycle. To arrive at this, list the mappings explicitly: the permutation σ satisfies σ(000) = 000, σ(001) = 001, σ(010) = 010, σ(011) = 011, σ(100) = 100, σ(101) = 110, σ(110) = 101, σ(111) = 111; tracing orbits reveals the fixed points and the single swap. This is , with -1, as it equals a single (a 2-cycle). Its order is 2, since the is self-inverse: applying it twice yields the identity . Cascades of multiple Fredkin s, possibly with rewiring of control and target lines, generate the A_{2^n} on the state space for n \geq 4 bits when embedded appropriately, while inclusion of s allows generation of the full S_{2^n}. With one , Fredkin s suffice to generate all conservative (Hamming weight-preserving) reversible functions on n bits. These characteristics underpin the Fredkin gate's utility in constructing reversible networks and circuits, where conditional swaps enable efficient, information-preserving implementations of comparators and routers, as demonstrated in models like computer.

Physical Implementations

Billiard Ball Model

The billiard ball model, proposed by and Tommaso Toffoli in 1982, provides a mechanical illustration of using elastic collisions of identical hard spheres to implement operations, including the Fredkin gate. In this idealized two-dimensional setup, signals are represented by the presence (logical 1) or absence (logical 0) of billiard balls, each with radius \frac{1}{\sqrt{2}}, moving at a uniform speed of one unit of space per unit of time along a grid of paths. The model relies on perfectly elastic collisions at right angles, which conserve both the number of balls and their total , ensuring reversibility without dissipation in ideal conditions. For the Fredkin gate implementation, the setup involves three input paths for the signal (A) and signals (B and C), routed through channels or mirrors to simulate conditional . When the ball is present (=1 in the original definition), the signals B and C follow parallel paths without (no swap). When the ball is absent (=0), the signals cross paths, effectively their trajectories. This conditional crossover is achieved using gates formed by collision , often augmented with stationary mirrors for routing, delays, and crossovers to maintain and clearance between finite-sized balls (as illustrated in the model's figures, such as the switch-gate-based realization attributed to Feynman and Ressler). The path design mimics the gate's behavior, where the output preserves the input signals but conditionally exchanges B and C based on A, consistent with the original definition that swaps when =0. This analog, collision-based approach offers key advantages for conservative , as it avoids the that causes in traditional , potentially enabling low-power, thermodynamically efficient systems in principle. However, the model is highly stylized and idealized, assuming frictionless environments, perfect elasticity, and precise timing, which pose significant practical challenges for real-world construction, including synchronization issues due to ball size and the need for exact path geometries.

Transistor and Electronic Designs

The Fredkin gate, a conservative reversible logic gate that performs a controlled swap on its second and third inputs based on the first input, can be realized in classical hardware using complementary metal-oxide-semiconductor () technology. Basic implementations leverage transmission gates and to achieve the required behavior without information loss, ensuring the gate's reversibility. In these designs, the first output is a direct copy of the control input A, while the second and third outputs are selected via multiplexers: the second output is B if A=0 or C if A=1, and the third is C if A=0 or B if A=1. This conditional swap is implemented using controlled by A and its complement, minimizing transistor usage compared to fully irreversible counterparts. Circuit schematics typically employ a multiplexer-based structure where pass transistors form the data paths for inputs B and C. For instance, in , NMOS transistors gated by A and A' (generated via an inverter) route B and C to the outputs, with the control input buffered to preserve . A common variant uses complementary pass gates (NMOS and PMOS pairs) for each selection path to reduce voltage degradation, resulting in a with shared inverters for the signals. These designs avoid complex AND-OR structures, opting instead for direct transmission to maintain low latency and area overhead. Transistor counts vary by implementation style but generally range from 6 to 16 for a full 3x3 . achieves around 6 transistors by relying on NMOS-only paths with minimal buffering, while standard designs require 13 transistors to include complementary pairs and inverters for robust operation. Reversible complementary pass-transistor logic (R-CPL) variants use 16 transistors in a two-row layout to optimize for libraries, balancing reversibility with drive strength. This efficiency stems from the gate's conservativeness, which eliminates irreversible computations that would otherwise demand additional transistors for or restoration. Power dissipation in these CMOS Fredkin gates is notably low due to the reversible nature, which avoids the thermodynamic cost of bit erasure present in conventional logic. Simulations in 0.18 μm technology show pass transistor implementations consuming as little as 1.7 at 1.5 supply, compared to 11.7 for full at the same voltage, with further reductions at lower voltages highlighting for low-power applications. Ancilla , often needed for embedding in larger reversible circuits, introduce minor overhead but do not significantly elevate dissipation in isolated tests. Simulations using libraries and tools like ELDO and Virtuoso confirm favorable performance metrics. In 0.35 μm , R-CPL Fredkin cells exhibit a compact area of approximately 20 μm width by 15 μm height, with routing on two metal layers enabling dense integration. Delay analyses in 0.18 μm processes report propagation delays around 0.34 ns for circuits incorporating the , such as shift registers, underscoring its suitability for high-speed without excessive area penalties. These results, derived from SPICE-level verification, emphasize the gate's practical viability in digital VLSI flows.

Nanoscale QCA Designs

(QCA) represent a promising for nanoscale beyond technology, where each QCA cell consists of four quantum dots arranged in a square, with two electrons in diagonally opposite dots encoding through electrostatic repulsion between electrons. This repulsion ensures that neighboring cells align their , propagating signals without traditional flow, thereby enabling high-density integration and reduced power dissipation. Recent advances in QCA implementations of the Fredkin gate have focused on optimizing cell count, latency, and area to enhance performance in reversible logic circuits. A 2022 design proposes a high-performance QCA Fredkin gate using 32 cells across 2 clock zones, incorporating majority voter gates for conditional logic and coplanar wire crossings to facilitate the swap operation between the two controlled inputs. This layout achieves an area of 0.025 μm² and low energy dissipation on the order of 10^{-2} eV, outperforming prior configurations by reducing complexity while maintaining reversibility. Similarly, a 2024 study introduces an efficient QCA Fredkin gate with 33 cells and 2 clock phases, leveraging a symmetric multiplexer-based structure with majority voters to minimize delay and design costs by up to 337% compared to earlier models. These optimized Fredkin gates enable compact realizations of larger reversible systems, demonstrating advantages in density and power efficiency suitable for beyond-CMOS applications. For instance, the design scales to a 4-bit reversible binary-to-gray converter using 5 Feynman gates and 2 Fredkin gates, requiring 162 cells over 8 clock zones and occupying 0.19 μm², which supports error-free data encoding with minimal power overhead. An extension to an 8-bit converter employs 13 Feynman and 6 Fredkin gates, further illustrating scalability for tasks. Additionally, the 2024 work integrates the Fredkin gate into a conservative D-latch design with 46 cells and 2 clock phases, achieving 610% improvement in costs and area of 0.042 μm², which enhances reliability in for . Such metrics underscore QCA Fredkin gates' potential for low-power, high-density reversible circuits, with simulations validating functionality via tools like QCADesigner.

Applications

Reversible Logic Circuits

The Fredkin gate, with its controlled-swap operation, facilitates the construction of larger reversible logic circuits by enabling permutation-based routing of signals without information loss. This property makes it particularly suitable for building components like multiplexers and adders, where data selection and arithmetic propagation must remain bijective to support reversibility. In , such circuits preserve the input-output mapping injectively, allowing full recovery of inputs from outputs, which is essential for applications requiring minimal increase. A basic 2:1 is directly implemented by a single Fredkin gate, where the input selects between two data lines by swapping them if the is 1, otherwise passing them unchanged, while the bit is copied to the output. Larger multiplexers, such as an 8:1 design, are constructed by cascading Fredkin gates in a structure: three levels of 2:1 multiplexers route eight data inputs based on three bits, requiring seven Fredkin gates total and producing one output per level to maintain reversibility. This approach minimizes quantum cost at 35 (7 gates × 5 cost each) while preserving signal integrity. Reversible adders leverage cascaded for , embedding classical logic into a bijective . A full , for instance, can be realized with five Fredkin gates: the first two compute intermediate propagate and generate terms, the next two handle carry generation without , and the final one produces the sum, with inputs including the two addends and carry-in, yielding sum, carry-out, and a garbage bit. For a 4-bit , these full adders are chained in a -carry or carry-skip configuration; a carry-skip variant uses 20 Fredkin gates for the four full adders plus three additional gates for skip logic and a 4-input AND, totaling 23 gates, which accelerates for wider operands by bypassing slower delays in fixed blocks. Ancilla management is crucial in these Fredkin-based adders to accommodate non-reversible operations like or adjustment. Ancilla inputs—typically set to 0 or 1—are introduced as extra lines to supply constants without violating bijectivity; for example, a full may require one ancilla input for carry initialization, producing an equal number of garbage outputs that can be discarded post-computation or recycled in larger circuits to reduce overhead. Optimized designs minimize ancillas to one per full adder stage, embedding irreversible adder kernels while keeping total inputs at n + k for n-bit operands and k ancillas. In terms of , Fredkin-based often achieve lower overall counts than Toffoli-based counterparts for equivalent functionality; a 4-bit Toffoli adder typically requires 28–32 gates (including auxiliaries for controls), whereas the Fredkin carry-skip design uses 23, with quantum costs of 115 versus 140–160, respectively, due to Fredkin's inherent in swap operations without extra controls. These metrics highlight reduced hardware complexity while maintaining delay bounds, such as 4 gate delays for carry in the full adder. Verification of Fredkin gate circuits is supported by tools like RCViewer, an for synthesizing, visualizing, and computing metrics (e.g., gate count, quantum cost) of reversible designs, allowing of functionality and fault detection through input-output checks. The primary benefits of Fredkin-based reversible circuits include error-free , as reversibility prevents bit and associated logical faults, and substantial power savings in low-energy scenarios, where kT ln(2) per erased bit (Landauer's ) is avoided, enabling near-zero heat generation for repeated operations. Recent applications include the use of Fredkin gates in Physically Unclonable Functions (PUFs) for hardware security, such as arbiter PUFs on FPGAs, where reversibility aids in low-power, challenge-response authentication mechanisms as of 2024.

Conservative Computing Systems

Conservative computing systems leverage the Fredkin gate's inherent conservativeness to construct computational architectures where the total number of active signals, or "1s," remains invariant across the entire network, preventing information loss and enabling dissipation-free operation in principle. These systems, rooted in conservative logic, model computation as the rearrangement of signals rather than their creation or destruction, making them suitable for physical substrates where signal conservation mirrors fundamental physical laws such as particle number preservation. In such systems, conservative networks are formed by cascading Fredkin gates and their derivatives, ensuring that the aggregate number of 1s on input wires equals that on output wires, thus maintaining balance without auxiliary bits or garbage generation. This property facilitates efficient signal routing in multi-wire environments, where Fredkin gates act as conditional exchangers to permute signals based on control lines without altering the overall signal count. For instance, a Fredkin-based sorter can organize signals across parallel channels by selectively swapping adjacent pairs under control, preserving the total activity level while achieving ordered outputs, as demonstrated in reversible sorting networks. Applications of these systems extend to unconventional computing paradigms, such as DNA computing, where Fredkin gates are realized through biochemical strand displacement reactions that reversibly bind and release DNA strands to simulate controlled swaps, conserving the number of active molecular signals. Similarly, in soliton-based computing, Fredkin gate operations emerge from elastic collisions of soliton waves in cellular automata models, where particle-like excitations propagate and interact to route signals without net creation or annihilation, enabling robust computation in nonlinear media like optical fibers. The of conservative systems stems from their adherence to reversible principles, where ideal implementations of Fredkin gate networks produce theoretically zero heat dissipation per operation, as no logical irreversibility occurs to violate Landauer's limit on information . While DNA implementations of Fredkin-based logic have been proposed and simulated to avoid signal , experimental demonstrations of reduced energy costs remain aligned with theoretical expectations from reversible principles. A notable case study involves hybrid Toffoli-Fredkin networks, which combine the Fredkin gate's signal-conserving swaps with the Toffoli gate's computational universality to design balanced reversible circuits that minimize both gate count and ancillary inputs while preserving overall conservativeness. These hybrids have been synthesized for applications like low-power adders and multiplexers, achieving improvements in quantum cost metrics in some benchmarks compared to Toffoli-only designs.

Signal Processing Examples

The Fredkin gate functions as a controlled exchanger in data paths for , where the input dictates whether two incoming signals are swapped or transmitted straight through to the outputs, enabling lossless redirection without altering signal values. This mechanism is central to conservative logic systems, reducing all to conditional permutations that preserve information integrity. In practical implementations, such as bioelectronic interfaces, the gate routes two signals between output channels based on the third channel, facilitating reversible data path switching in low-energy computing environments. A representative circuit example is a 3-bit permutation network constructed from cascaded Fredkin gates to sort small binary inputs, where each gate conditionally swaps adjacent bits if the control bit indicates an inversion, achieving a reversible sorting permutation akin to a simplified odd-even transposition network. Leveraging the gate's inherent permutation characteristics, this setup ensures bijective mapping of input states to sorted outputs without ancillary bits in minimal-depth configurations. In applications, Fredkin gates enable reversible () filters that maintain signal integrity by performing convolutions through conservative operations, avoiding the information loss typical in irreversible multipliers and adders. For instance, a 4-tap filter model implemented solely with Fredkin gates processes input samples via controlled swaps and ancillary computations, yielding outputs that fully recover original signals upon reversal, with demonstrated reductions in power dissipation for embedded systems. Performance analyses of Fredkin-based reversible routers reveal higher latency compared to irreversible designs, primarily due to the overhead of control signaling and balanced fan-in/fan-out. (QCA) implementations exhibit increased delays relative to irreversible counterparts. Historically, early proposals by Fredkin and Toffoli in 1982 integrated the gate into architectures, using conditional signal routing to enable simultaneous computations across multiple paths in billiard-ball models, foreshadowing its role in scalable, low-dissipation multiprocessor systems.

Quantum Fredkin Gate

Definition and Quantum Operation

The quantum Fredkin gate, also known as the controlled-SWAP (CSWAP) gate, is a three-qubit that generalizes the classical Fredkin gate—a reversible controlled swap on bits—to the quantum setting by acting on s while preserving . It operates on an input state |A⟩|B⟩|C⟩, where |A⟩ is the qubit and |B⟩, |C⟩ are the target qubits, by leaving the targets unchanged if the control is |0⟩ and swapping them if the control is |1⟩:
|A\rangle |B\rangle |C\rangle \mapsto |A\rangle \begin{cases} |B\rangle |C\rangle & \text{if } A = 0 \\ |C\rangle |B\rangle & \text{if } A = 1 \end{cases}
This conditional swap is defined with respect to the computational basis {|0⟩, |1⟩} of the qubit.
In matrix representation, the quantum Fredkin gate is an 8×8 unitary matrix (corresponding to the 2³-dimensional Hilbert space of three qubits) that applies the 4×4 identity matrix to the subspace spanned by states with control qubit |0⟩ (i.e., the first four basis states |000⟩, |001⟩, |010⟩, |011⟩) and the SWAP operator to the subspace with control |1⟩ (the last four basis states |100⟩, |101⟩, |110⟩, |111⟩, permuted as |100⟩ ↦ |100⟩, |101⟩ ↦ |110⟩, |110⟩ ↦ |101⟩, |111⟩ ↦ |111⟩). The explicit matrix in the computational basis is: 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{pmatrix}. $$ This form ensures the operator is unitary (U_F^\dagger U_F = I) and thus reversible, while also conserving the total probability across all output states.[](https://profmcruz.wordpress.com/wp-content/uploads/2017/08/quantum-computation-and-quantum-information-nielsen-chuang.pdf)[](https://www.nature.com/articles/s41534-022-00627-y) The operator can be expressed compactly as $$ U_F = |0\rangle\langle 0| \otimes I_2 \otimes I_2 + |1\rangle\langle 1| \otimes \mathrm{SWAP}_{B,C}, $$ where SWAP_{B,C} is the two-qubit swap operator exchanging qubits B and C, and I_2 is the single-qubit identity.[](https://cklixx.people.wm.edu/teaching/QC2021/QC-chapter5.pdf)[](https://profmcruz.wordpress.com/wp-content/uploads/2017/08/quantum-computation-and-quantum-information-nielsen-chuang.pdf) In contrast to the classical Fredkin gate, which requires definite bit values and collapses superpositions upon measurement, the quantum version processes superposed or entangled states coherently without collapse, enabling applications in quantum algorithms that rely on maintaining quantum information integrity.[](https://www.science.org/doi/10.1126/sciadv.1501531)[](https://profmcruz.wordpress.com/wp-content/uploads/2017/08/quantum-computation-and-quantum-information-nielsen-chuang.pdf) ### Photonic and Optical Implementations Photonic implementations of the quantum Fredkin gate, also known as the controlled-SWAP (CSWAP) gate, have advanced significantly since the 2010s, leveraging optical elements to realize three-qubit operations with photons as qubits. Early demonstrations utilized bulk linear optics setups with integrated concepts like waveguides and beam splitters to achieve controlled interference, enabling the gate's conditional swapping functionality. For instance, a 2016 experiment employed polarizing and nonpolarizing beam splitters, half-wave plates, and calcite beam displacers in a displaced Sagnac interferometer configuration to implement the gate, demonstrating its use in generating high-fidelity GHZ states with purities up to 0.87.[](https://www.science.org/doi/10.1126/sciadv.1501531) Subsequent work in the late [2010s](/page/2010s) transitioned toward more compact designs, incorporating Mach-Zehnder interferometers (MZIs) for precise phase control and interference. A 2017 realization used a hybrid partially polarizing beam splitter in an MZI architecture, achieving classical fidelity of 0.85 ± 0.03 and process fidelity of 0.77 ± 0.09 for photonic qubits generated via [spontaneous parametric down-conversion](/page/Spontaneous_parametric_down-conversion). Qubits were encoded in [photon polarization](/page/Photon_polarization) states, with the control qubit determining the swap of target qubits, though success probabilities remained low at 1/162 due to postselection requirements.[](https://www.nature.com/articles/srep45353) Recent advances from 2020 to 2025 have focused on integrated [silicon photonics](/page/Silicon_photonics) for reduced loss and improved scalability, enabling on-chip CSWAP operations. A 2022 programmable [silicon](/page/Silicon) photonic chip, fabricated on a silicon-on-insulator platform, implemented the Fredkin gate using MZIs and thermo-optic phase shifters to execute a 6×6 nonunitary [transformation](/page/Transformation) via [singular value decomposition](/page/Singular_value_decomposition). Here, qubits were encoded in dual-rail path modes from photon pairs produced by spontaneous [four-wave mixing](/page/Four-wave_mixing), yielding classical [fidelity](/page/Fidelity) of 0.75 ± 0.02 and quantum superposition [fidelity](/page/Fidelity) of 0.70 ± 0.03, with potential for multi-gate circuits through reconfigurability.[](https://www.nature.com/articles/s41534-022-00627-y) These integrated approaches prioritize low-loss waveguides to minimize [photon](/page/Photon) [absorption](/page/Absorption), though on-chip [transmission](/page/Transmission) efficiencies are still challenged by coupling losses around 50%.[](https://www.nature.com/articles/s41534-022-00627-y) In [2024](/page/2024), a deterministic [implementation](/page/Implementation) using single [photons](/page/Photon) achieved a process fidelity of 0.935 ± 0.001, enabling applications in hybrid shadow tomography with reduced [sample complexity](/page/Sample_complexity).[](https://arxiv.org/abs/2404.11850) In [November](/page/November) 2025, an AI-driven [discovery](/page/Discovery) via the PyTheus framework proposed a non-local photonic realization requiring only four ancilla [photons](/page/Photon), leveraging path identity and photon indistinguishability for operations across spatially separated devices without shared entanglement or Bell-state measurements.[](https://arxiv.org/abs/2511.04648) Typical setups in these photonic realizations encode the control qubit in [polarization](/page/Polarization) or spatial path modes, while targets use similar [degrees of freedom](/page/Degrees_of_freedom), with MZIs providing the conditional interference needed for the CSWAP operation—where the matrix swaps the target [state](/page/State)s only if the control is in the |1⟩ state. Experimental metrics highlight [progress](/page/Progress) toward practical use, with output [state](/page/State) fidelities exceeding 0.80 in optimized configurations and demonstrations of [scalability](/page/Scalability) to hybrid multi-gate processors on a single [chip](/page/Chip). However, challenges persist, including photon loss in optical paths leading to reduced [coincidence](/page/Coincidence) rates (e.g., ~3 events per hour in early chips) and the need for advanced error correction to mitigate multi-photon noise and imperfect mode overlaps.[](https://www.science.org/doi/10.1126/sciadv.1501531)[](https://www.nature.com/articles/srep45353)[](https://www.nature.com/articles/s41534-022-00627-y) Future improvements in single-photon sources and detector integration are essential to boost fidelities above 95% for fault-tolerant [quantum computing](/page/Quantum_computing).[](https://www.nature.com/articles/s41534-022-00627-y) ### Quantum Information Applications The quantum Fredkin gate serves as a controlled-SWAP (CSWAP) operation in quantum circuits, enabling conditional permutation of target qubits based on the control qubit's state. This functionality is essential for error correction schemes that rely on non-demolition measurements of entanglement.[](https://www.nature.com/articles/srep45353) For state estimation, the quantum Fredkin gate enables efficient measurement of multi-qubit states by applying permutations that directly probe nonlinear functionals, such as state purity $ P = \Tr[\rho^2] $ and overlap $ |\langle \psi_1 | \psi_2 \rangle|^2 $, through [interference](/page/Interference) in an interferometer setup. This method avoids the exponential scaling of full [quantum state](/page/Quantum_state) tomography by leveraging the gate's controlled swapping to generate visibility in interference patterns, yielding estimates like purity values from 0.82 for pure states to 0.03 for maximally mixed ones.[](https://www.science.org/doi/10.1126/sciadv.1501531) The gate finds applications in variational quantum eigensolvers (VQE), where efficient CSWAP operations help construct symmetry-adapted ansatze that enforce conservation laws like total [spin](/page/Spin), improving [convergence](/page/Convergence) to [ground](/page/Ground) states in molecular simulations.[](https://link.aps.org/doi/10.1103/PhysRevA.101.052340) In reversible quantum arithmetic, it forms a building block for universal reversible computation, supporting fault-tolerant adders and multipliers by enabling permutation-based operations that maintain unitarity and reversibility.[](https://www.nature.com/articles/s41534-022-00627-y) Experiments in the 2020s using photonic implementations of the quantum Fredkin gate have advanced [state tomography](/page/Tomography), particularly via hybrid shadow tomography, where the gate estimates higher-order moments (up to fourth order) of quantum states with reduced [sample complexity](/page/Sample_complexity) compared to classical [shadows](/page/The_Shadows). These photonic setups, achieving process fidelities of 0.935 ± 0.001, demonstrate the gate's role in virtual distillation and quantum metrology tasks.[](https://arxiv.org/abs/2404.11850) A significant advantage of the quantum Fredkin gate in fault-tolerant computing is its ability to reduce ancilla overhead relative to Toffoli-based decompositions, as direct implementations require no ancillary photons and avoid the resource-intensive [breakdown](/page/Breakdown) into multiple two-qubit gates, potentially lowering overall [circuit](/page/Circuit) depth by an [order of magnitude](/page/Order_of_magnitude) in success probability.[](https://ar5iv.labs.arxiv.org/html/1603.08086)

References

  1. [1]
    Conservative logic | International Journal of Theoretical Physics
    Conservative logic is a comprehensive model of computation which explicitly reflects a number of fundamental principles of physics.
  2. [2]
    [PDF] Conservative Logic, - DTIC
    Observe that the Fredkin gate is nonlinear and coincides with its own inverse. In conservative logic, all signal processing is ultimately reduced to conditional ...
  3. [3]
    A quantum Fredkin gate | Science Advances
    Mar 25, 2016 · We use photonic qubit logic to demonstrate the first quantum Fredkin gate, which promises many applications in quantum information and measurement.
  4. [4]
    Quantum Fredkin and Toffoli gates on a versatile programmable ...
    Sep 15, 2022 · In quantum information processing, Fredkin gate and Toffoli gate are the most commonly used three-qubit gates. The Fredkin gate is the ...
  5. [5]
    Quantum-inspired Fredkin gate based on spatial modes of light
    The gate uses light beams carrying orbital angular momentum. Intrinsic characteristics of the spatial shape of these modes allow implementing a c-SWAP operation ...
  6. [6]
    [PDF] reversible computing - CSAIL Publications - MIT
    REVERSIBLE COMPUTING. Tommaso Toffoli. February 1980. Page 2. REVERSIBLE COMPUTING*. Tommaso Toffoli. MIT Laboratory for Computer Science. 545 Technology Sq ...Missing: primary | Show results with:primary
  7. [7]
    Physics of Computation
    1982. Physics of Computation. Ed Fredkin, Rolf Landauer, and Tom Toffoli, Organizers. The "Physics of Computation" conference was held on May 6-8, 1981 at ...
  8. [8]
    Irreversibility and Heat Generation in the Computing Process
    It is argued that computing machines inevitably involve devices which perform logical functions that do not have a single-valued inverse.
  9. [9]
    [PDF] arXiv:2305.18128v3 [quant-ph] 27 Feb 2024
    Feb 27, 2024 · The controlled-SWAP and controlled-controlled-NOT gates are at the heart of the original proposal of reversible classical computation by Fredkin ...
  10. [10]
    [PDF] The Fredkin Gate. - UTK-EECS
    Universal: The Fredkin gate is a universal Boolean primitive for con- servative logic. Page 3. C. REVERSIBLE COMPUTING. 65 of any length (cf.
  11. [11]
  12. [12]
    [PDF] B Conservative logic - UTK-EECS
    Billiard ball model: To illustrate dissipationless ballistic computa- tion, Fredkin and Toffoli defined a billiard ball model of computation. ¶2. It is ...
  13. [13]
    Shallow unitary decompositions of quantum Fredkin and Toffoli ...
    Mar 1, 2024 · ... Fredkin and Hadamard is also universal. However, because the Fredkin gate is conservative (i.e., it preserves the Hamming weight of input ...
  14. [14]
    [PDF] MIT/LCS/TM- 197 CONSERVATIVE LOGIC Edward Fredkin
    Historically, Bennett's construction had a very ... intuitive realization of the AND/NAND gate,24 a universal, reversible, nonconservative primitive.<|control11|><|separator|>
  15. [15]
    [PDF] The Classification of Reversible Bit Operations - Scott Aaronson
    the 3-bit Toffoli gate, which flips the third bit if and only if the first two bits are both 1;. • the 3-bit Fredkin gate, which swaps the second and third bits ...
  16. [16]
    [PDF] Reversible Logic Synthesis with Minimal Usage of Ancilla Bits - arXiv
    Jun 10, 2015 · Two base gates are discussed: a variation of the 3- bit Toffoli gate and the original 3-bit Fredkin gate. There are three main results.
  17. [17]
    [PDF] Conservative Logic 1. INTRODUCTION - Strange Paths
    Conservative logic is a comprehensive model of computation which explicitly reflects a number of fundamental principles of physics, ...
  18. [18]
    [PDF] TRANSISTOR LEVEL IMPLEMENTATION OF DIGITAL ...
    In this paper, reversible gates and circuits are designed and implemented in CMOS and pass transistor logic using Mentor graphics backend tools. A four-bit ...Missing: schematic | Show results with:schematic
  19. [19]
    [PDF] Design of Reversible Logic Circuits using Standard Cells
    [14] E. Fredkin and T. Toffoli. Conservative logic. International Journal of. Theoretical Physics, 21(3-4):219–253, 1982.
  20. [20]
    None
    ### Transistor Implementation of the Fredkin Gate
  21. [21]
    Quantum-Dot CA-Based Fredkin Gate and Conservative D-Latch for ...
    It has one control bit A and two target bits B and C, and is called Fredkin gate (FRG) as shown in Figure 1a with its truth table in Table 1. This is a ...<|control11|><|separator|>
  22. [22]
    Novel high-performance QCA Fredkin gate and designing scalable ...
    Nov 22, 2022 · In this paper, first, we proposed a novel QCA structure for the quantum reversible Fredkin gate. Second, we proposed 4-bit and 8-bit QCA binary-to-gray ...
  23. [23]
    [PDF] conservative logic - CSAIL Publications - MIT
    Observe that the Fredkin gate is nonlinear and coincides with its own inverse. In conservative logic, all signal processing is ultimately reduced to conditional ...
  24. [24]
    [PDF] Synthesis of Fredkin–Toffoli Reversible Networks
    The most common reversible gates are the Toffoli gate and the Fredkin gate. We present a method that synthesizes a network with these gates in two steps. First, ...
  25. [25]
    [cs/0603092] An Extension to DNA Based Fredkin Gate Circuits - arXiv
    Mar 23, 2006 · This paper provides the initial threshold to building of more complex system having reversible sequential circuits and which can execute more complicated ...
  26. [26]
    Design of Reversible Sequential Circuits using Fredkin Gates
    The modularization approach that is synthesizing small circuits and thereafter using them to construct bigger circuits is used for designing the optimal.
  27. [27]
    [PDF] Computing with Classical Soliton Collisions - cs.Princeton
    Abstract We review work on computing with solitons, from the discovery of soli- tons in cellular automata, to an abstract model for particle computation, ...
  28. [28]
    Logic reversibility and thermodynamic irreversibility demonstrated ...
    Dec 12, 2012 · The Toffoli and Fredkin gates were suggested as a means to exhibit logic reversibility and thereby reduce energy dissipation associated with logic operations.
  29. [29]
    [PDF] Efficient Adder Circuits Based on a Conservative Reversible Logic ...
    This paper presents efficient adder circuits based on the Fredkin gate. Novel full adder circuits using Fredkin gates are proposed which have lower hardware ...<|control11|><|separator|>
  30. [30]
    Bioelectronic Interface Connecting Reversible Logic Gates Based ...
    May 4, 2016 · In the reversible Fredkin gate, the routing of two data signals between two output channels was controlled by the control signal (third channel) ...
  31. [31]
    [PDF] arXiv:1402.0491v3 [cs.ET] 24 Jun 2014
    Jun 24, 2014 · This gate can be generalized to the Fredkin gate family ... This permutation network is ensured to preserve the exclusivity of the targets.
  32. [32]
  33. [33]
    Novel ultra-energy-efficient reversible designs of sequential logic ...
    Mar 1, 2023 · Table 11 shows a detailed comparison between the proposed irreversible and reversible ... latency costs of the reversible and irreversible designs ...
  34. [34]
    [PDF] quantum-computation-and-quantum-information-nielsen-chuang.pdf
    This comprehensive textbook describes such remarkable effects as fast quantum algorithms, quantum teleportation, quantum cryptography, and quantum error- ...
  35. [35]
    [PDF] Quantum Gates, Quantum Circuit and Quantum Computation
    These external fields are designed so that they produce desired gate operation, i.e., unitary matrix acting on a particular set of qubits. Therefore the ...
  36. [36]
    Implementation of a quantum controlled-SWAP gate with photonic ...
    Mar 31, 2017 · Here we report a realization of the Fredkin gate for photonic qubits. We achieve a fidelity of 0.85 in the computational basis and an output state fidelity of ...
  37. [37]
    Symmetry-adapted variational quantum eigensolver | Phys. Rev. A
    May 28, 2020 · An efficient implementation of the controlled-swap (Fredkin) gate in a quantum device, as demonstrated in Ref. [112] , is thus highly ...
  38. [38]
    Experimental Hybrid Shadow Tomography and Distillation - arXiv
    Apr 18, 2024 · Utilizing this novel Fredkin gate, we demonstrate HS in the estimations, like the higher-order moments up to 4, and reveal that the sample ...
  39. [39]
    [1603.08086] A quantum Fredkin gate - ar5iv - arXiv
    Hence it would be desirable to be able to construct a quantum Fredkin gate directly without decomposition and avoid the associated resource overhead. We ...