r/askscience • u/[deleted] • Mar 28 '21
Computing How exactly do quantum computers simulate molecular/particle interactions better than classical computers?
I’m struggling to understand why quantum computers can simulate nature better than classical computers.
2.5k
Upvotes
886
u/GroundStateGecko Mar 28 '21 edited Mar 29 '21
First, I'd like to demystify something. It's common that people say an N-bit quantum computer can simultaneously exist in a superposition of 2N states, such that it will be able to access 2N answers, thus much faster than classical computers.
This is FALSE. You can only get ONE answer from the superposition of 2N states. ONE measurement will disrupt the whole system so that the superposition (of that property you were measuring) is broken. So an N-bit quantum computer has nothing to do with running 2N calculations at the same time.
Now the real answer to this question:
A tl;dr answer would be: because we can construct certain quantum systems, so that some physical properties of that system happens to be the same as some formula we need. (And that formula is hard to calculate using other stuff, like a classical computer or in our head.)
You can use this exact same explanation to answer "how do classical computers calculate addition faster than human". An adder, built with classical electronic circuits (like this one), are just some physical objects that do "experiments" so that if you flip the switches as your input, the output light bulbs will almost instantaneously illuminate in a way that happens to be the same as how addition works. We then measure the on/off of the light bulbs, and say that this "computer" (consisted of two switches, two logical gates, and two light bulbs) can do addition as fast as the electricity can flow through the wire, like billions of times a second (assuming you have bulbs that can flicker really fast).
We can now put our switch-gate-light bulb thing in a case, and call that thing "a classical computer that can quickly calculate the sum of two one-bit numbers". The switches are input, and (the brightness of) the light bulbs are output.
So what's a fast computer?
It's a physical apparatus, which we have configurations to change as input; and the measurement of some physical property happens to correlate to some formula we need.
Now, the same thing for quantum computers.
I'll use the calculation of a permanent of matrix as an example. A permanent (Wikipedia) of an n*n matrix is a sum of products, each product is consisted by n element, the horizontal indices are 1...n, and the vertical indices are each of the possible permutations for the n indices. So the total number of products in the summation is the factorial of n. Like for 2*2 matrix, for 3*3 matrix, and I generated the permanent for 4*4 and 5*5 matrices. You can see as the matrix grow bigger, it will be exponentially more complicated if we calculate the multiplications one by one (and the optimal complexity on a classical computer is ~O(n×2n)). For a 100*100 matrix, You would need to do ~1032 times calculation to get the result, and that will need ~1000 years on our best classical supercomputers.
However, there happens to be a quantum process, called Boson sampling (Wikipedia), whose physical property happens to satisfy:
[Boson sampling] = |permanent of matrix|2 / S₁! S₂! ... Sn!
We can calculate the "S₁! S₂! ... Sn!" part very quickly (using a classical computer), so we now build a quantum apparatus and measure the [Boson sampling] term for a certain input, we can now get the permanent of matrix very quickly from the above equation.
And we finally put that apparatus in a case, and call this quantum apparatus "a quantum computer that can quickly calculate the permanent of matrix". Just like our switch-gate-light bulb thing.
(There are caveats that I glossed over for simplicity. Read this like an Explain-like-I'm-five-answer. Comments are welcome.)