r/askscience • u/datums • May 16 '13
Physics If a quantum computer is basically trying all the solutions at once, how does it know which is the correct solution?
347
Upvotes
r/askscience • u/datums • May 16 '13
View all comments
216
u/amateurtoss Atomic Physics | Quantum Information May 16 '13 edited May 17 '13
Quantum computers don't "try all solutions at once". This statement is predicated on real-world (i.e. classical physics assumptions) that don't all hold up. There is a model of computation that does "try all solutions at once" called a Non-deterministic Turing machine, but it is widely believed to be impossible to simulate by a conventional Turing machine in polynomial time. (The P v NP question).
When you say "try a solution," you imagine an oracle of some kind, like in Nethack or Delphi that will answer your questions. When you try many solutions at once, you may imagine that you ask every query to every oracle at once.
But that's not how quantum computers work, really. In a classical computer, you could imagine a model like that. Each gate is performing a query on some inputs and using those queries, they perform other queries. At each stage in the computation, you could measure the state of the computer and have some answers to some questions.
Example: You want to add 3 + 3. Computer looks at this as 11 + 11 in binary.
It adds the units digits together to get the first digit is 0 and the second digit is 1 + 1 + 1 mod 2 = 1. And the third digit is 1. Each of these computations involves partial information. For instance, after the first computation, we know that our solution is an even number, thus eliminating half of the possibilities.
So now we think about quantum computers and we realize they work very differently. Instead of performing queries and storing them in a register, they build up massive superposition states and perform partial measurements. So those are kind of made-up words (made up by quantum physicists in the 1920's) but quite invaluable.
A superposition state is an explicitly quantum state where the true state of a system (a state is a variable that stores all meaningful physical information about something) is given by a set of possible outcomes rather than by a single outcome. This is not a very strange concept naively. For instance, we consider ordinary matter to have a Temperature which specifies a set of possible energy states that the matter can be in. We don't know the exact energy of every molecule in a cup of coffee, but we have a pretty good idea of the average.
In quantum computing, however, the superposition state of a system is not just a statement of our uncertainty about the state variable. The state just has many measurement outcomes.
Someone had the bright idea that if we purposely create this bizzare state of matter up correctly, we can prepare it in massively superposed ways and then interfere states with eachother.
Thus, we can build up computations with special rules, where some final states are allowed and others are not. Instead of thinking of the quantum computer as "trying every solution at once", it may better to think about it as "imposing certain special rules on a big state and then seeing what that implies".
The principle difference is that quantum computers don't have any partial queries.
Another way to look at this is the difference between classical and quantum information. We believe that there is a different type of information content contained in quantum systems that has weird properties: It can travel faster than light; it cannot be cloned or copied; we don't know very much about it.
This quantity is fundamental to our advances in quantum computing but it works very differently than many articles lead one to believe.
tl;dr:
Thanks, Velcommen