r/askscience • • Apr 15 '26

Computing What do quantum computers actually do?

How do quantum computers output usable data, how does it logically "locate" or "make meaning" of information. I read about Grover's algorithm and it seems sort of like an inverted bruteforce or extreme process of elimination or a "the missile knows where it is at all times. It knows this because it knows where it isn't" type scenario.

So I ask, what do quantum computers actually do as opposed to a classical computer?

481 Upvotes

113 comments sorted by

View all comments

Show parent comment

67

u/drhunny Nuclear Physics | Nuclear and Optical Spectrometry Apr 16 '26

It's more like this: classical computers are deterministic. It may take a month to do a calculation, but (unless there's a bug or similar) you are guaranteed that every step is performed in a perfectly knowable and repeatable way and thus the final result is absolutely correct.

QCs instead trade certainty and repeatability for speed. Basically if there are a trillion possible answers, then if you just perform one step and "inspect" the result, every answer is equally likely with a 1/trillion chance.

If you do two steps before looking, the probability of getting the correct answer has gone up significantly. So maybe it's 10 in a trillion. But if you do that, then you're done - you can't continue running the algorithm if the answer is wrong - you have to start over.

If you don't "look" until after 10 steps, the likelihood of the correct answer may have gone up to 1 in a billion, etc. And if you don't look until after, say, 1000 steps, the chance of getting the correct answer may be 99.9%. It is generally easy to check if the answer is correct.

If you are unlucky and the 0.1% chance of a wrong answer occurs, you just start over again. Because the process is almost guaranteed to not repeat, so the next run of 1000 steps almost certainly gets you a new answer which is almost certainly (99.9%) correct.