App Dev Managerย Leonard Woody breaks down the fundamentals of quantum computing from the perspective of a software developer.
The underpinnings of quantum computing (QC) is quantum mechanics. Unfortunately, quantum mechanics is very weird and hard to understand. Most articles on QC are of the pop science variety and introductions to QC are usually heavy on mathematics (linear algebra). I want to do something different. I want to explain QC using the language of software development.
So letโs get started! We are all familiar with the classical binary digit or bit.

The analog to this in QC is the quantum bit or qubit. An electronโs spin can be used to physically represent this.

Now, letโs code all this up (Iโm using pseudo-code throughout the article).

Superposition
The first major concept to understand in QC is superposition. I think itโs a horrible term in terms of describing what it actually is, but hey Iโm not Richard Feynman. Superposition means that a qubit can be in the Zero state, the One state, or a combination of the Zero and One states.

Think of it as a spinning coin, in which you canโt determine if itโs a 0 (tails) or 1 (heads).

Now, letโs do it in code!

Pretty weird, huh! In classical computing, the last statement would equal โbโ. But in QC, it creates a whole new state or โnumberโ.
Measurement
So the total possible states that a qubit can be in is infinite. But, when it is measured or โobservedโ it will always come out as 0 or 1. In code, it looks like this.

So now the question is, if the qubit is in some random state (a combination of the zero and one states), how do we know what the measurement will be? The code below shows the question better.

Well, the answer is another weird postulate of quantum mechanics. It is based on probability. Depending on the state the qubit is in, it could have a 50/50 chance of being a 0 or a 1. Or it could be 70/30. Whatever the probabilities are, they must add up to 100.
In part 2 of this blog series, Iโll go into how these probabilities are derived. Hope you enjoy the post!


Waiting for part II!
I’ve read this 4 times and I’m starting to think I must be stupid haha!