Notepad/enter/Machine Tips (Quantum)/Resources/Code & Circuit Operations/Gates/Single Qubit Gates/Toffoli Gates.md

1.5 KiB
Raw Permalink Blame History

The simplest way to decompose the multiqubit Toffoli gate in terms of the usual Toffoli gat is by using (n 2) draft qubits called ancillas. The ancillary qubits are interlaced with the control qubits, the first ancilla qubit being inserted between the second and third qubits. The 5best way to explain the decomposition is to show an example. Consider the gate C(X), whos

decomposition requires three ancillas, as shown in the following circuit equivalence:

The multiqubit Toffoli gate can also be activated by zero. In this case, the control qubit i n shown as an empty circle. For n qubits, we have 2multiqubit Toffoli gates that can implemen any Boolean function of n bits,

s show how to obtain the quantum circuit of a truth table. We only need multiqubit Toffol gates. To show that the multiqubit Toffoli gates can implement any Boolean function on a quantum computer, lets take the 3-bit Boolean function f (a, b, c) defined by the following truth table as an example

After this example, it is evident how the general case is obtained. Since f has three input bits, we use multiqubit Toffoli gates with three controls. The 4th qubit is the targe