# Quantum logic gate

In quantum computing and specifically the quantum circuit model of computation, a quantum logic gate (or simply quantum gate) is a basic quantum circuit operating on a small number of qubits. They are the building blocks of quantum circuits, like classical logic gates are for conventional digital circuits.

Unlike many classical logic gates, quantum logic gates are reversible. It is possible to perform classical computing using only reversible gates. For example, the reversible Toffoli gate can implement all Boolean functions, often at the cost of having to use ancilla bits. The Toffoli gate has a direct quantum equivalent, showing that quantum circuits can perform all operations performed by classical circuits.

Quantum gates are unitary operators, and are described as unitary matrices relative to some basis. Usually we use the computational basis, which unless we compare it with something, just means that for a d-level quantum system (such as a qubit, a quantum register, or qutrits and qudits[1]: 22–23 ) we have labeled the orthogonal basis vectors ${\displaystyle |0\rangle ,|1\rangle ,\dots ,|d-1\rangle }$, or use binary notation.

Common quantum logic gates by name (including abbreviation), circuit form(s) and the corresponding unitary matrices.
1. ^ Cite error: The named reference Williams was invoked but never defined (see the help page).