Quantum Gates

Define how group of qubits are affected.

Controlled-Not Gate (CNOT)

The CNOT gate acts on two qubits. One is the control qubit and the other is the target qubit.

$$ CNOT = \begin{bmatrix} 1 \ 0 \ 0 \ 0 \\ 0 \ 1 \ 0 \ 0 \\ 0 \ 0 \ 0 \ 1 \\ 0 \ 0\ 1\ 0 \\ \end{bmatrix} $$

image.png

$$ |a\rang |b\rang \rarr |a\rang |a\oplus b\rang $$

Table:

Toffoli Gate (CCNOT)

image.png

$$ |a\rang |b\rang |c\rang \rarr|a\rang |b\rang |c\oplus ab\rang $$