r/askscience • • 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

134 comments sorted by

View all comments

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.)

4

u/Spinster_Tchotchkes Mar 28 '21

Am I kind of comprehending this if my mind conjures up an analogy of a Plinko board?

Like at first we could only drop marbles down through a physical Plinko board and watch how they get distributed in real time. Then digital computing was invented so now we can simulate the plinko board action digitally (much faster than real time). But what would be even better is if we can discover a real life equivalent of Plinko that does the Plinko distribution SUPER fast, like quantum particle fast, provided we can figure out how to record the output.

9

u/[deleted] Mar 28 '21

Boson Sampling is nearly always compared to plinko boards when introduced at lectures etc. So you're right on the money.

It would take a computer a very very long time to calculate the output distribution of a plinko board which uses photons, beamsplitters, and mirrors instead of solid balls and pegs, but light travels at the speed of ... light. So we can conduct a single boson sampling experiment nearly instantaneously using fiber optics, and then repeat that a number of times to get the distribution. That is a de-facto quantum computer, albeit a special purpose one, not a computationally complete one.

This is why boson sampling makes the news from time to time. We are increasing the state of the art to be able to run more and more photons in a larger number of input ports, and we are arguably at or past the point where classical computers are capable of simulating the systems we are making in the lab. That point of technological progress is usually referred to as "quantum supremacy", but that term is getting some controversy for reasons that are likely apparent.

1

u/[deleted] Mar 28 '21

[removed] — view removed comment

3

u/kkrko Mar 28 '21

If you truly want to learn quantum mechanics, if you want to be able to do things with it, you need a Physics degree. You absolutely need the math if you want to understand it and the rest of Physics to put the entire thing in context.

The bare minimum to start would be a working knowledge of linear algebra and differential equations and then Electromag so you aren't just solving contextless equations.

1

u/[deleted] Mar 28 '21

[removed] — view removed comment

2

u/kkrko Mar 29 '21

Can't really point you to one since I learned mostly by lectures. That said, if you do have the math background and not the Physics, try to look for courses that build quantum mechanics from the ground up, from vector/Hilbert spaces, spin qubits, pure/mixed states, and measurements and not ones that start with the Schrodinger equation. While starting with the Schrodinger equation makes sense historically, as it's how QM was born from EM, it doesn't really give one the appreciation of what measurement and states mean in QM.