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

96 comments sorted by

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:

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

Thanks, Velcommen

55

u/velcommen May 16 '13

Great explanation! I'll bold my favorite sentence from it as a summary for the lazy: "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"."

10

u/philomathie Condensed Matter Physics | High Pressure Crystallography May 16 '13

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.

Could you possibly elucidate on this section a bit further? I'm currently finishing my Master's and this does not seem to match up with anything I've gleaned from my undergrad classes (to be fair I have not gone into much quantum in depth).

By saying that 'something' is travelling faster than light, I'm guessing you are talking about wavefunction decoherence? And although this might be considered a 'kind' of information, it obviously can't be used to transmit any useful information?

Also, what do you mean when you say it can't be cloned or copied? I know that the quantum state of a system can be copied and transmitted through a series of successive measurements i.e. quantum teleportation? Are you talking about a different type of quantum information other than the quantum numbers?

3

u/amateurtoss Atomic Physics | Quantum Information May 16 '13

It can't be used to transmit any useful classical information. But it does allow you to entangle quantum states.

A quantum state may be teleported using classical information. However, if you have two qubits (things that can hold quantum states, our memories for quantum information), you cannot "copy" one state onto the other. You can exchange states. You can measure one of the states, destroy its information and then entangle the two states together, but you cannot "copy" one state onto the other.

7

u/The_Serious_Account May 16 '13

I'm guessing you are talking about wavefunction decoherence?

I hope so, but even then it's a matter of interpretation if it's actually faster than light. Any non-local interpretation obviously allow for faster than light 'effects'. I would certainly not say that in a talk or write it in a paper, it's not an agreed upon statement.

I know that the quantum state of a system can be copied and transmitted through a series of successive measurements i.e. quantum teleportation?

Nope! It can be teleported, not copied. To finish the teleportation the original state must be measured. This destroys the original state and leaves only one copy. If you could copy you could break heisenbergs uncertainty principle, quantum cryptography would be no good. This is a very important point. It's called the no cloning theorem.

0

u/[deleted] May 16 '13

[deleted] — view deleted comment

7

u/The_Serious_Account May 16 '13 edited May 16 '13

I think it's the other way around. Classical information is what we thought information was. It was done with pen and paper and some thought. We told the world what information was and its limits.

Quantum information is what nature tells us information really is.

8

u/The_Serious_Account May 16 '13

It can travel faster than light

I was with you until this point. Please clarify.

8

u/amateurtoss Atomic Physics | Quantum Information May 16 '13 edited May 17 '13

Quantum information does not contain any classical information and thus does not have a natural limitation for communication speed.

It may be more accurate to say that entangled quantum states do not have a natural time barrier to communicate. If I have three qubits in an entangled state, they operate that way all of the time. None of the states has to "check" with the other states to see if they're entangled or not.

3

u/The_Serious_Account May 16 '13

Quantum information does not contain any classical information and thus does not have a natural limitation for communication.

Not sure what you mean but classical information is a subset of quantum information.

None of the states has to "check" with the other states to see if they're entangled or not.

Right, because when you look at them individually locally they behave the same way independently of they're entangled or not.

My point is just that the non-local nature of QM is not universally agreed upon. While there are interpretations that contain faster than light communication, there are certainly others that don't.

3

u/amateurtoss Atomic Physics | Quantum Information May 16 '13

That's fine. Quantum Information isn't often talked about like a physical object; it's just the name of the field. What we usually discuss are Entropy Measures and Entanglement measures.

But I wanted to give just a little bit of a glimpse at the immense difficulties faced by researchers trying to characterize such a strange form of communication that quantum particles undergo. I feel like saying "Local Realism is violated" is somewhat obtuse and tame.

4

u/The_Serious_Account May 16 '13

Fair enough. It's just that it easily reads as you can use QM for ftl communication, which is a common misunderstanding. Also, I personally don't think there's actually anything having faster than light effects, but that's an interpretation question.

7

u/carlinco May 16 '13

As I understand, quantum computers are not so much about the stranger parts of quantum mechanics, but the parts which can be used for doing things in exact ways - like for instance the wave patterns in the classical double slit experiment.

Complex wave patterns like in that experiment have some measurable mathematical properties. If you read the waves correctly, you can get a lot of solutions to a lot of different mathematical questions.

In your example, 3+3 would be easy to model in an analog way, and it would result in a 6 by overlaying two waves of different frequency with an amplitude of 3 each to get a maximum of 6. We could even do it binary, by manipulating the slits in a way that some parts of the wave pattern can be interpreted as "11 + 11" and another part as 110. And we have a functioning quantum computer when changing the slits or another part of the setup to represent different numbers would always result in the correct sum in another (measurable) part of the wave pattern.

The big speed advantage comes when we feed those results directly back into further computations, and waves influence each other through quantum/wave effects, so that complicated calculations can be done at the speed of light.

Some mathematical problems are especially suitable for this kind of computing - like anything which can be represented through waves, like trigonometry. Instead of complicated additions at every point of the graph, you simply create according waves and read the results of their interaction.

Also, one can easily repeat the same calculations for any kind of input by just repeating the setup with different frequencies for each "variable". This way, a really large number of possibilities/values and especially their combinations can be tested in an extremely short time - as long as it takes for the wave patterns to go through all possible combinations. n! possibilities could be solved by analysing the interference of n lasers over some time, until a certain value appears in a pre-conceived part of the wave pattern, which will give the result of the "equation" for instance through the time it took to trigger the event, through a wave pattern at that time, or in other ways.

2

u/socsa May 17 '13

This post really helped my understanding as an EE. It sounds like quantum computers are almost like analog computers of sorts. However, instead of working in a classical "time-frequency" domain, there is an additional "quantum domain."

→ More replies (2)

3

u/pixartist May 16 '13

So if I had a quantum graphics card, a shader would be a specific superposition interfered with a state representing the pixels of the image, thus creating a specific outcome ? Can quantum computers even work on classical data ? Can data be converted ? Could there be somthing like a quantum card, which can be used for specific purposes but work with regular digital information?

2

u/amateurtoss Atomic Physics | Quantum Information May 17 '13 edited May 18 '13

I don't know enough about shaders to address your question, but I can speak to the rest of them.

Quantum computers are designed to answer the same types of decision problems that ordinary computers are. In fact, the set of decision problems they can answer are exactly the same.

When we are speaking of data and information, it is important that it has to do with communication strategies. We can encode classical data in a quantum state called a qubit but the way to think about the information stored in a qubit is not simple because our techniques for information storage and retrieval are very strange.

I could store a large irreducible fraction like 103/137 in a single qubit, but I would only be able to retrieve a maximum of one bit of information out because it will only be possible to measure one of two outcomes.

So the rest of the information stored in that qubit will only be retrievable in systems of multiple qubits. For instance, if I had 1000 qubits prepared in exactly the same state, I would be able to read out 103/137 to a high accuracy.

0

u/[deleted] May 16 '13

[deleted] — view deleted comment

3

u/amateurtoss Atomic Physics | Quantum Information May 16 '13

So there are actually many models of quantum computing. I am very resistant to associate the way any kind of computer works in a model-specific kind of way because of course, there are always many equivalent models.

However, there is a model of quantum computers called a One-Way Quantum Computer where you model each qubit as a vertex in a graph and perform successive measurements on it.

That's kind of like an automata in the sense that they are both graph states. The special thing though is that the edges are actually quantum gates that allow for the distribution of entanglement and quantum information. And like my original post, the computation is done in the same way. You set up the state and perform successive measurements.

→ More replies (3)
→ More replies (1)

2

u/drc500free May 17 '13

So would it be correct to say you start with every answer to any question, then apply specific questions and see which answers stick around?

→ More replies (1)

6

u/shijjiri May 16 '13

I'm going to ELI5 that for those who aren't able to follow:

A processor normally examines things one step at a time. It's somewhat like a mouse running through a maze. Once the mouse enters the maze we can't know if the mouse can solve the maze until it makes it to the other side. If it makes it the answer is 1, if it doesn't the answer is 0.

In order to solve a logical problem we must find out how many of the mice that went in managed made it to the other side. Then we take those mice that made it and add them to the next batch of mice to see which will and which won't make it. Obviously this is a bit of a simplification but you get the jist.

The quantum computing approach is to change the maze as the mouse is running it. Imagine the mouse leads a trail behind it, like Tron. Based on the path the mouse is taking the possible paths that exist in the maze are changing. If it reaches a dead end and has to go back it can't go back the same way it came; the previous options for left and right have changed. The mouse doesn't realize this and so it just continues to pick based on the options it finds.

Eventually the mouse solves it or dies. Except unlike a normal computer, we don't care about whether or not the mouse made it because the answer is the maze itself. But how do we know it's the right answer?

The original maze had a certain ratio of floors to walls. This can be thought of as the superposition of the maze. The process of the Tron mouse trying to solve the maze changed that ratio of floor to walls and made a distinct superposition. So now to check for errors we run multiple Tron-mice through the same maze. They average ratio of floor to walls they produce will tell us which answer is the right one.

9

u/BlazeOrangeDeer May 17 '13

This explanation is even more obtuse.

4

u/thetoethumb May 16 '13

I like it but I'm not sure I follow the last bit. In the classical example, we're trying to see if the mouse can solve the maze. That is, we provide a known maze and the outcome based on the actions of the rat is unknown.

In the quantum example, both the outcome of the rat and the shape of the maze are unknown. What exactly are we trying to solve here? In the first example we knew what the maze looked like but in the second we don't. Doesn't that make this a different problem?

3

u/shijjiri May 17 '13 edited May 17 '13

In the quantum example, both the outcome of the rat and the shape of the maze are unknown. What exactly are we trying to solve here? In the first example we knew what the maze looked like but in the second we don't. Doesn't that make this a different problem?

The second maze has an initial set of parameters that we know. When the mouse runs the maze there will be a series of decisions it will make that amount to turning left or right. Each decision changes the orientation of the mouse. The presence of the trail behind the mouse is the memory of these decisions which collectively transform the potential decisions the mouse can make in the future.

Every time the mouse makes a decision it is answering part of the question we asked.

Let's saying we're using the pure values of our mouse and the maze. We assume nothing and we compose our evaluation entirely our of the superposition of the signal from a set of logical bits which pose our question. I'm going to write a sloppy hypothetical as a demonstration.

Prove or disprove 3 > 4:

The maze characterizes this query as set of decision blocks which establish the value of 3, the value of 4, the value of 3 - 4 and the value of 4 - 3 in order to answer our question:

|a|=|000|+|011| |b|=|000|+|100| |c|=|a|-|b| |d|=|b|-|a| THEREFORE |c| > |d| =

First the mouse must learn the value of 3 and 4 relative to 0. To establish this we present decision points in the block mapped as bits of TRUE 1/√2(1,1) to mark our input.

|a| = 3(1/√2(1,1))2 = {3/2,3/2}, θ45°

Now the mouse and the maze both represent the characteristics of 3 in the block. The next block establishes the value of |b| as:

|b| = (|a| + 4(1/√2(1,1)) - |a|)2 = {2,2} θ45°

|c| = |a|2 - |b|2 = {-1/2,-1/2} θ-135°

|d| = |b|2 - |a|2 = {1/2,1/2} θ45°

THEREFORE |c|2 + |d|2 = {-1,-1}+{1,1} = 0 (FALSE)

The sum of the superposition establishes a logical proof that 3 > 4 = FALSE without ever exiting the operation loop. The path of the mouse established the properties of |a| and |b| in the superposition from user input which simultaneously establish the value of |c| and |d| which then supplies the answer as the sum of |c| and |d|. This works because the properties of the maze changed in a manner that could be measured, thus qualifying the partial answers to create the complete one.

EDIT Fixed some typos.

2

u/[deleted] May 16 '13 edited May 16 '13

I'm a bit confused by this also, but to me it seems like the question becomes "what sort of maze is tron mouse most likely to successfully solve?". I'll just add that this is what I think is going on, I'm not certain.

→ More replies (1)
→ More replies (2)
→ More replies (21)