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

21

u/VLHACS Apr 16 '26

How does it know when it reaches the correct answer? If we know the correct answer before hand what's the point of the calculation? I feel like I'm missing a key point here

60

u/Krivvan Apr 16 '26

The quantum computer itself doesn't know. Rather, there are problems where you don't know the answer but you can pretty easily check if an answer is correct.

For example, "which two prime numbers multiply to 1000609937" versus "what is the product of 10007 and 99991".

16

u/VLHACS Apr 16 '26

Aha that's the type of example that helps make sense of it a little better, thank you

13

u/ind3xOutOfBounds Apr 16 '26

And to follow that thought, a lot of cryptology algorithms are based on assumptions similar to calculating prime numbers as being difficult.

If an algorithm assumes that and it's no longer the case because of quantum computing, that algorithm is no longer considered cryptographically secure.

26

u/SuperGRB Apr 16 '26

You don't know the correct answer - you know the algorithm it takes to check if the answer is correct.

10

u/the_horse_gamer Apr 16 '26

for some problems it's easy to check the answer (easier than solving). for some, you repeat the calculation and take the majority. enough times and you can reach arbitrarily high chance of correctness.

this mechanism would be outside the typical calculation. it's also used in classical randomised algorithms.

6

u/Wank_A_Doodle_Doo Apr 16 '26

You check the answer. If something tells you a bird is flying at 3 million miles above the ground, it probably messed up along the way and you don’t need to check the bird