Quantum Computing Gate Glossary

Quantum Computing Gate Glossary

Here we list some of the more commonly used gates in Quantum Computing. Some are easier to grasp than others, and those familiar with classical computing will recognize a few of the gates such as NOT which turns a 1 into 0 and a 0 into a 1 and does exactly the same on a Qubit.

State Vectors

We can represent our quantum state vector as a superposition of two states 0 and 1. We show their representations here.

\Left| 0 \Right≫ = \Begin{Bmatrix} 1 \\ 0 \End{Bmatrix}

and

\Left| 1 \Right≫ = \Begin{Bmatrix} 0 \\ 1 \End{Bmatrix}

Any generic vector can be comprised of a linear combination of these two states

\Left|\Psi  \Right≫ = \Alpha \Left|0 \Right≫ + \Beta \Left|1 \Right≫

Pauli Gates

These are gates that act on a single qubit and can be thought of as some of the most fundamental gates in Quantum Computing and they are also the easiest to learn and remember for most people.

NOT Gate (X)

Perhaps the most basic gate and easily interpret able because the behaviour is the same in both the classical and Quantum case. We basically take a statement that is False and make it True, and vice versa. Just like normal programming. The matrix is represented below:

\Sigma_{X} = \Begin{Bmatrix} 0 &Amp; 1 \\ 1 &Amp; 0 \ \End{Bmatrix}

Y Gate

\Sigma_{Y} = \Begin{Bmatrix} 0 &Amp; I \\ I &Amp; 0 \ \End{Bmatrix}

Z Gate

\Sigma_{Z} = \Begin{Bmatrix} 1 &Amp; 0 \\ 0 &Amp; -1 \ \End{Bmatrix}

Example NOT gate on two different states (0/1)

We can easily see how any of the Pauli gates work on a single Qubit. As follows we take a 0 and put it through a NOT gate and the same with a 1. Lets check we get an output that we expect.

X( \Left| 0 \Right≫) = \Begin{Bmatrix} 0 &Amp; 1 \\ 1 &Amp; 0 \End{Bmatrix}\Begin{Bmatrix} 1 \\ 0 \End{Bmatrix} = \Begin{Bmatrix} 0 \\ 1 \End{Bmatrix} = \Left| 1 \Right≫

And

X( \Left| 1 \Right≫) = \Begin{Bmatrix} 0 &Amp; 1 \\ 1 &Amp; 0 \End{Bmatrix}\Begin{Bmatrix} 0 \\ 1 \End{Bmatrix} = \Begin{Bmatrix} 1 \\ 0 \End{Bmatrix} = \Left| 0 \Right≫

Hadamard Gate

Perhaps one of the most interesting of Quantum gates Hadamard creates a superposition from each of the states 0 and 1. It performs the following mapping $$ and its matrix is as follows.

H = \Frac{1}{\Sqrt{2}}\Begin{Bmatrix} 1 &Amp; 1 \\ 1 &Amp; -1 \ \End{Bmatrix}

Many circuits involve the Hadamard Gate, so its worth understanding well.

Phase Shift Gate

Phase = \Begin{Bmatrix} 1 &Amp; 0 \\ 0 &Amp; E^{I\Phi} \\ \End{Bmatrix}

CNOT

The C stands for controlled, which mean it only operates a NOT operation if another condition is met, that is a control qubit is 1, otherwise it does nothing. It operates on 2 qubits and therefore is a 4×4 matrix which is represented below.

Cnot = \Begin{Bmatrix} 1 &Amp; 0 &Amp; 0 &Amp; 0 \\ 0 &Amp; 1 &Amp; 0 &Amp; 0 \\ 0 &Amp; 0 &Amp; 0 &Amp; 1 \\ 0 &Amp; 0 &Amp; 1 &Amp; 0 \End{Bmatrix}

SWAP

Another 4×4 matrix which operates on 2 qubits. It takes the state of state A and swaps with state B. A very useful process to have happen for a number of process. It is easy to see that this works.

Swap = \Begin{Bmatrix} 1 &Amp; 0 &Amp; 0 &Amp; 0 \\ 0 &Amp; 0 &Amp;1 &Amp; 0 \\ 0 &Amp; 1 &Amp; 0 &Amp; 0 \\ 0 &Amp; 0 &Amp; 0 &Amp; 1 \End{Bmatrix}