Debdut Mukherjee
Nov 3 · 2 min read

Quantum Gates — Matrix memorization cheat sheet

It was indeed very challenging for me as a beginner to remember the matrix representation of the single-qubit and multi-qubit reversible,unitary operators viz. 𝑯, 𝝈𝒙, 𝝈𝒚, 𝝈𝒛, 𝑪𝑵𝑶𝑻, 𝝅/𝟖, Toffoli, Fredkin etc. Every now and then, I would forget them.

Any quantum enthusiast would agree, that these frequently used, yet fundamental operators in their arsenal are an absolute necessity to realize any quantum circuit.

As the problem turned out to be recurring, I decided to spend today’s afternoon devising an easy way to conquer these so-called “quantum devils”.

The result of the exercise is the cheat-sheet below.

Quantum Gates — matrix memorization cheat sheet

I am happy that this help me remember the matrix notations easily going forward. As you can see, it is very intuitive and quite easy to follow.

Single Qubit Gates

These are namely Hadamard, Pauli-X, Pauli-Y, Pauli-Z, S (Phase gate), π/8.

If you look at the matrix and the image mnemonic to remember the matrix, you will see that it is very intuitive.

Example 1:

Solid blue lines indicate non-zero values (row and column)

Visual Explanation for Hadamard gate

Example 2:

Dotted lines denote 0 along the diagonal

Visual Explanation for Pauli-Z gate

Multi-Qubit Gates

These are namely CNOT, Tofolli, Controlled-Z, Controlled-Phase, Fredkin

Example 1:

Row swapping of 8x8 Identity matrix

I would also like to dedicate this as my first original contribution to the quantum community.

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade