More Efficient Quantum Computation: Seven-Qubit Shor's Algorithm - NuclearCraft Overhaul

The maths required to do quantum mechanics is well understood and implementable by a classical computer. It's just linear algebra and complex numbers. No magic at all.

The problem is just that it's a LOT of linear algebra over a LOT of complex numbers.

A qubit alone is a 2D object that measures how much amplitude there is to be 0 and how much amplitude there is to be 1. So while a classical bit is literally 1 bit (it's either 0 or 1 with certainty), a single qubit already requires two (complex) numbers to describe it (or about 256 bits of memory if it's described by two double-precision floating point values).

Add a second qubit? Classically it's literally just 2 bits now, but quantum mechanically, you end up with 4 separate amplitudes you have to track... one for how much "0 and 0" it has, another for how much "0 and 1", and so on for "1 and 0" and "1 and 1". Because in the quantum realm, you can have a different probability for observing each of those combinations, so you can't just track which of those 4 the system currently is, you have to track the amplitude associated with all 4 of them all the time.

Third qubit? 8 amplitudes.

Fourth qubit? 16 amplitudes.

Tenth qubit? 1024 amplitudes!

It grows fast.

The real kicker is when you try to implement a logic gate, something like the quantum equivalent of AND, OR, and NOT... the things classical computers are built on. A gate has to specify what happens to each possible state, as a function of each possible state. That means it's N times N numbers. And N is the number of amplitudes we have to track, as mentioned above.

So we already said 10 qubits is 1024 amplitudes we're tracking. Now a gate is essentially a matrix of 1024*1024 = 1048576 numbers. That's 1 million values per gate! And remember a value is already potentially 128 bits if it's represented by two doubles, so that's 128 MB of memory just for a single gate. Crazy.

/r/feedthebeast Thread Parent Link - i.redd.it