Toffoli gate
Encyclopedia
In computer science
Computer science
Computer science or computing science is the study of the theoretical foundations of information and computation and of practical techniques for their implementation and application in computer systems...

, the Toffoli gate (also CCNOT gate), invented by Tommaso Toffoli
Tommaso Toffoli
Tommaso Toffoli is a professor of electrical and computer engineering at Boston University. He joined the faculty in 1995. He was born in June, 1943 in Montereale Valcellina, in northeastern Italy, and was raised in Rome. He received his doctorate in physics from the University of Rome La...

, is a universal reversible
Reversible computing
Reversible computing is a model of computing where the computational process to some extent is reversible, i.e., time-invertible. A necessary condition for reversibility of a computational model is that the transition function mapping states to their successors at a given later time should be...

 logic gate
Logic gate
A logic gate is an idealized or physical device implementing a Boolean function, that is, it performs a logical operation on one or more logic inputs and produces a single logic output. Depending on the context, the term may refer to an ideal logic gate, one that has for instance zero rise time and...

, which means that any reversible circuit can be constructed from Toffoli gates. It is also known as the "controlled-controlled-not" gate, which describes its action.

Background

A logic gate
Logic gate
A logic gate is an idealized or physical device implementing a Boolean function, that is, it performs a logical operation on one or more logic inputs and produces a single logic output. Depending on the context, the term may refer to an ideal logic gate, one that has for instance zero rise time and...

 L is reversible if, for any output y, there is a unique input x such that applying L(x) = y. If a gate L is reversible, there is an inverse gate L′ which maps y to x for which L(x) = y. From common logic gates, NOT is reversible, as can be seen from its truthtable below.
INPUT OUTPUT
0 1
1 0


The common AND gate is not reversible however. The inputs 00, 01 and 10 all get 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). In a normal gate, input states are lost, since less information is present in the output than was present at the input. This loss of information loses energy to the surrounding area as heat, because of thermodynamic entropy. Another way to understand this is that charges on a circuit are grounded and thus flow away, taking a small charge of energy with them when they change state. A reversible gate only moves the states around, and since no information is lost, energy is conserved.

More recent motivation comes from quantum computing. Quantum mechanics
Quantum mechanics
Quantum mechanics, also known as quantum physics or quantum theory, is a branch of physics providing a mathematical description of much of the dual particle-like and wave-like behavior and interactions of energy and matter. It departs from classical mechanics primarily at the atomic and subatomic...

 requires the transformations to be reversible but allows more general states of the computation (superposition
Superposition principle
In physics and systems theory, the superposition principle , also known as superposition property, states that, for all linear systems, the net response at a given place and time caused by two or more stimuli is the sum of the responses which would have been caused by each stimulus individually...

s). Thus, the reversible gates form a subset of gates allowed by quantum mechanics and, if we can compute something reversibly, we can also compute it on a quantum computer.

Universality and Toffoli gate

Any reversible gate must have the same number of input and 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
Controlled NOT gate
The Controlled NOT gate is a quantum gate that is an essential component in the construction of a quantum computer. It can be used to disentangle EPR states...

 which XORs the first bit to the second bit and leaves the first bit unchanged.
Truth table Matrix form
INPUT OUTPUT
 0   0   0   0 
0 1 0 1
1 0 1 1
1 1 1 0



Unfortunately, there are reversible functions which cannot be computed using just those gates. In other terms, the set consisting of NOT and XOR gates is not universal (see functional completeness). If we would like to compute an arbitrary function by reversible gates, we need another gate. One possibility is the Toffoli gate, proposed in 1980 by Toffoli.

This gate has a 3-bit input and output. If the first two bits are set, it flips the third bit. Following is a table over the input and output bits:
Truth table Matrix form
INPUT OUTPUT
 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 0 1
1 1 0 1 1 1
1 1 1 1 1 0


It can be also described as mapping bits a, b and c to a, b and c XOR (a AND b).

The Toffoli gate is universal; this means that for any boolean function f(x1, x2, ..., xm), there is a circuit consisting of Toffoli gates which takes x1, x2, ..., xm and some extra bits set to 0 or 1 and outputs x1, x2, ..., xm, f(x1, x2, ..., xm), and some extra bits (called garbage). 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
    Fredkin gate
    The Fredkin 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...

     is a 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 Toffoli gate. It takes n bits x1, x2, ..., xn as inputs and outputs n bits. The first n−1 output bits are just x1, ..., xn−1. The last output bit is (x1 AND ... AND xn−1) XOR xn.
  • The Toffoli gate can be realized by five two-qubit
    Qubit
    In quantum computing, a qubit or quantum bit is a unit of quantum information—the quantum analogue of the classical bit—with additional dimensions associated to the quantum properties of a physical atom....

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

    s.

  • This gate is one of the reversible-gate cases that can be modeled with billiard ball
    Billiard ball
    A billiard ball is a small, hard ball used in cue sports, such as carom billiards, pool, and snooker. The number, type, diameter, color, and pattern of the balls differ depending upon the specific game being played...

    s, the billiard ball modeling was introduced by Fredkin and Toffoli. An example of how the collisions are used to model an electronic gate is shown in the figure.

Relation to quantum computing

Any reversible gate can be implemented on a quantum computer
Quantum computer
A quantum computer is a device for computation that makes direct use of quantum mechanical phenomena, such as superposition and entanglement, to perform operations on data. Quantum computers are different from traditional computers based on transistors...

, and hence the Toffoli gate is also a quantum operator. 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 been successfully realized in January 2009 at the University of Innsbruck, Austria.

See also

  • Fredkin gate
    Fredkin gate
    The Fredkin 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...

  • Reversible computing
    Reversible computing
    Reversible computing is a model of computing where the computational process to some extent is reversible, i.e., time-invertible. A necessary condition for reversibility of a computational model is that the transition function mapping states to their successors at a given later time should be...

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

  • Quantum programming
    Quantum programming
    Quantum programming is a set of computer programming languages that allow the expression of quantum algorithms using high-level constructs. The point of quantum languages is not so much to provide a tool for programmers, but to provide tools for researchers to understand better how quantum...

The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK