Toffoli gate

Uses your system voice; voice and rate in settings.

Snapshot

≈ 4 min read

Names in other languages

No names in other languages are held for this entry yet.

Article bodies are English and are not machine-translated. A name in another language is not a translation of the article.

In logic circuits, the Toffoli gate, also known as the CCNOT gate ("controlled-controlled-not"), invented by Tommaso Toffoli in 1980 is a CNOT gate with two control bits and one target bit. That is, the target bit (third bit) will be inverted if and only if the first and second bits are both 1. It is a universal reversible logic gate, which means that any classical reversible circuit can be constructed from Toffoli gates. There is also a quantum-computing version where the bits are replaced by qubits.

In logic circuits, the Toffoli gate, also known as the CCNOT gate ("controlled-controlled-not"), invented by Tommaso Toffoli in 1980 is a CNOT gate with two control bits and one target bit. That is, the target bit (third bit) will be inverted if and only if the first and second bits are both 1. It is a universal reversible logic gate, which means that any classical reversible circuit can be constructed from Toffoli gates. There is also a quantum-computing version where the bits are replaced by qubits.

Description

The truth table and permutation matrix are as follows (the permutation can be written (7,8) in cycle notation): | \begin{bmatrix} 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 & 1 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 & 0 & 1 \\ 0 & 0 & 0 & 0 & 0 & 0 & 1 & 0 \\ \end{bmatrix} |} An input-consuming logic gate L is reversible if it meets the following conditions: (1) L(x) = y is a gate where for any output y, there is a unique input x; (2) The gate L is reversible if there is a gate L´(y) = x which maps y to x, for all y.

An example of a reversible logic gate is a NOT, which can be described 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. In quantum mechanics the quantum state can evolve in two ways: by the Schrödinger equation (unitary transformations), or by their collapse.

Logic operations for quantum computers, of which the Toffoli gate is an example, are unitary transformations and therefore evolve reversibly. module toffoli_gate ( input u1, input u2, input in, output v1, output v2, output out); always @(*) begin v1 = u1; v2 = u2; out = in ^ (u1 && u2); end endmodule 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 {a, 1, 1}, making the third output bit (1 XOR (a AND 1)) = NOT a; (a AND b) is the third output bit from {a, b, 0}. Essentially, this means that one can use Toffoli gates to build systems that will perform any desired Boolean function computation in a reversible manner. The Margolus gate (named after Norman Margolus), also called simplified Toffoli, is very similar to a Toffoli gate but with a −1 in the diagonal: RCCX = diag(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. The iToffoli gate was implemented in superconducting qubits with pair-wise coupling by simultaneously applying noncommuting operations. A generalized Toffoli gate, sometimes called a multiple-control Toffoli (MCT) gate, uses more than two control bits, flipping the target bit only when all control bits are set to 1.

External links

CNOT and Toffoli Gates in Multi-Qubit Setting at the Wolfram Demonstrations Project.

Text derived from https://en.wikipedia.org/w/index.php?oldid=1378824672 under CC BY-SA 4.0; modifications have been made.

Sources cited in this revision

1 named source(s) extracted from the cited revision. A source with no author is shown by its publication; nothing is invented.