Toffoli Gate

The Toffoli gate, also known as the Controlled-Controlled NOT gate, is a three-qubit operation defined by:

 Toffoli=(1000000001000000001000000001000000001000000001000000000100000010)\ Toffoli= \begin{pmatrix} 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{pmatrix}

Export visualization

File format
Layout
Theme

Note. On most hardware backends, a Toffoli gate cannot be implemented directly, but needs to be compiled to single- and two-qubit gates and mapped onto the qubit topology.

For more information see Toffoli gate on Wikipedia.