🌱Aadam's Garden

Search

Search IconIcon to open search

Toffoli Gate

Last updated Jun 24, 2022

# Toffoli Gate

  • The Toffoli Gate is a three-qubit Quantum Gate that flips the right Qubit if the left and middle qubits are $1$ : $$\begin{aligned}
    \text{Toffoli}\ket{000} &= \ket{000}, \
    \text{Toffoli}\ket{001} &= \ket{001}, \
    \text{Toffoli}\ket{010} &= \ket{010}, \
    \text{Toffoli}\ket{011} &= \ket{011}, \
    \text{Toffoli}\ket{100} &= \ket{100}, \
    \text{Toffoli}\ket{101} &= \ket{101}, \
    \text{Toffoli}\ket{110} &= \ket{111}, \
    \text{Toffoli}\ket{111} &= \ket{110}.
    \end{aligned}$$
  • As we know that the Toffoli gate is universal for classical computing, and since it is a Quantum Gate, quantum computers can efficiently do everything a classical computer can efficiently do.
  • Toffoli gate, represented as a Matrix: $$\text{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}.$$
  • Its circuit diagram is similar to the CNOT Gate:
    Toffoli_Gate_Circuit_Diagram.excalidraw.svg

# Sources