More and more people seem to be transitioning from computer science (CS) backgrounds into quantum computing (QC). Armed only with a little programming knowledge, anyone can run experiments on real quantum computers that harness quantum mechanical effects such as entanglement, teleportation, and tunneling. In fact, with drag-and-drop circuit editors, you don’t even need a programming background for two of those.
The transition seems easy, at first. I picked up Quantum Assembly Language (QASM) quickly because of its resemblance to NASM (classical Assembly Language). Also, the most popular quantum computing libraries (Qiskit, Forest, Cirq, and others) are written for the world’s most-used computing language: Python. If you know Python, you’re already at least one step through the doorway.
However, CS practitioners quickly encounter roadblocks. While the “hello, world” experiment of quantum entanglement is not too hard to grasp at a high level, subsequent algorithms become more and more incomprehensible. The explanations of these algorithms begin to look more like math exams than English essays.
The problem appears to be evident from both sides. CS practitioners don’t understand the underlying math and theory, and physicists lament receiving questions to which the real answer is to study the underlying math and theory.
But, it’s hard. Pioneers of quantum mechanics (QM) admit to not understanding quantum mechanics. They know how to harness what we know, but no one can explain, for example, how entanglement really works. We can build quantum computers from our existing knowledge, but no professor can explain to you the “how” and the “why” of two photons, for example, being correlated over astronomical distances (what affects one instantly affects the other regardless of distance).
So, how can CS practitioners advance beyond the entry-level algorithms and try to make actual contributions to the field?
Well, quantum computing has a secret programming language that isn’t initially obvious. It’s called math. It looks intimidating, at first, but show some computer code to a physicist and see if it makes any sense in reverse. It won’t.
The solution is to learn the math like you would learn any other programming language. Break the symbols into constants, variables, and functions. Translate it into a code that you already understand, and it starts to make sense.
For example, the angle between two complex vectors might be represented by the Greek letter theta. My code uses a variable named “theta” that is defined by an inverse cosine function that I understand (from high school trigonometry). You might see theta in an equation and have no idea what it is, but then you might read my code and it could not be more clear what it is. Theta is theta, the only difference is which language it is being described in.
I’ve got other variables such as rho and psi and phi, and I’ve got functions for such things as dot products and norms. All of it was written step-by-step, translating from mathematical symbols to, in my case, the C programming language.
More QM concepts can be broken down and digested in this way. Vectors are like attributes, describing the states of quantum systems. And, matrices are functions, changing the states of quantum systems. Some of it really just comes down to terminology and analogies.
If you think about it, everything from quantum mechanics that is used in quantum computing has already been translated into code by someone at some point. Even though the math in a paper may look unfamiliar, the code on the screen might make perfect sense.
On the subject of vectors and matrices, by the way, I could swap in the term “multi-dimensional arrays.” I’ve got code that performs all sorts of operations on matrices but, in my mind, I’m just working with arrays. Multiply this row by that column? Too easy.
However, complex numbers and linear algebra are definitely prerequisites. I had heard about the significance of linear algebra early on, but the significance of complex numbers didn’t become apparent until much later. I don’t remember learning either in high school or college, but both are fundamental to understanding anything beyond pop culture sources.
When you start learning any programming language, you invariably learn some sort of “print” statement first. There is always that first “hello, world” example. You then learn everything else step-by-step. In a similar manner, you can learn the mathematical language of quantum computing symbol-by-symbol. And the more math you learn, the more you understand how little you really understood about quantum computing before.