I have been fascinated by the quantum world for quite a while now, and sometimes people ask me: why are these quantum computers so potentially powerful and disruptive?

To answer that question, people start talking about seemingly magical stuff like superposition and entanglement which lead to spooky action at a distance or even bits that are zero and one at the same time. It is indeed the combination of more than one aspect of quantum mechanics that gives quantum computers their huge potential — and nobody can deny that it is cool to sprinkle around such terms.

But what does this actually mean in reality? How does the power of quantum computers emerge out of these properties?

Something which I rarely see well explained, but is surprisingly intuitive to understand, is one of the consequences of these frequently discussed concepts: the vast mathematical space that these devices open up when compared to classical computers.

I aim to have an understandable answer ready that makes use of an example to spark intuition. This is what this short blogpost is about.

The basics: classical bits vs. quantum bits

I assume everybody knows what a classical bit is. When representing such a bit, we say it is either 0 or 1, and by writing this 0 or 1 it completely determines the information it contains.

When switching to a quantum bit or qubit, we write this as |0> or |1>. There are some mathematical reasons for this notation, but let’s just use this notation to signal the difference between classical and quantum.

One of the special properties of a qubit is that its state is not defined by just writing |0> or |1>, but that they can also be in superposition, i.e. a linear combination:

a|0> + b|1>

where a and b are complex numbers (of which the squares sum up to 1 and only the relative phase is meaningful). This can be graphically summarized as in the picture below, where a classical bit only has two possible states, while a qubit has access to a continuum of states on its own.

Classical qubits are zero or one: two possible states, represented as points. Qubits are a superposition of zero and one: a continuum of possible states, represented as the surface of a sphere (the Bloch sphere).

This shows that a qubit is richer in structure than a classical bit, because to fully know its state you need to have a and b instead of just 0 or 1. This a and b are numbers on their own, that can be represented as classical bits. If you want to represent one qubit on a classical computer using e.g. a 64-bit representation, you already need 2x64 classical bits to represent the two complex numbers a and b (a complex number has a real and an imaginary part, but the normalization conditions only leave room for 2 degrees of freedom, hence 2x64).

Starting small: 3 bits vs 3 qubits

What really unleashes the power of quantum computers is when you start combining qubits together. Let’s start small to illustrate this.

Imagine you have 3 classical bits to store some information. This information is actually a bit string, e.g. 010. It is easy to represent this information, because well… I actually just wrote it down.

Now, compare this to the information that is stored in 3 qubits. The interesting thing about a combination of qubits, is that they again have some coefficients that define their state, but these coefficients are not local per qubit (as before) but global, which gets clear when you look at the mathematical representation:

a|000> + b|001> + c|010> + d|011> + e|100> + f|101> + g|110> + h|111>

There are 8 combinations possible (i.e. 2*2*2 = 2³), yielding 8 complex coefficients. The fact that they are global means that in general the coefficients cannot be derived from local states like the single-qubit states above. If that would be the case, we could only have 6 unique coefficients resulting from the multiplication of 3 single-qubit states (i.e. 3 qubits with each 2 local coefficients).

The global nature of the coefficients is linked to entanglement. The system of qubits acts as a whole and each qubit cannot be seen as an independent unit any more. Suppose you have a state where all coefficients except a and h are zero:

a|000> + h|111>

This is what we call a maximally entangled state, which has no local equivalent since it cannot be written as a product of 3 local states (a|0> + b|1>, a good exercise to see if you understand the concept!).

Quantum mechanics is weird, right? It is certainly not our natural way of thinking, since we — humans — have evolved to survive in a classical world. But this is the way nature behaves on a very small scale, and with some practice you can certainly start to find your way.

As we will discuss further in the next paragraph, these seemingly counter-intuitive concepts largely expands the mathematical playing field when compared to classical states.

Scaling things up: 300 bits vs 300 qubits

Now let’s scale this up and get to what I meant in the beginning of my story!

When you have 300 classical bits, you need 300 0s or 1s to describe the information in your system. Again, we could actually write down such a bitstring here:

010001010110101001001110100010100101110100101001001010100100000001010111101001010100101010101110100101010010010100101011101001010101010010010101001010101110100100100101001010101001001010010100100101000001001010100101000101010110101001000100100010000100010101111010100100101001011010010100100101010111

On the other hand, when you have a system of 300 qubits, things get a little out of hand: you would need 2³⁰⁰ = 2.04e+90 coefficients to fully describe the state of your quantum system.

I could try to represent this in a classical format as I did above… but that is actually impossible!

At this level, it is estimated that there are between 10⁷⁸ to 10⁸² atoms in the known, observable universe. In layman’s terms, that works out to between ten quadrillion vigintillion and one-hundred thousand quadrillion vigintillion atoms. So if you would try to ‘write’ a coefficient on every atom in the universe combined, you will not have enough atoms available.

I hope this makes it clear that your screen with classical information is thus not sufficient to represent this quantum state with 300 qubits.

Accessing a qubit’s state

Now you might think: can’t we just use a qubit’s coefficient to store an infinite amount of classical bits? There is a very important thing to add. When you want to access the information in a qubit, you only measure 0 or 1 and not the coefficients a and b directly. The outcome of your measurement is a sample from a probability distribution, which is determined by a and b. The same holds for multiple qubits together: you measure a combination of 0s and 1s as a sample from the probability distribution determined by a,b,c,d,e,f…

While this limits direct access to the full state of the qubit (i.e. the coefficients), it still lets us use the huge mathematical space while performing calculations. That is where the computational power of quantum computers comes from.

Accessing the state of a qubit: the outcome is a sample from a probability distribution which is deteremined by the coefficients. (source)

Quantum simulators and supercomputers

The fact that the quantum state space becomes exponentially large in the number of qubits(remember the 2^n scaling), explains why quantum simulators (e.g. supercomputers using classical bits) have trouble to simulate quantum systems. From the moment you have around 50 qubits in a random state, no current supercomputer is sufficient to fit the state in memory and simulate its dynamics. And the scaling is not so friendly: adding one qubit actually doubles the amount of coefficients and thus resources needed to describe the system.

So to go from 50 to 51 qubits we have to choose: do we build a supercomputer which has twice the amount of memory and processing power, or would we build a quantum computer directly and just add one qubit to have the same increase in computing power? At some point, classical computers will hit a complexity wall, and we will need quantum computers to break through it.

If you want to play around with an actual quantum computer and compare it to the results of a simulator, I suggest to check out IBM Q Experience.

How could this help us solve problems?

After reading the above, it should not surprise you that this scaling behaviour of a quantum system is exactly why we are interested in building a quantum computer. There are a lot of complex problems today where the same scaling behaviour is characteristic to the task at hand and creates a barrier which keeps us from solving it with classical computers. Some examples:

Drug and materials discovery: simulating chemistry is about electrons and protons that influence each other instantaneously. In general, these interactions cannot be split up and have to be considered in a global manner. Simulating big quantum systems as a whole is difficult for classical computers, since the requirements scale exponentially in the size of the system. If we have a quantum computer with enough qubits, problems like this are a natural fit to solve with this technology since the available resources per additional qubit scale in the same way as the size of the quantum system to simulate.

Protein folding could be sped up by quantum computing. This is exactly what companies like ProteinQure are trying to do.

Optimization tasks : the travelling salesman problem (i.e. find the best route along a number of geographical locations) scales exponentially in the number of places to visit. Other combinatorial problems scale in the same exponential way w.r.t. the amount of entities. This type of problems thus also map naturally to the capabilities of a quantum computer.

: the travelling salesman problem (i.e. find the best route along a number of geographical locations) scales exponentially in the number of places to visit. Other combinatorial problems scale in the same exponential way w.r.t. the amount of entities. This type of problems thus also map naturally to the capabilities of a quantum computer. Machine learning: some tasks in machine learning are similar to optimization and could thus benefit from this new approach. Next to pure optimization, a lot of machine learning algorithms are about linear algebra on very high dimensional datasets. This is exactly what I outlined above: with a very small number of quantum bits, quantum computers can have states that represent vectors in a very high-dimensional vector space. Besides, as quantum systems give rise to weird phenomena, they could unlock new ways of detecting patterns in data. Quoting Seth Lloyd: ‘Quantum mechanics is weird. We can reasonably hope that in addition to be able to generate strange and counterintuitive patterns, quantum computers could also recognize such strange and counterintuitive patterns that cannot be recognized by any classical computer. Quantum weirdness might allow us to help in understanding the weird features of nature itself.’

Seth Lloyd summarizing Quantum Machine Learning. Screenshot from his excellent guest lecture in the edX-course by Peter Wittek— highly recommended if you are interested in QML!

… and a lot of other application domains, which we have not even thought about — because it is impossible to estimate the full impact of a groundbraking technology like quantum computing. We have only scratched the surface this far!

Ending words

I hope this article gave you some understanding into why quantum computers actually have more mathematical ‘space’ available and how this could help us solve important problems in the future.

Although this post turned out a bit longer than I expected, I obviously still left out a lot of details, such as why it is actually hard to make a quantum computer. I also did not go into much detail about the exact potential speedup for applications — which could be less than exponential (but still e.g. quadratic). However, I am always open for further questions/discussions and I hope this will inspire my next blogpost.

Thanks for reading!