# CNOT and Toffoli Gates in Multi-Qubit Setting

CNOT and Toffoli Gates in Multi-Qubit Setting

The most commonly used two-qubit gate is the controlled-not (CNOT) gate. In two-qubit space, CNOT is a matrix of the form

. In general it is a × matrix. The most important three-qubit gate is the universal Toffoli gate, or controlled-controlled-not (CCNOT) gate with two control bits. For the Toffoli gate, both control bits are operative; for CNOT, only the first control bit.

1 | 0 | 0 | 0 |

0 | 1 | 0 | 0 |

0 | 0 | 0 | 1 |

0 | 0 | 1 | 0 |

n

2

n

2