Education Quantum Resources

Quantum Computing Gate Glossary

May 17, 2020

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 & 1 \\ 1 & 0 \ \end{bmatrix}

Y Gate

\sigma_{y} = \begin{bmatrix} 0 & i \\ i & 0 \ \end{bmatrix}

Z Gate

\sigma_{z} = \begin{bmatrix} 1 & 0 \\ 0 & -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 & 1 \\ 1 & 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 & 1 \\ 1 & 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 & 1 \\ 1 & -1 \ \end{bmatrix}

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

Phase Shift Gate

Phase = \begin{bmatrix} 1 & 0 \\ 0 & 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 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 \\ 0 & 0 & 0 & 1 \\ 0 & 0 & 1 & 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 & 0 & 0 & 0 \\ 0 & 0 &1 & 0 \\ 0 & 1 & 0 & 0 \\ 0 & 0 & 0 & 1 \end{bmatrix}