HOME

TheInfoList



OR:

In logic circuits, the Toffoli gate (also CCNOT gate), invented by Tommaso Toffoli, is a universal reversible
logic gate A logic gate is an idealized or physical device implementing a Boolean function, a logical operation performed on one or more binary inputs that produces a single binary output. Depending on the context, the term may refer to an ideal logic ga ...
, which means that any classical reversible circuit can be constructed from Toffoli gates. It is also known as the "controlled-controlled-not" gate, which describes its action. It has 3-bit inputs and outputs; if the first two bits are both set to 1, it inverts the third bit, otherwise all bits stay the same.


Background

An input-consuming
logic gate A logic gate is an idealized or physical device implementing a Boolean function, a logical operation performed on one or more binary inputs that produces a single binary output. Depending on the context, the term may refer to an ideal logic ga ...
''L'' is reversible if it meets the following conditions: ''L''(''x'') = ''y'' is a gate where for any output ''y'', there is a unique input ''x''. The gate ''L'' is reversible if there is a gate ''L''′(''y'') = ''x'' which maps ''y'' to ''x''. From common logic gates, NOT is reversible, as can be seen from its truth table below. The common AND gate is not reversible, because the inputs 00, 01 and 10 are all mapped to the output 0. Reversible gates have been studied since the 1960s. The original motivation was that reversible gates dissipate less heat (or, in principle, no heat). More recent motivation comes from
quantum computing Quantum computing is a type of computation whose operations can harness the phenomena of quantum mechanics, such as superposition, interference, and entanglement. Devices that perform quantum computations are known as quantum computers. Though ...
. In
quantum mechanics Quantum mechanics is a fundamental theory in physics that provides a description of the physical properties of nature at the scale of atoms and subatomic particles. It is the foundation of all quantum physics including quantum chemistry, ...
the quantum state can evolve in two ways, by Schrödinger's equation (
unitary transformation In mathematics, a unitary transformation is a transformation that preserves the inner product: the inner product of two vectors before the transformation is equal to their inner product after the transformation. Formal definition More precisely, ...
s), or by their
collapse Collapse or its variants may refer to: Concepts * Collapse (structural) * Collapse (topology), a mathematical concept * Collapsing manifold * Collapse, the action of collapsing or telescoping objects * Collapsing user interface elements ** ...
. Logic operations for quantum computers, of which the Toffoli gate is an example, are unitary transformations and therefore evolve reversibly.


Universality and Toffoli gate

Any reversible gate that consumes its inputs and allows all input computations must have no more input bits than output bits, by the pigeonhole principle. For one input bit, there are two possible reversible gates. One of them is NOT. The other is the identity gate, which maps its input to the output unchanged. For two input bits, the only non-trivial gate is the
controlled NOT gate In computer science, the controlled NOT gate (also C-NOT or CNOT), 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-bas ...
, which
XOR Exclusive or or exclusive disjunction is a logical operation that is true if and only if its arguments differ (one is true, the other is false). It is symbolized by the prefix operator J and by the infix operators XOR ( or ), EOR, EXOR, , ...
s the first bit to the second bit and leaves the first bit unchanged. Unfortunately, there are reversible functions that cannot be computed using just those gates. In other words, the set consisting of NOT and XOR gates is not
universal Universal is the adjective for universe. Universal may also refer to: Companies * NBCUniversal, a media and entertainment company ** Universal Animation Studios, an American Animation studio, and a subsidiary of NBCUniversal ** Universal TV, a t ...
. To compute an arbitrary function using reversible gates, another gate is needed. One possibility is the Toffoli gate, proposed in 1980 by Toffoli. This gate has 3-bit inputs and outputs. If the first two bits are set, it flips the third bit. The following is a table of the input and output bits: It can be also described as mapping bits to . This can also be understood as a
Modulo operation In computing, the modulo operation returns the remainder or signed remainder of a division, after one number is divided by another (called the '' modulus'' of the operation). Given two positive numbers and , modulo (often abbreviated as ) is ...
on bit c: → often written as → The Toffoli gate is universal; this means that for any Boolean function ''f''(''x''1, ''x''2, ..., ''x''''m''), there is a circuit consisting of Toffoli gates that takes ''x''1, ''x''2, ..., ''x''''m'' and some extra bits set to 0 or 1 to outputs ''x''1, ''x''2, ..., ''x''''m'', ''f''(''x''1, ''x''2, ..., ''x''''m''), and some extra bits (called garbage). A NOT gate, for example, can be constructed from a Toffoli gate by setting the three input bits to , making the third output bit (1 XOR (a AND 1)) = NOT a; (a AND b) is the third output bit from . Essentially, this means that one can use Toffoli gates to build systems that will perform any desired Boolean function computation in a reversible manner.


Related logic gates

* The Fredkin gate is a universal reversible 3-bit gate that swaps the last two bits if the first bit is 1; a controlled-swap operation. * The ''n''-bit Toffoli gate is a generalization of the Toffoli gate. It takes ''n'' bits ''x''1, ''x''2, ..., ''x''''n'' as inputs and outputs ''n'' bits. The first ''n''−1 output bits are just ''x''1, ..., ''x''''n''−1. The last output bit is (''x''1 AND ... AND ''x''''n''−1) XOR ''x''''n''. * The Toffoli gate can be realized by five two-
qubit In quantum computing, a qubit () or quantum bit is a basic unit of quantum information—the quantum version of the classic binary bit physically realized with a two-state device. A qubit is a two-state (or two-level) quantum-mechanical system, ...
quantum gates, but it can be shown that it is not possible using fewer than five. * A related quantum gate, the Deutsch gate, can be realized by five optical pulses with neutral atoms. The Deutsch gate is a universal gate for quantum computing. * The Margolus gate (named after Norman Margolus), also called simplified Toffoli is a quantum logic gate very similar to a Toffoli gate but with a -1 in the diagonal: \mathrm=\operatorname(1,1,1,1,1,-1,X) . The Margolus gate is also universal for reversible circuits and acts very similar to a Toffoli gate, with the advantage that it can be constructed with about half of the CNOTS compared to the Toffoli gate.


Relation to quantum computing

Any reversible gate can be implemented on a
quantum computer Quantum computing is a type of computation whose operations can harness the phenomena of quantum mechanics, such as superposition, interference, and entanglement. Devices that perform quantum computations are known as quantum computers. Thoug ...
, and hence the Toffoli gate is also a
quantum operator In physics, an operator is a function over a space of physical states onto another space of physical states. The simplest example of the utility of operators is the study of symmetry (which makes the concept of a group useful in this context). Beca ...
. However, the Toffoli gate can not be used for universal quantum computation, though it does mean that a quantum computer can implement all possible classical computations. The Toffoli gate has to be implemented along with some inherently quantum gate(s) in order to be universal for quantum computation. In fact, any single-qubit gate with real coefficients that can create a nontrivial quantum state suffices. A Toffoli gate based on
quantum mechanics Quantum mechanics is a fundamental theory in physics that provides a description of the physical properties of nature at the scale of atoms and subatomic particles. It is the foundation of all quantum physics including quantum chemistry, ...
was successfully realized in January 2009 at the University of Innsbruck, Austria. While the implementation of an ''n''-qubit Toffoli with circuit model requires 2''n'' CNOT gates, the best known upper bound stands at 6''n''-12 CNOT gates. It has been suggested that trapped Ion Quantum computers may be able to implement an ''n''-qubit Toffoli gate directly. The application of many-body interaction could be used for direct operation of the gate in trapped ions, Rydberg atoms and superconducting circuit implementations. Following the dark-state manifold, Khazali-Mølmer Cn-NOT gate operates with only three pulses, departing from the circuit model paradigm.


See also

*
Controlled NOT gate In computer science, the controlled NOT gate (also C-NOT or CNOT), 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-bas ...
* Fredkin gate * Reversible computing *
Bijection In mathematics, a bijection, also known as a bijective function, one-to-one correspondence, or invertible function, is a function between the elements of two sets, where each element of one set is paired with exactly one element of the other ...
*
Quantum computing Quantum computing is a type of computation whose operations can harness the phenomena of quantum mechanics, such as superposition, interference, and entanglement. Devices that perform quantum computations are known as quantum computers. Though ...
*
Quantum logic gate In quantum computing and specifically the quantum circuit model of computation, a quantum logic gate (or simply quantum gate) is a basic quantum circuit operating on a small number of qubits. They are the building blocks of quantum circuits, ...
*
Quantum programming Quantum programming is the process of assembling sequences of instructions, called quantum circuits, that are capable of running on a quantum computer. Quantum programming languages help express quantum algorithms using high-level constructs. The ...
* Adiabatic logic


References


External links


CNOT and Toffoli Gates in Multi-Qubit Setting
at the Wolfram Demonstrations Project. {{DEFAULTSORT:Toffoli Gate Logic gates Quantum gates Reversible computing Italian inventions