r/askscience •

I have never read a satisfactory layman's explanation as to how quantum computing is supposedly capable of such ridiculous feats of computing. Can someone here shed a little light on the subject?

[deleted] — view deleted post

0 Upvotes

448 comments sorted by

550

u/nobeardpete Jan 03 '14

Grover's search algorithm is a nice example of the kind of thing you can do better with a quantum computer than a real computer. The problem it solves is as follows. Suppose you have an unsorted list of things, and you want to find the position of a specific thing in that list. With a classical computer, you can't do better than just to look through the list, either in some order, or possibly randomly, until you find it. On average, the amount of times you have to do this is half the length of the list.

With a quantum computer, instead of checking positions in the list one at a time, you can check a quantum superposition of every possible position. By arranging your quantum circuitry properly, you can set things up so that each time you check this quantum superposition of all possible answers, the wrong answers each cancel themselves out a little bit, and the single right answer constructively interferes with itself, becoming stronger. Repeat this process a number of times that scales as the square root of the length of the list, and instead of the superposition of all possible answers that you started with, you are left with only the correct answer.

This gives a quadratic speedup over the best that a classical computer can do for this particular task. Other tasks may be more or less suited to the strengths of a quantum computer. A great deal of hope has been hung on the idea that with the right programming, it might be possible for a quantum computer to solve NP hard problems in polynomial time, perhaps with a similar strategy of starting with all possible answers and cancelling out the wrong ones. To my knowledge, no one has figured out a way of doing this, however.

183

u/badukhamster Jan 03 '14

good explanation but not quite accurate. after repeating by the square root of the list you have the highest efficiency. that means you have a HIGH CHANCE of getting a correct answere but haven't taken too much time getting the correct answere. there are quite a lot of quantum algorithms to solve hard problems because the theory of quantumcomputers is quite old just there are still no commercial quantumcomputers to date.

25

u/[deleted] Jan 03 '14

there are still no commercial quantumcomputers to date.

There are commercial quantum computers, namly the D-Wave series.

There just aren't any consumer level computers.

236

u/OlderThanGif Jan 03 '14 edited Jan 03 '14

There are no commercial quantum computers capable of carrying out Grover's Algorithm (or Shor's Algorithm, or any other algorithm we traditionally think of as a "quantum algorithm"). D-Wave's computers are neat but they have no resemblance to what's traditionally been called "quantum computing" in the literature.

59

u/efstajas Jan 03 '14

So what are D- Waves doing?

124

u/OlderThanGif Jan 03 '14

I actually haven't found a 100% concrete explanation of what D-Waves do. They do adabiatic quantum computing. Instead of a traditional quantum computer doing all sorts of different computations by arranging quantum gates together, an adiabatic quantum computer really only has one possible instruction. You come up with a mapping between the system you want to solve and a Hamiltonian and then the computer can help you find the ground state of that Hamiltonian.

This is a computational model that we never learned in my quantum computation course, so I'm not exactly sure what the properties of it are (e.g., what complexity class it would match up with). I gather it's useful for solving optimization problems but the jury's still out on how useful this is.

81

u/enostradamus Jan 03 '14

D-Wave purposely obfuscates how exactly their machines work because they aren't really quantum computers. Or, more specifically, they can't record whether their computers are capable of actually doing quantum calculations properly. Pretty sure they can't calculate superpositions simultaneously, which by default, wouldn't make them quantum computers.

→ More replies (1)

68

u/The_Serious_Account Jan 03 '14

It's important to note that so far d-wave is all claims and no evidence. Science is not judged by pr stunts or who you can trick into buying your box. Even if you manage to trick Google. That's impressive, but not scientific evidence.

The burden of proof is on them and they've simply not met it.

17

u/[deleted] Jan 04 '14

Google and the NSA and all the other people doing machine learning have very good uses for the quantum annealing that can be done by the d-wave, because they basically do annealing of a model (warning: gross oversimplification) with classical computers. If the quantum annealing process can be done well, they have a lot of uses for it, but it does not imply that they think that the D-wave is a general quantum computer (which it is not).

→ More replies (8)

5

u/ltlgrmln Jan 03 '14

So you are saying that a D-Wave is the quantum equivalent of an ASIC? It seems so but I'm just trying to understand better. I heard about the D-Wave when it came out but even the intro video was marginally confusing for me.

50

u/OlderThanGif Jan 03 '14

I don't think the ASIC analogy is a very good one.

Imagine a world without any physical computers at all. There have been decades of academic research into digital computers (what sort of logic gates would be needed, what instructions they would perform, what algorithms you could write for them that would perform well, what programming languages might be developed for them, etc.) but no one's actually managed to build a commercial digital computer yet.

Then out of nowhere some company comes out with an analog computer and says "look! We built the first computer!" It could be that this new computer is great, but it's not anything like what people had been publishing papers on for decades. And even worse, imagine that the company is secretive about the mechanics of their analog computer so the community at large isn't really sure what operations it performs or how it stores its data.

That's sort of where we are. A company's come out with something and called it a "quantum computer" but it's not anything like how we've been trying to produce quantum computers before. All of the work we've done trying to come up with neat algorithms and programming languages and stuff doesn't have any relevance to this new computer. We don't know exactly what this new computer is capable of or not capable of.

To be clear, I'm not trying to say that D-Wave computers are analog and traditional quantum-gate computers are digital. Both models use qubits. I'm trying to set up an analogy between everybody doing things one way and then a company coming out to say that they're doing it a different way "but trust us that it's really pretty much the same sort of thing".

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

20

u/[deleted] Jan 03 '14

D-Wave computers are a non-general type of quantum computer which can (supposedly) perform quantum annealing. When we say that something is a "computer", we're typically referring to a general-purpose computer. That is, a computer which can be programmed to factor polynomials, or play minecraft, or do whatever the hell other computing task we want it to do. Non-general computers (like D-Wave) on the other hand, are more like a computer that can tell you whether a number is even or odd, but can't be programmed to do anything else. It may even be able to do that one task really well, but it's not of much use if we can't make it do other things too.

23

u/dizekat Jan 03 '14

Yeah, it's closer to a wind tunnel than to a computer, in that regard. A wind tunnel is a very powerful fluid dynamics computer. Except we don't call it that, and I'm not entirely sure why one should call D-wave thing that.

→ More replies (3)

20

u/[deleted] Jan 03 '14

Keep in mind for what I'm about to say that I'm just an undergrad who was lucking enough to work with the D-wave One computer.

People are currently solving all kinds of small optimization problems on the D-wave computer, mostly just to figure out how the computer actually works: what are it's strengths, weaknesses, how can it be improved? Etc. The reason it cannot really do anything practical yet is because the chips are so small and the biggest so far only has 1024 qubits (think of these as bits) and so the computations have to stay pretty basic. However, it is pretty trivial to make a bigger chip it just costs a lot of money.

For an example of things people do on the D-wave, I was able to solve a N-queens problem in the very simple 3-Queens case but had trouble with the 4-Queens case do to the size of the machine. Similarly, the TSP problem is also solvable but the number of vertices is limited by the hardware as well.

→ More replies (5)

14

u/[deleted] Jan 03 '14

The D-Wave computers implement a subset Adiabatic quantum computation, rather than the quantum gate model. There are several quantum algorithms they implement, being types of Quantum annealing.

They're not universal, but they're still quantum computers. Asserting otherwise would be comparable to saying the Atanasoff–Berry Computer wasn't really a classical computer because it couldn't sort a list.

20

u/OlderThanGif Jan 03 '14

It's true. I'm careful not to say they're not "quantum computers" though I think it still worth pointing out that they're of a different class of quantum computers. If you follow the progression of the thread ("what do quantum computers do?", "they let you search through an unsorted list in O(sqrt(n)) time, but we don't have any commercial quantum computers yet", "yes we do!"), someone not reading very carefully could reasonably get the false impression that we have commercial computers that let you sort through a list in O(sqrt(n)) time.

I try not to get too bogged down in labels and war about what's "quantum" and what's not. The interesting bit is what these computers allow you to do.

→ More replies (4)
→ More replies (1)

5

u/apr400 Nanofabrication | Surface Science Jan 03 '14

I believe that it is is still reasonably controversial as to whether or not D-Wave computers are genuinely quantum computers (at least in the sense that is being discussed in this thread).

6

u/[deleted] Jan 03 '14

Dr. Lidar of USC has published a couple of showing that the D-wave does indeed perform quantum annealing but of course people are not convinced. Here is a paper he published http://arxiv.org/abs/1305.5837 which was criticized by http://arxiv.org/abs/1305.4904 and then his response afterwards http://arxiv.org/abs/1304.4595.

8

u/impossiblefork Jan 03 '14

Yes. There hasn't been a definite demonstration that the D-Wave computer isn't actually equivalent to an classical computer.

A look at wikipedia (http://en.wikipedia.org/wiki/D-Wave_Systems#History_of_controversy ) will reveal that ordinary classical computers correctly programmed outperform the D-wave computer on the problem it's designed for, so even if it were a real quantum computer it is not a very good one.

11

u/[deleted] Jan 03 '14

I don't think that arguing about the slow running time of the D-wave is valid at this point. The D-wave is extremely limited by it's hardware right now and cannot be tested on problems large enough where it could theoretically outperform a classical computer anyways.

→ More replies (2)

1

u/46xy Jan 03 '14

So could you combine a quantum processor with a standard one? Quantum processor to reduce the amount of stuff, and standard one to look through the much shortened list with a high chance of the correct one being there.

1

u/Krivvan Jan 03 '14

Classical processors are able to do things that quantum processors would not be able to do well, so it's proposed that future computers will use both (or have some kind of cloud solution for that).

1

u/gjhgjh Jan 04 '14

Am I understanding this correctly? The best a quantum computer can do is give you it's best guess. I can see where this can be helpful in guessing what a password is. But from this description I don't feel comfortable having a quantum computer doing things where precision is necessary like banking or surgery.

1

u/wmjbyatt Jan 04 '14

There are deterministic quantum algorithms, such as the Deutch-Jozsa Algorithm.

1

u/BenjaminGeiger Jan 04 '14

Which means that a lot of problems in NP can be solved in polynomial time, right? By definition, NP problems can have their solutions checked in polynomial time...

→ More replies (2)

38

u/dangerousbirde Jan 03 '14

With a quantum computer, instead of checking positions in the list one at a time, you can check a quantum superposition of every possible position.

Could you expand on this point a further? I'm still a little fuzzy on superposition. My understanding is that it's not "On" or "Off" but rather both simultaneously but how does this actually improve computing capabilities?

14

u/quaste Jan 03 '14 edited Jan 03 '14

Think about it in terms of the memory a number is stored in in binary: in a 4 bit space you can store ever number from 0000 (=0) to 1111 (=15), but only one of those 16 numbers at a time.

But having a "quantum memory" of 4 bits each bit can be 1 and 0 at the same time thus representing every of those 16 numbers simultaniously, allowing to "check" all of them in 1 step instead of 16 steps for 16 numbers.

Now apply that to 8, 16 and 1024 bit numbers and so on...

Of course, the hard thing to to is to apply an algorithm/filter on those qbits.

11

u/iHateReddit_srsly Jan 03 '14

But having a "quantum memory" of 4 bits each bit can be 1 and 0 at the same time thus representing every of those 16 numbers simultaniously, allowing to "check" all of them in 1 step instead of 16 steps for 16 numbers.

I don't understand this. How would they be able to be both 0 and 1 at the same time? How does that help, and how does it check all of them in 1 step?

12

u/Wilx Jan 04 '14

This reminds me of one of my favorite brain teasers and maybe it will help you with the concept:

You have 12 coins. 1 coin is counterfeit. The counterfeit coin looks the same, but doesn't weigh the same as the legit coins. It can be either heavy or lighter. You have a balance scale to figure out which coin is counterfeit. You could brute force the solution weighing one coin against another until you found the counterfeit one, however there is a way to do it 3 try's.

***** Spoiler **** Figure out how before reading the answer below if you want.

1st try weigh 4 coins against 4 others. If they balance you know it is one of the 4 left and the next steps are easy. However if they don't balance...

2nd try. Call each of the 4 coins from the light side "L", heavy side "H", and the neutral left over's "N". Put 2 L's and 2 H's on one side, then 1 L, 1 H and 2 N's on the other. Again if they balance it is one of the last 2 coins and is easy. However if the N's end up on the light side this time, you know it's either one of the 2 H's from the heavy side or the L from the light side.

3rd try. Weigh the 2 H's from the heavy side against each other.

I could have given you a more verbose explanation, but you get the idea. What if it was billions of binary bits and you could find what you were looking for faster that looking at them each one at a time.

Does that help with the concept of comparing multiple states simultaneously and how it could speed up computing?

19

u/YouTee Jan 03 '14

that's literally the fundamental difference of quantum computing, that a qubit can be both up and down, or 1 and 0. So, and someone please correct me if I'm wrong, literally there's not much more simplification. You've got 4 qubits QQQQ and they're each capable of being 1 and 0, so rather than checking 0001 0010 0011 one at a time you simultaneously get to check each position of Q up and down (since they're both at the same time), which causes it to "collapse" into the correct answer.

15

u/nonamebeats Jan 04 '14

right, but the point of this whole post, what makes the whole concept difficult to accept, is that every explanation of quantum computing seems to nonchalantly gloss over the seemingly obvious question: how can something be two things at once? I get that its not a simple "because x" answer, but its completely counterintuitive to the average person's understanding of reality. It's like saying light is fast because it is able to move so quickly.

10

u/Igggg Jan 04 '14

The reason you're not seeing any specific answers to how something can be in two states at once is because there are none. In physics, we often can answer the question of "what" to a signficant extent, but not "why" - at least not at the lowest possible level.

Quantum mechanics is very unusual to anyone who hasn't considered its concepts before, as it describes events that are very different from those we see in the macroworld. For instance, we're used to seeing objects in one place and one place only - classically, they are, while in quantum mechanics, they are not. Instead, a microobject (such as an electron) isn't actually in any specific place - instead, it can be described as having a specific probability of being at any place, including very very far away.

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

5

u/[deleted] Jan 04 '14

This is an inaccurate analogy meant to sort of illustrate the concept.

Say you have a punch card with a 8x8 grid.

A traditional computer would look through a bit at a time checking to see if it is on (if it has been punched out) or off (if it hasn't)

A quantum computer would shine a light through be punch card. You know that there's 64 bits of information, and you know that some of it is off and some of it is on. You can get an idea of how much of it is on and off, and you can split the problem up to get a better idea.

Now consider expanding that from 8 by 8 to much larger, say millions by millions. Shining the light behind the card still illuminates the whole system. The information that you get is less obvious, but you can instantly tell certain things about the system, is it all dark? Did some light get through? Did a lot get through? To get similar information from a traditional computer you would have to check each bit individually.

Now it doesn't exactly work like this, this is just an illustrative anecdote as to why being able to evaluate a bit that can hold multiple undetermined results can be more effective in some applications than one that can only evaluate 1 and 0.

3

u/WasteTooMuchTimeHere Jan 04 '14

I think your post helped me finally grasp the concept; please tell me if I'm on the right track:

Traditional computing tells us if something is correct or if it isn't. To check a million records for the one correct result, the computer starts at the top and works down until it finds a match. This could be record 1, or record 1m, with the average being record 500,000.

Quantum computing looks at all 1m records at one time, and works out how likely each record is to be correct. It does this a few times to get a high probability of being correct, then does only one step of traditional computing to check if the record with the highest probability is actually the right one.

So overall, rather than potentially having to calculate 1m times, a quantum computer might only need to calculate 20 or 30 times to find the correct result.

Whilst this is obviously dumbified significantly... Am I kind of on the right track?

23

u/[deleted] Jan 03 '14 edited Jan 03 '14

[removed] — view removed comment

6

u/Snachmo Jan 04 '14

I think I can articulate one question bouncing around in the back of many reader's minds.

To say something can exists "as both 0 and 1" implies to the layman that it doesn't actually store information at all.

For eg, a hard disk stores information as "both 0 and 1" but you wouldn't do anyone a favor explaining it this way.

By the same logic, a qubit cannot exist as both zero and one with no further information, that would be useless in computing. Like "HDD", "qubit" must be the word for a group of discreet containers.

Help us understand what those are?

4

u/amalloy Jan 04 '14

I am by no means a quantum computing expert, but my understanding is that what you've said "must be" true is not true: a qubit doesn't store multiple ones and zeros like a hard drive does. It is the smallest unit of quantum storage, with room for either a one or zero. But unlike an ordinary bit, it isn't "fixed" to 1 or 0 at all times: until you measure it, by observing its current state, it exists in what's called a superposition of states, where it has some probability of being either 0 or 1.

Quantum computing, it sounds like, involves performing operations on these qubits while they are still in a superimposed state, with the goal of arranging things such that they have a high probability of yielding a useful answer when you read them? I'm rather fuzzy on that last bit myself.

→ More replies (2)
→ More replies (2)

8

u/Dapianoman Jan 03 '14

What's a superposition?

5

u/banjo_shammy Jan 04 '14

Nice little example diagram that shows wave superposition http://www.math.cornell.edu/~numb3rs/jrajchgot/superposition.jpg

3

u/wildgoat12 Jan 04 '14

Basically the addition of multiple waves on top of each other. For example, when the waves are in sync and are superimposed, the signal grows stronger, which is what is being described here as constructive interference.

7

u/Dannei Astronomy | Exoplanets Jan 03 '14

By arranging your quantum circuitry properly, you can set things up so that each time you check this quantum superposition of all possible answers, the wrong answers each cancel themselves out a little bit, and the single right answer constructively interferes with itself, becoming stronger.

How is this done without knowing the correct answer (and hence having to have to compute it) to begin with?

I guess I can see how to do it - e.g. if you're searching for primes, you cause only prime answers to interfere constructively, and primeness is something you can indeed "test" for (if that's the correct term here). You just need to define what properties the correct answer has, as you would with any normal problem, and apply those constraints via interference, right?

4

u/oi_rohe Jan 03 '14

It's because you're searching for the position of a known datum. You know exactly what you want to find, but not where it is. Thus your result is the position, not the data.

I have no credentials to support this explanation though.

4

u/Dannei Astronomy | Exoplanets Jan 03 '14

Yeah, I was really thinking about it with a quantum hat on, not a compsci one - it's kind of obvious now that you just make only the position which holds a specified piece of data interfere constructively, which is pretty easy to implement.

5

u/Arelius Jan 04 '14

And that's why quantum computing is only good for a subset of problems, and not all. Particularly the problems that are easy to test for, but where brute-force ends up being the only real method of discovery.

3

u/[deleted] Jan 03 '14

I still get stuck when I try to relate quantum computers to the quantum world. I know a bit about wave particle duality and entanglement and such, but I'm not sure how one would use that to make qbits, or construct a quantum computer. Could a simple version of Grover's Search Algorithm be done using the double slit experiment? What about entanglement? If so, what would the setup look like? If not, then just what element of quantum mechanics is being exploited?

2

u/wasq13 Jan 03 '14

Would it be possible for a computer such as this to solve a game like chess?

12

u/jesset77 Jan 03 '14 edited Jan 03 '14

According to OP's linked find SciAm: The Limits of Quantum Computers, neither quantum nor classical computers can solve Chess on an NxN board in polynomial time.

This problem exists within "PSPACE", a very large set of problems which can be solved in exponential time on either a quantum or classical computer with a finite amount of memory, but we believe it to be outside of both NP and BQP: meaning that we believe it cannot be solved (either by classical or quantum computer) in polynomial time, and a correct solution can't even be checked in polynomial time. Checking to see if a solution is correct is basically as hard as solving the problem in the first place.

By itself that does not mean that classical or quantum computers will not be able to play perfect chess on an 8x8 board within a budget of resources we could offer them, just that the resources required follow the form 8N which is embarrassingly inefficient. If we build computers so fast they can perform a squintillion (warning: not a real number :P) operations per second, we could perfect 8x8 chess with that. The problem becomes that same computer would be left in the dust if future generations upgrade to 9x9, 10x10 etc chess. Just putting an extra row or column on the board could change a job from "1 hour", thank's to our computer's already amazing horsepower to "age of the universe" or worse. No matter how much horsepower we offer, it would never scale.

An efficient algorithm, one that requires only polynomial time, would mean that adding rows to the board could only complicate the problem by a factor moore's law (which is also polynomial) could have a reasonable chance to catch back up to. For example N4 is pretty steep, but Moore's N2 can catch up to that in N2 time. If your problem is 8N, then N will always reach a tipping point where you'll never catch back up again.

4

u/[deleted] Jan 03 '14

I doubt it: the speedup isn't large enough. Let's assume that to solve chess by brute force, you need to search a list of all possible positions. That's a big assumption, but I'm just trying to demonstrate the principles at work here.

There are at least 2155 unique chess positions. A sqrt(n) speedup means you need to search sqrt(2155) = 277.5 positions. That's still a huge number (nearly a trillion trillion).

→ More replies (3)

1

u/coltrane26 Jan 04 '14

What does it even mean to "solve" chess?

2

u/Admiral_Dildozer Jan 03 '14

I'm not super tech savvy, and I'm probably way off. But it almost sounds relatable to really really fast RAM. How it builds and remembers the location of data. How wrong am I?

9

u/[deleted] Jan 03 '14

Very (sorry). No matter how fast your RAM, a normal computer would still have to check every position in the list until it finds what it's looking for.
The q-computer instead checks the superposition of every possible solution (so if you had 3 entries, it would check the superposition of 100, 010, 001). Repeatedly checking this superposition gives a higher probability to the correct answer than the wrong answers.
The advantage is for very large lists. A computer would have to check (on average) half the items in the list (n/2), whereas a q-computer needs to check the superposition sqrt(n) times. So if you've got, say, a million items (106 ), a computer would need to check 500 000 items, but a q-computer would need to check the superposition 1000 times. A trillion items (1012 )? 500 000 000 000 vs. 1 000 000.

(If that sounds like handwaving, it sort of is. I'm rehashing /u/nobeardpete's explanation, I don't fully understand the mechanics behind it.)

2

u/BlazeOrangeDeer Jan 03 '14

It doesn't really have anything to do with data speed, it's more that the way the data is manipulated allows for better algorithms

2

u/jesset77 Jan 03 '14

It's the implementation of Grover's algorithm that confuses me.

The way you describe it, you'd still have to program this "unordered" list of straws into your quantum matrix. How does that not already take N time? For example, if you're looking for a needle in the straws, just check if each straw is really a needle before committing it's superposition and you'll find it before you're even done preparing to run grover.

Is the issue something like putting all the values into a quantum sieve only takes N time, while sorting takes >N*log(N), and you might have the opportunity to prepare (absorb the N time) prior to knowing which needle you want?

If that is true, could you use the N-invested preparation more than one time, and/or for more than one search per investment? :o

2

u/beef_swellington Jan 03 '14

A quadratic speedup would not be significant in reducing the complexity of a problem with an exponentially large solution set. It's a difference of n2 vs 2n. All problems of quadratic (/polynomial) complexity are already in P anyway.

A quantum computer operating as you describe would not meaningfully increase our ability to solve problems in the NP-Complete space.

1

u/[deleted] Jan 03 '14

Does anyone really think that quantum computers will uniquely be able to solve NP-hard problems in polynomial time? I know there is a small minority of computer scientists who believe that P=NP, but I was under the impression that they believed traditional computers would also be able to do this as well once we discovered the algorithms.

1

u/mozolog Jan 03 '14

This sounds a lot like building an index on your data. How much time does it take to prepare the quantum superposition for searching / load the list into the computer? Is it instant?

1

u/FXLeach Jan 03 '14

This is the layman's answer? :S

1

u/[deleted] Jan 03 '14

How do I "arrange my quantum circuitry properly"? Where can I learn how people at the cutting edge do this, and have theories as to how to optimally arrange this quantum circuitry. Related question: Where can I go to learn what the circuitry ingredients could be? I'd expect people to use superposition of spin states or light polarization directions or something but I don't understand if there's a way you'd have to 'scale that up' somehow in order to 'crunch enough numbers' that you'd have an effective 'arrangement of quantum circuitry'. Do my questions make sense to you? Thank you.

1

u/[deleted] Jan 04 '14

So in laymans terms...?

1

u/[deleted] Jan 04 '14

Are all quantum algorithms probabilistic?

1

u/hobbitmessiah Jan 04 '14 edited Jan 04 '14

I did a review paper for part of my degree that attempts to explain as best I could how Grover's algorithm works. Nobeardpete's explanation is correct, and you can see that successive applications of the algorithm result in an increase in amplitude associated with the quantum state that possesses our answer.

1

u/tbid18 Jan 04 '14

A great deal of hope has been hung on the idea that with the right programming, it might be possible for a quantum computer to solve NP hard problems in polynomial time, perhaps with a similar strategy of starting with all possible answers and cancelling out the wrong ones.

I would like to point out that most computer scientists do not believe that quantum computers will be able to solve NP-complete problems in polynomial time (i.e., BQP ∩ NP-complete = ∅).

1

u/Cruithne Jan 04 '14

What implications, if any, would a computer solving NP-hard problems in polynomial time have for the P=NP problem?

→ More replies (25)

54

u/bo1024 Jan 03 '14

I'll first give you a perspective on classic probabilistic computing (computing with random numbers), then explain its analogy to quantum computing, then hopefully try to shed a little light on why the two are fundamentally different.

Suppose you flip a coin and cover it up without seeing the outcome. As far as you can tell, the coin is in a "superposition" of states -- with probability 0.5 it's heads (or a binary "1"), with 0.5 it's tails (or "0"). Now think of flipping a bunch of coins, but not looking at them, to get a big superposition (with equal probability, it's 0000 or 0001 or 0010 or ...) and feeding this result into a computer, again without looking at it. For instance, say the computer is supposed to multiply the input by five.

Now, from your perspective, the answer the computer spits out is still in "superposition" -- it can't be 2 or 3, because you never get 2 or 3 after multiplying by 5, but it could be 0 or 5 or 10 or 15 or ... all with equal probability.

Then you look at the answer spit out by the computer. You've broken the magic spell, destroyed the randomness. Now it's not a huge list of possibilities, but a single answer.


In quantum computing, the "quibits" can be in a superposition, meaning that with some probability you have 0000, with some probability you have 0001, and so on. So you can basically do the same thing as above. However, quantum randomness works a little differently. Each possible state of the input (like 0000), rather than being described by a probability like 0.128, is described by a complex number (one that includes the imaginary i) called an amplitude. For instance, say the amplitude for state 0000 is 0.026 + 0.089i. You can get the actually probability of that state, 0000, by taking the absolute value of the amplitude: sqrt(0.0262 + 0.0892) = 0.09272000862).

(If you're not familiar with the math, don't worry! The takeaway is that the rules of probability just change a little.)

To go along with this change, we have to change a whole bunch of details about how states evolve over time, for instance, what types of operations our computer can perform. But a key point is that, when you open your hand and observe the quantum coin, you "collapse" the superposition. It picks just a single state, like 0001, with the probability given by the amplitude of that state above.


OK, so why can quantum computers perform some tasks faster than classical ones? It's because the above analogy breaks down in a key way. When you flipped the classical coins and covered up the result, you pretended that it was in superposition, but you knew that it was actually in a single state the whole time (you just didn't know what it was). With quantum computing, it simply doesn't work that way. Cf Bell's Theorem.

Because of the complex numbers as amplitudes, a quantum superposition really does act like it's in many states at once. It can do something a classical superposition can't: It can have interactions between the states. So for example, if we apply the correct operation, we could maybe get the amplitudes of states 0000 and 0010 to "cancel" out while increasing the amplitude of state 0001. This makes it more probable that we'll observe 0001.

Notice that this is subtly different from the commonly-quoted-but-false "try all possibilities at once" idea: sure, you are in a sense trying all possibilities -- just as you are when you flip a series of coins classically -- but in the end you have to break the spell, make a single measurement, and that measurement will tell you just one state according to the appropriate probability.

But what you can do is carefully manipulate the superposition before you measure it, so that the answers you don't want tend to cancel out and the answers you do want tend to get more likely.

11

u/THC4k Jan 03 '14

I think this is a pretty good explanation how quantum computers work in a abstract way, but I still have no idea how you can actually perform operations on a quantum superposition (How to turn "superposition of all 4-bit numbers" into "superposiiton of all <4-bit numbers times 5>"?). Care to explain? :)

7

u/bo1024 Jan 03 '14

I don't know enough of the physics to make a good answer -- I wish I did, I just mainly know about the computation side. But in a classical computer, we'd have a bunch of, say, transistors, in a row, and if they have high current they're a "1" bit and if low current they're a "0". So in a quantum computer I think we'd have a bunch of particles for quibits, and if e.g. the spin is one direction it's a "1" and the other direction it's a "0". Then you can put these particles into superposition somehow, where their state is not any particular spin but is sort of indeterminate until it's measured.

Then you'd have to build the equivalent of logical gates, like AND and OR, and put the quibits through them and what you'd get at the other end would be a bunch of particles (quibits) in a different superposition. But I have no idea how that's physically implemented!

1

u/Tipaa Jan 04 '14

Notation:
Superposition s is described as |s⟩
The probability of a superposition s collapsing to state e is ⟨e|s⟩, presumably taken from the probability notation A|B being the chance of A given that B happens

Gates
Just like classical computing contains the logic gates AND, OR and NOT, quantum computing contains quantum gates that can geometrically (or otherwise) transform the qubits. Qubits are all complex numbers from -1 to 1 and -i to i, so they can be drawn as a vector on an Argand diagram (graph where real = x axis, imaginary = y axis) with length 1. A collection of these qubits gives a superposition. This means that the simplest gates work by treating the superposition as a collection of vectors in 2d space and transforming each vector by the matrix describing each gate. An example is the Pauli-X gate, which swaps the real and imaginary parts around. This is equivalent to the matrix [[0,1],[1,0]].

Logic
Other, more advanced gates like the CNOT use more than one qubit as input - CNOT runs the Pauli-X transformation on the second qubit iff the first qubit is |1⟩. This gives control over the program, and can be used to implement traditional boolean algebra. These gates can be chained together to perform both classical and quantum computations, such as the Fourier transform. The classical version can be calculated using boolean algebra and classical bits, but in a quantum computer it can also be described as a single large matrix (for N qubits, a 2Nx2N matrix). Using this transformation matrix, the logic can be reduced to a circuit of much simpler gates where the matrices combine to give the Fourier matrix. This gives the circuit's design - combining advanced gates together to recreate the Fourier transformation matrix.

Reduction to transformation
But these gates effectively amount to little more than geometric transformations in complex numbers, where instead of transforming all of the possibilities individually, you transform the planes they exist on instead. This seems to be the big leap quantum computers offer, as they can reduce some exponential-time problems (negate all the possible numbers in a 64-bit integer takes the order of 2^64) into polynomial time ones (I'll just flip the number line instead linear runtime).

Superpositions and some maths
The superpositions also act as waves in that they can interfere with each other, and hence construct or destruct the correct answer. The effects of interference are very interesting with complex numbers, as 'rotating' a number anticlockwise by 90o can do both, depending on the number. Take two qubits: qubit_1 that can be |-1⟩ or |1⟩, qubit_2 is |1⟩. We will rotate qubit_2 90o iff qubit_1 is |1⟩. Then do it again. Classically, this would be a 180o rotation for qubit_1 = |1⟩; nothing happens with qubit_1 = |-1⟩. However, here we have the superpositions interfering with each other. The first rotation creates two possibilities:

qubit_2 = ⟨1|q_1⟩*rotated(|1⟩) + ⟨-1|q_1⟩*|1⟩ //This can be simplified to (sqrt2)/2 + i(sqrt2)/2.

The second rotation is a bit more complicated. We do this same operation to the superposition and add them up again. But this time, they interfere between 0o rotation and 180o rotation just like waves do.

qubit_2 = ⟨1|q_1⟩*rotated(|(sqrt2)/2+i(sqrt2)/2⟩) + ⟨-1|q_1⟩*rotated(|(sqrt2)/2+i(sqrt2)/2⟩)
-> qubit_2 = ⟨1|q_1⟩*|(sqrt2)/2-i(sqrt2)/2⟩ + ⟨-1|q_1⟩*|(sqrt2)/2+i(sqrt2)/2⟩
-> qubit_2 = unit ( (0.92+0.38i) + (0.38+0.92i) + (-0.92+0.38i) + (-0.38+0.92i) ) // (reals cancel out)
= unit (2.6i) = i

So our possible 0o rotations and 180o rotations have probabilities that cancel each other out, leaving only 90o.
While I have almost definitely made some mistakes, I hope this shows how the superpositions of the calculations can cancel out in the end.

tl;dr
Quantum programming takes all possible states as one superposition of qubits. It then changes the plane on which the possible states lie to transform the possible states instead of doing them all individually. This then adds up nicely because qubits are normalised complex numbers, and doing an operation enough means that the probabilities of the correct answer increase nicely. This must be done a few times, however - observing the output collapses the superposition into an answer that might be incorrect. As with most science, repeat tests until a significant conclusion can be made (this is the correct answer with error of x) and backed up with numbers.

Disclaimer:
I am a high school student studying Further Maths and Physics at A2, looking to study Computer Science at Uni. Do not take my word as gospel, as it is probably quite erroneous. This is just how I interpret quantum computing currently, having had no formal education on quantum computing itself, only related topics.

1

u/randfur Jan 03 '14

What physical operations cause these interactions between state probabilities?
I suppose I'm asking what the primitive instructions of a quantum computer are and how they're implemented.

2

u/bo1024 Jan 03 '14

Unfortunately I don't know much about the physical details of implementation (see my response to THC4k) -- maybe that's elsewhere in the thread?

But if we just care about computing, we can think of them as analogues of logic gates, like AND and OR gates. These have simple rules -- you give it this input, you get that output. You give it this superposition as input, you get that superposition as output. And these operations just have to satisfy some simple reasonable rules, like they always take a superposition and produce a superposition.

And then, just like a classical computer program can (in theory) be built entirely with AND, OR, and NOT gates, there are a few quantum gates that are "universal". But I don't know how they are implemented in practice!

26

u/Osmanthus Jan 03 '14 edited Jan 04 '14

I've read most of the answers here but all are incorrect or misleading.

Quantum computing is not parallel. It cannot solve NP complete problems (precisely, there is no evidence they are any better than classical computers).

It does not 'try all combinations at once'.

Quantum computers are not general purpose computing machines, only specific algorithms that take advantage of a specific property of quantum physics work. The specifics are too sophisticated to anyone without a physics education to understand.

DWave computers are not quantum computers, as the terminology is used; they use a quantum effect to do something, but it is a different thing from quantum computers that do factoring.

Peter Shor's algorithm for factoring is insanely complicated. To even understand what it is doing at the classical level requires study in crypto. It's answer is achieved statistically by many trials, it does not produce a single concrete answer. It is non-deterministic, and requires extremely sophisticated error correction to produce a signal.

Shor's algorithm depends on a sophisticated classical algorithm for factoring large numbers; what quantum brings to the table is the ability to calculate the period of an extremely long sequence of numbers quickly (this is a quantum Fourier transform). How it does this is very sophisticated, no simple explanation will suffice. It exploits the fact that probability wave amplitudes obtain (collapse) relative to the square of the amplitudes.

131

u/miczajkj Jan 03 '14 edited Jan 03 '14

There are a few differences in the use of Qbits (quantum bits) compared with classical bits:

  • the room you work in does not have to be 2 dimensional (you are not restricted to 0 and 1). This is not that big of an advantage and indeed you could also do a similar thing in classical computing. I just wanted to point that out. (For simplicity we still often look for 2 dimensional quantum systems.)
  • Quantum systems can be in superposition states. While classical bits are either 0 or 1 quantum mechanics works entirely different: every system exhibits vector structures. That means, that you have two basis vectors |0> and |1> (we may also call them (1, 0) and (0, 1) or up and down or however you like; don't be afraid by the notation: those brackets are just a neat way of talking about quantum states) but every combination of those vectors is also a possible state (because a constant doesn't change the physical state we choose to normalize them to an absolute value of one, so we can classify all possible states of one Qbit as (a, b) (or equivalent a|0>+b|1>) with the restraint |a|²+|b|² = 1.)
    We can interprete that as a state, that has the probability of |a|² to be measured as |0> and the probability of |b|² to be measured as |1>.
  • two Qbits can be entangled. That means, that you can't demount the two-Qbit-system in two non-interacting one-Qbit-systems.

A little more math to the last point: The two Qbit system can be described by four basis-vectors:
|00> (both Qbits in the state |0>)
|11> (both Qbits in the state |1>)
|01>, |10> (one of the Qbits in |1>, the other in |0>) so every possible state can be expressed by
|psi> = a|00> + b|01> + c|10> + d|11>
with |a|²+|b|²+|c|²+|d|² = 1. We stated before, that every one-Qbit-state can be written as a|0>+b|1> does that mean, that every two-Qbit-state can be demounted to the following product
|psi> = (a|0>+b|1>)(c|0>+d|1>)?
(here the a,b,c,d are not the same as before, evidently.)

The answer is: no, this is not possible for every state. Take for example the (normalized) state
|psi> = 1/sqrt(2) (|01>+|10>)
It can not be written as a product state - we therefore call it entangled. In fact, you can easily see, that the outcome of the two Qbits is anti-correlated: if you measure one to be 1, then the other one must be 0.

Now the time-development of those states can be controlled by so called quantum gates and you can do that very properly. Therefore you can indeed calculate many things at once (by using the superposition principle) and you can kind of communicate over arbitrary distances (via entanglement, while you have to be very careful here: it is no real kind of communication, as an instant information-transfer would violate special relativity. But there is indeed the possibility of quantum teleportation where you can instantly transport a physical state over an arbitrary distance and dense coding where you send two bits of information with transferring only one Qbit, thanks to entanglement.)

To explain those features in a deeper sense I have to leave the layman's terms completely behind me (more than I already did.)

36

u/twofingerguess Jan 03 '14

This is a very dense explanation, and one that isn't easily understood by non-specialist. You used a lot of definitions/words without giving appropriate examples or intuition behind the derivations. Your explanation leaves me with a lot of questions and mind wandering on what you actually meant. To you, it may make perfect sense because you read/copied excerpts from lectures/textbooks but to outsiders like me it comes off as a poorly written explanation. I'd recommend the following: intuition -> terminology/definitions -> examples. I would provide specific examples but I'm currently on mobile. Before you or anyone else dismisses this critique as someone simply being unintelligent that is false. I come from a mathematics background and know when I come across something concise and clear. This is not one of them.

16

u/miczajkj Jan 03 '14

I'm really thankful for every criticism and pretty sad that so many others delete their comments after making valid points.
Indeed, like I mentioned above, there are some things I don't feel necessary to explain but keep in mind, that I didn't want to come up with a complete explanation of the whole matter as that doesn't seem possible to me.

If I got your mind wandering this is great - but not, that you worry about what i meant. I don't even want to give you the feeling of a complete explanation as that would destroy the fascination even if the explanation was indeed incomplete or even wrong. My aim is to answer the question while inspiring other questions at the same time to let you read up stuff on your own.

In this precise case I just pointed out the main advantages of a quantum computer. I don't see how giving one example in simplified words explains better what a quantum computer does. Remember that the question was not "What can a quantum computer do?" but "What makes a quantum computer capable of beeing better than a classical computer?"

Nevertheless I thank you for your comment and really look forward to your examples.

15

u/ishouldbeworking3232 Jan 03 '14

He's not asking for a complete explanation, just a clear and concise version of what you were trying to communicate. Examples of difficult for non-specialists:

|0> and |1> (we may also call them (1, 0) and (0, 1) or up and down or however you like; don't be afraid by the notation: those brackets are just a neat way of talking about quantum states)

|0> is not frequently seen, is that the Absolute Value to 0 and Absolute Value to 1? I'm not afraid of the notation, I just have no idea what it represents. If it is just the notation, then you should say clearly that this is the chosen notation, not a "neat way of talking about states" since that implies we're just too dumb to understand it.

all possible states of one Qbit as (a, b) (or equivalent a|0>+b|1>) with the restraint |a|²+|b|² = 1.) We can interprete that as a state, that has the probability of |a|² to be measured as |0> and the probability of |b|² to be measured as |1>.

Again, a|0>+b|1> may make complete sense to you, but it's a very foreign language to those outside your world of mathematics.

two Qbits can be entangled. That means, that you can't demount the two-Qbit-system in two non-interacting one-Qbit-systems.

Demounting? two-Qbit-systems? two non-interacting one-Qbit-systems? Every bit of that sentence is jargon, and this is where definitions followed by examples help to make sense.

In this precise case I just pointed out the main advantages of a quantum computer.

A similar case would be an Amish person asking why a car is better than a horse carriage, and my response being that food isn't necessary for it, it has 6 gears of different sizes, and a steering wheel. It may be true, but I have no insight in to how that makes the car better?

4

u/shitShape Jan 04 '14 edited Jan 05 '14

|0> and |1> are just the names of two things. They are not mathematical expressions involving operations. He could easily have said "Bob" and "Amy" instead. You don't have to do anything to them other than notice that they are different.

So in classical physics, you might consider a room where you expect to find Bob or Amy, but not both of them. If someone asked you who was in the room you would say "either Bob OR Amy" and when you check, sure enough it will either be Bob or Amy.

In quantum physics the answer you give when asked who is in the room is "Amy with probability a AND Bob with probability b" (a and b are just numbers). The way to write that concisely is "a Amy + b Bob" (a times Amy plus b times Bob). Compare to a |1> + b |0>. (Actually a2 and b2 are the probability, but I'm keeping it simple.)

Quantum physics does not allow you to make the common sense assumption that it is really one or the other in the room. Instead it says that there is one person in the room, but it is not one or the other, rather they are both in the room with some probability that it is one and some probability that it is the other (note here that the probabilities associated with each must add up to 1 since otherwise the total probability that there is someone in the room might be higher than 1 which is not allowed by the common sense definition of probability).

Now when you open the door it will be either Amy or Bob in the room, so it might seem like quantum physics is just some mumbo jumbo that happens behind closed doors, but disappears when you open the door (it turns out to be Bob OR Amy when you open the door, not some mix of part Bob and part Amy).

But there are calculations and phenomena that are correctly described by quantum physics and not by classical physics (the existence of atoms, the structure of periodic table, lasers, nuclear fusion in the sun, light spectra from excited atoms, photoelectric effect, certain behavior with polarized filters, transistors, etc). So it seems quantum physics is more correct than classical physics. But does that mean we have to accept this odd description of what is going on in the room before we open the door? Some people have had trouble with this because it makes no sense. Why can't it just be either Bob or Amy in the room and we just don't know which one, and quantum physics is just too limited to be able to tell us which it is? Maybe there is some hidden information not in the quantum equations that says whether it is Bob or Amy but we just can't see it?

Well it turns out that if that were true, then some repeated experiments relying on the hidden information would have a distribution of results that is different than if quantum physics were true. Just such an experiment was proposed by John Bell, carried out by Aspect and others, and refined since then, and the results always come up in favor of quantum physics.

This does not necessarily prove quantum physics is right, but it does prove classical physics (and any other theories that involve some hidden information about who is actually behind the door before we open it) wrong. And it is unlikely that a successor to quantum physics will be any less strange. Quantum physics is here to stay, and behind the door is really a mix of bob and Amy.

Quantum computers take advantage of the ability of things to be in mixes of states. The concepts are the same, but instead of bob and Amy in a room, we have particles in a computer component with mixes of states named |1> and |0>.

For a really good explanation of Bell's Theorem, check out this ELI5 post: http://www.reddit.com/r/explainlikeimfive/comments/ywzgk/eli5_bells_theorem/c5zm6cb

→ More replies (1)

3

u/jack3dasphuck Jan 03 '14

I would mention that the "quantum teleportation" still requires a classical step in the system; the system that collapses the entangled Bell states has to send a classical message to the other side so that the other side can apply to appropriate gate to the entangled qubits.

10

u/[deleted] Jan 03 '14

the room you work in does not have to be 2 dimensional

It's a somewhat inappropriate way to phrase it. Instead it's the contrary : instead of working in the ring of cardinal 2 {0,1}, you work (depending on how you see it) in the unit sphere of C2 or that of R3 which are sets of dimension 2.

3

u/miczajkj Jan 03 '14

While you are right regarding the formalities this is not what I meant! The first point does not adress the fact that you can use superpositions of basis states as new states on their own.
I wanted to point out that you can (theoretically) easily use higher dimensional quantum systems (for example a Spin-1 particle with the basis states |-1>, |0> and |+1>) and therefore work in C³, C4, and so on.

5

u/dave1022 Jan 03 '14

So I'm an undergrad physics student, and understand everything you've said.

What I don't get though is how all the weirdness of quantum mechanics can be used to do a useful calculation faster than normal.

13

u/FlyingSagittarius Jan 03 '14

Quantum computers can do things concurrently that classical computers have to do sequentially.

Say you have 8 marbles in a bag. One is red, the rest are white. The marbles are identical in every other way. You want to find the red marble. A classical computer would solve this problem by picking a marble out of the bag and checking if it's red or not. This would require, on average, 4 or 5 tries. Quantum computing allows you to solve the problem by spilling the marbles onto a table and checking the color of every marble at the same time. Then you can pick the marble on the first try.

5

u/TheSOB88 Jan 03 '14

Not really, though. Others have mentioned that it doesn't -actually- check them all at the same time. If it did, the time would be constant, and everyone who seems knowledgeable is saying that sort of task can be done in O( sqrt( n ) ) time whereas a classical computer would take O( n ) time.

6

u/FlyingSagittarius Jan 03 '14

Well, I could say that a quantum computer does calculations by making all possible solutions interfere with each other so that the probability of determining the correct solution is much greater than the probability of determining an incorrect solution, but that still doesn't answer how a quantum computer is faster.

0

u/[deleted] Jan 03 '14

[deleted] — view deleted comment

28

u/Sambri Jan 03 '14

There isn't much math behind what he just did, what is more complicated is the physical interpretation of the objects he used (such as |01>).

3

u/teawreckshero Jan 03 '14

There was a coursera course on quantum computing. I'm sure they still have it somewhere. It will still require knowledge of quantum notation, but they gloss over it in the first few lectures.

1

u/misunderstandgap Jan 04 '14

Depending on what you want to learn about, you might need anything from high school algebra to much, much more difficult math. It's not as though the class where they teach you about finding x given x+2=3 teaches basis vectors, and the class that teaches you basis vectors won't teach you about Hilbert spaces--even though all three classes are called Algebra, and all three examples get used in physics.

18

u/engineering_guy Jan 03 '14 edited Jan 03 '14

This isn't my area of expertise, but here is how my profs at uni explained it to me. I will probably need to edit this as people comment because I don't have my books and I am too lazy to properly research this today. This isn't a full explanation but it is about the building blocks of quantum computing as I understand it.

Standard computers use transistors at their basic make-up level. These transistors are capable of two states: on and off (this is of what binary systems are comprised). This means that a processor with x transistors is capable of 2x level of precision.

According to Moore's Law it is predicted that the number of transistors fitted onto a board will double every 18 months, in line with our technological advances. According to the geometry, this means that transistors will be on the atomic scale by around 2030 (of course we are already sort-of there now). So instead of using transistors, we will use atoms to perform processing tasks - enter quantum computing.

The next thing to understand is that quantum computers aren't limited to two states (i.e. they aren't limited to binary). They can exist in something called superposition. Let's call each bit a "qubit" (quantum bit). Superposition means that these qubits are capable of not just an on/off state, but can be in many different states. This means they can take on y states compared to 2 states (binary). Play around with 2x vs. yx and see how just increasing 2 by a few levels really makes a massive impact on output.

Next up is entanglement. This is something I don't understand the the how of at all, only the what. There is some fancy process one can do to two atoms which after some kind of dark magic results in the two atoms becoming entangled. This means that you can separate them by some distance (I think my prof, several years ago, said the record was 17 km) and if you affect change on one atom then the other will mimic it in real time. Again, this seems like hocus-pocus to me but a) I believe it, b) gives me a geek-boner and c) means that communication speed is literally instantaneous. It will one day make Google fiber seem like shitty dial-up, and communication between chips won't need to be hard-wired at all (i.e. no comm busses of any kind which in my field is the bottle neck).

At the time I learned this we (humans) couldn't really create a good quantum computer (I think 16 qubits was the record, compared to a billion transistors which still outstrips 16 qubits) but obviously the tech is young. There was a company in Vancouver that claimed they had something but I think it turned out to be a fraud. I can't remember. I'd imagine we should see at least a basic quantum computer come out in our lifetimes and hopefully much more.

Anyway, that doesn't really explain a lot but it's a bit (ha!, get it?).

4

u/MightyTVIO Jan 03 '14

Nice explanation! Though I believe there was a proof that quantum entanglement wasn't actually instantaneous, only appeared to be (thus upholding nothing faster than the speed of light). Think it was to do with curvature of space-time or wormholes or something similar so the distance between them was very tiny, only perceived by us to be whatever size.

15

u/[deleted] Jan 03 '14

Take a red marble and a green marble and put them into a bag. Now you have 2 entangled marbles. Blindly pick 1 marble out of the bag and put it onto a rocket ship. Send it out 1000 light years from Earth. Put the other marble into a time capsule without looking at which color it is. In 10,000 years people will open the time capsule an see the green marble. That means the red marble is 1000 light years away. Does it take them 1000 years after seeing the green marble to know that the marble on the rocket is red? How did that information arrive at them faster than the speed of light?!

That is a very oversimplified example. But entanglement is not bounded by the speed of light because you are not transmitting information or mass over a distance.

4

u/evrae Jan 03 '14

I was under the impression that hidden variables had been shown not to be the case? I could be wrong though - I went into astrophysics to avoid as much quantum stuff as possible.

6

u/shavera Strong Force | Quark-Gluon Plasma | Particle Jets Jan 03 '14

it's hidden variables or locality. Pick one. Some people would rather give up locality and favor hidden variables.

4

u/drippinganalwart Jan 03 '14

I'm sorry, but this is a terrible and misleading analogy. The spookiness of quantum entanglement stems from the fact that neither particle has a discrete value for the property you're measuring until you measure it. In your analogy, neither marble has the property of being red or green until you measure one of them. Both are in a half-red, half-green state until you disturb one of them and force the wave function to collapse into either red or green. At the instant you do that, the entangled particle in the bag immediately "knows" which state the other particle's wave function collapsed into.

7

u/[deleted] Jan 03 '14

My analogy works for what it is- a very simplified description of entanglement that shows that you do not move information or mass faster than the speed of light. It is an ELI 5 kind of analogy. Using wave functions, superposition, etc... to describe these ideas to a layman does not help.

→ More replies (11)
→ More replies (6)

1

u/Broan13 Jan 03 '14

Sort of. You can't send information using entangled bits faster than the speed of light.

1

u/lurco_purgo Jan 04 '14

How would you go about it? What even is a entangled bit? EDIT: Sorry, I read "You CAN send information..."

44

u/ex-mo-fo-sho Jan 03 '14

This is best explanation I've heard: (explained to me like a 5-year-old). Take this with a grain of salt, as I am likely to get some of the details technically wrong.

Basic Quantum Idea

Imagine you have a particle gun. You shoot it at a sensor that detects when it is hit with the particle. Call this sensor A. You fire the gun, A lights up, as expected.

Now, you introduce a second sensor, B. This is positioned in such a way that if you put a mirror in the path of the gun and sensor A at a 45 degree angle, the particle will bounce off the mirror, and hit sensor B.

You add the mirror, and sure enough, every time you fire the gun, sensor B lights up.

Now, replace the mirror with a mirror that has a bunch of holes poked in it. Such that there is now a 50/50 change that when the gun fires, the particle will either pass through one of the holes, and hit A, or reflect off the mirror and hit B. You fire up the gun a bunch, and sure enough, you get a 50/50 pattern of A's and B's: ABBABABBABABBBAABABBAA

Now, behind the mirror, and in front of A, you place a wall that would block any particle. So, when a particle passes through a hole in the mirror, it would then hit the wall, and never reach A. You would expect to see a 50/50 pattern like this: B--B-B--B-B-B--BB-B, because the wall is blocking anything from ever getting to A. But with quantum physics, this isn't the case. It is almost as if the particle is intelligent.

"Since I can never reach A, I'll go to B every time." says the particle. So, the pattern that emerges is: BBBBBBBBBB.

This can be rephrased as such: Since B is the only possible outcome in our reality, the quantum particle will manifest that way, every time. Now, let's apply this idea to quantum computing:

Let's build a quantum computer

You setup your quantum processor with qubits and the like. You want to crack an asymmetrical cipher. So, you setup parameters such that you have the cyphertext, and you know that the plaintext is probably a message readable by a human. You enter these parameters into your quantum compy, and boom! In a single clock cycle, you have the key. How? Because the qubits will only manifest themselves in a way that is possible in our reality, which in this case is the correct key to unencrypt the message.

Is all crypto broken?

Not at all. Encryption based on public/private keys, shared secrets, etc., is all easily broken with quantum computing. However, non-deterministic algorithms (such as using a true one-time random pad of numbers) is not broken. This goes back to the quantum idea: If it is impossible to determine a single possibility (non deterministic), then anything could be the outcome. While, conversely, if only a single outcome is possible (there is only one passcode that will successfully unencrypt the data), then quantum computing will manifest that single possibility.

I have a bit of a head cold, and hope this makes sense. If I've broken the rules of the forum, feel free to delete this post.

15

u/cheesecrazy Jan 03 '14

Now, behind the mirror, and in front of A, you place a wall that would block any particle. So, when a particle passes through a hole in the mirror, it would then hit the wall, and never reach A. You would expect to see a 50/50 pattern like this: B--B-B--B-B-B--BB-B, because the wall is blocking anything from ever getting to A. But with quantum physics, this isn't the case. It is almost as if the particle is intelligent.

"Since I can never reach A, I'll go to B every time." says the particle. So, the pattern that emerges is: BBBBBBBBBB.

This is absolutely an incorrect description of quantum mechanics. The particle doesn't know the difference between a wall and a detector; it doesn't decide to avoid the wall and hit the detector just because that's where we are testing for the particle's position. You are badly summarizing some experiment.

25

u/PastaNinja Jan 03 '14

It is almost as if the particle is intelligent.

This is where your explanation goes into the "It drives because it is able to go forward" region that the OP was talking about.

That's the biggest hurdle, and least explained concept. From there on, it's basically just extrapolating to "quantum computing is able to solve any solvable problem because we exist in a reality where the solution exists and thus somehow the quantum computer already knows it." Which makes no sense at all.

15

u/JordanLeDoux Jan 03 '14

I am in NO WAY an expert at this field (quantum computing) or its related fields (quantum mechanics, electrical engineering, etc.) However, I have had this question explained to me several times, and I finally feel like I have a handle on how this part works:

Quantum computers have bits that can exist in several states at once, meaning that several discrete answers can be present in the qubits.

The computers themselves do not actually know the answer, and the quantum system does not either. Instead, what we do is take advantage of the fact that in a quantum system the lowest local energy state is the most likely to be observed (this is probably worded poorly, but please correct me, as I said I am not any sort of expert at quantum mechanics).

The "magic" of quantum computers is that we can design ways of "reading" that data that will make the correct answer to our question the "lower energy state", and thus the much more likely place for the qubits to "collapse" to. We do not need to know the answer to our question to design the method of "reading" that will cause this to happen, but at the same time it isn't easy, and generally every "type" of answer needs it's own specifically designed quantum "circuit", where engineers spent a long time figuring out how to make that type of answer the "lowest energy state".

But... after that has been accomplished, you can take some problems that are insanely hard for normal computers and do them in a single "read" operation.

You can kind of, almost, sort of think of it like this:

If you have a bucket of different shapes, and you know your answer is written on all the cube shaped things, then normal computers are like going through the bucket and looking at the shapes one at a time to separate and read the cubes. Quantum computers are like pouring the bucket over a screen that lets everything except the cubes through.

Vertasium did a fantastic video on this subject as well: http://www.youtube.com/watch?v=g_IaVepNDT4

4

u/ZippityD Jan 03 '14

So... how exactly does the design of a quantum computer allow it to collapse towards the 'correct' answer as the lowest energy state? Do we have an example of this working successfully? I'm talking about the part where you said 'engineers spent a long time designing'.

Or is that the question?

5

u/JordanLeDoux Jan 03 '14

That is indeed the question, and the reason we don't have hundreds of quantum computers lying around. We are certain it is possible for some types of problems, and we can build systems that do this in pieces (lab experiments where we break down the steps of such engineering problems), but we haven't really figured out a way to do this yet in a reliable, manufacturable process yet as far as I know.

As to how to actually engineer such a system... my knowledge is too limited to even speculate on the exact process of creating such quantum algorithms.

→ More replies (1)

5

u/LuxSolisPax Jan 03 '14

That's because we don't yet have an answer for why. Before we knew about the nature of the relationship between the Earth and the sun, the sun was "above us because it was above us".

8

u/The_Serious_Account Jan 03 '14

I can kind of guess the experiment you're trying to describe, but you're describing it incorrectly.

You would expect to see a 50/50 pattern like this: B--B-B--B-B-B--BB-B, because the wall is blocking anything from ever getting to A. But with quantum physics, this isn't the case.

Yes, it is. A particle can't tell if you're naming something a wall or if you're naming it a detector. Maybe you mean the wall is an analogy for something else, but if it's an actual wall, then you'd see B--B-B--B-B-B--BB-B.

So, you setup parameters such that you have the cyphertext, and you know that the plaintext is probably a message readable by a human.

No, you don't need to know the plaintext for a quantum computer to break (eg.) RSA. You just need the public key.

In a single clock cycle, you have the key.

No, the computational complexity of breaking an n-bit RSA key is O(n3 ), not a single clock cycle.

Encryption based on public/private keys, shared secrets, etc., is all easily broken with quantum computing.

No. Lattice based cryptography is thought to be still secure. There's a whole area called post quantum cryptography Also, secret sharing is in general not broken.

I don't know where you heard this explanation, but it's almost impressively wrong and I hope you tell them.

4

u/[deleted] Jan 03 '14

So if you had a public/private key system where two passwords would work would it not work? Or would it give you a kind of ABBAABBABABAB scenario so you would be able to narrow it down to two?

3

u/arhombus Jan 03 '14

Or would it be an even 50-50 split between the two answers?

2

u/bradn Jan 03 '14

Not all crypto based on shared secrets or public/private keys is broken. I believe all are weakened (equivalent to the key size being cut in half), and some are broken completely, like RSA public key encryption.

2

u/DemandsBattletoads Jan 03 '14

I don't believe public key infrastructure based on elliptic curves would be broken. RSA would be though.

1

u/srthrthrth Jan 03 '14

Encryption based on public/private keys, shared secrets, etc., is all easily broken

NTRU is not known to be any easier for quantum computers than classical ones.

1

u/UncleMeat Security | Programming languages Jan 03 '14

Encryption based on public/private keys, shared secrets, etc., is all easily broken with quantum computing.

This isn't true. There is quite a bit of existing academic research on quantum-resistant encryption. It is often called "post-quantum encryption" and there is even an entire conference dedicated to it. Crypto doesn't end if we make a large scale quantum machine, we just need to adjust.

4

u/braunbear Jan 03 '14

In short, quantum computing is about the exploitation of the laws of quantum mechanics.

The three main tenants of quantum computing are intrinsic randomness, superposition, and entanglement. I would encourage you to watch this Quantum Frontiers animation to gain an intuition about what these terms mean. I took a quantum computing course this past semester and that was the first thing our instructor showed us.

Now that you hopefully have an intuition about the principles of quantum computing, to understand how they can actually be used, I would refer you to Deutsch's algorithm. Deutsch's algorithm is the most basic quantum computing algorithm which illustrates how the principles of quantum mechanics can afford you greater computing power than the laws of classical mechanics.

The statement of the problem is this: consider a function f : {0,1} --> {0,1} (meaning f maps a 1 dimensional qbit input, 0 or 1, to another 1 dimensional qbit output). Say you want to know if the function is "constant" (defined as when f(0) = f(1)) or "balanced" (defined as when f(0) does not equal f(1)). In order to answer this you would need to consider the four possible combinations of f(x) for x = 0 and x = 1:

  • f(0) = 0, f(1) = 0
  • f(0) = 0, f(1) = 1
  • f(0) = 1, f(1) = 0
  • f(0) = 1, f(1) = 1

Now, classically, you would need to look at the output states of f for both values of x. That is, you would need to know both f(0) and f(1), which would require making two measurements on the system. But, remarkably, by exploiting the laws of quantum mechanics, it is possible to make one measurement on the system and ascertain the same information -- whether f is constant or balanced. To see how the algorithm works, I would refer you to this YouTube video which explains it in careful detail.

A caveat: Deutsch's algorithm serves more as an illustration of the power of quantum mechanics over classical mechanics in computing; it has little practical applicability. For an example of something with more applicability in the real world, you might consider Shor's algorithm which has applications in breaking RSA encryption...but be warned, the math is more involved.

TL;DR the principles of quantum computing are intrinsic randomness, superposition, and entanglement. Watch this animation to gain an understanding of what those mean. The most straightforward example of how these principles can be exploited in a quantum algorithm is Deutsch's algorithm, about which you can learn by watching this video. Read up on Shor's algorithm for a more real-world example.

4

u/Biggseb Jan 03 '14

Here is a great video with the whole concept, breaking it down into simple terms and visuals, down to a bitwise versus qubit-wise level and explained by Andrea Morello (associate professor specializing in quantum computing and electrical engineering at New South Wales University). Highly recommended:

http://www.youtube.com/watch?feature=player_embedded&v=g_IaVepNDT4

7

u/Sam_MMA Jan 03 '14

This may be a bit off topic, but OP's post got me thinking. Could you use a quantum computer to mine for Bitcoins? I don't even know how to mine for Bitcoins, but it the thought popped into my head. Is it possible, and would it be any faster?

4

u/question99 Jan 03 '14

Bitcoin mining involves looking for a specific set of SHA hashes. Quantum computing offers some speedup in this regard but does not break it.

Transactions signed with digital signatures will be broken however: http://bitcoin.stackexchange.com/questions/6062/what-effects-would-a-scalable-quantum-computer-have-on-bitcoin

There are already some digital signature schemes thought to be secure in the post-quantum era: Lamport signature is one such example.

1

u/keteb Jan 03 '14

This is a distinct possibility. The question would become how fast was it and how many people have access. If they were fast enough to beat the entire network, it'd become 51% and allow the miner to manipulate the block chain.

However if it either (A) wasn't quite fast enough to beat all the active miners combined, or (B) there were multiple quantum computers mining, then it would be similar to when ASCI miners came out. It would exponentially spike the difficulty rendering standard mining methods useless

2

u/Sam_MMA Jan 03 '14

Okay, I have 1 question. Are quantum computers theoretical, or are they just really expensive?

1

u/keteb Jan 03 '14

"Quantum" computer is a generalized term. There have been some breakthroughs in quantum computing however these are more along the lines of "computers that use qubits (quantum bits)" rather than computers that can execute quantum algorithms which is another level of complexity entirely.

As far as publicly available information goes, computers which can execute quantum algorithms are still a ways off.

→ More replies (5)

3

u/[deleted] Jan 03 '14

Not sure if this has been posted yet, but D-wave has it's own subreddit. The co-founders and scientists frequent it pretty often as well. http://www.reddit.com/r/dwave/

3

u/StoneCypher Jan 03 '14

Quantum computing is a family of things, not a thing itself. Many of the answers here are confused on that point, blend characteristics of the various approaches, etc.

Generally speaking, a quantum computer is a computer which uses quantum physics to do more than one batch of work at once. The most common mechanisms are to leverage superposition or entanglement.

Consider the case of trying inputs to a function, looking for the one input that creates the highest output.

In a classical computer, first you try input 0. Then you try input 1. Then you try input 2. Et cetera.

One example of this might be choosing the positions of walls in a combustion engine, such that the output represents the amount of torque the engine can produce. Another example might be passwords. Another is the Travelling Salesman Problem.

The difficulty of Travelling Salesman is based on how quickly the number of possibilities to check explodes. With two cities there are two paths, AB and BA. With three there are six: ABC, ACB, BAC, BCA, CAB, and CBA. At four citites there are 24 paths; at 5, 120; at 6, 720.

By just fifteen cities you're at 1,307,674,368,000 - one point three trillion paths - which with an efficient program and a decent computer will take several hours to manually brute force. One more city and it's a week. One more city and it's a month.

But if you were able to do them all, at once, then it would only take as long as it takes to evaluate a single route.

That's what quantum computing does - it uses the bizarre ass-end of physics to do all the solutions at the same time, such that the right one (if there are multiple, usually just one of them) floats to the surface.

It's not that the QC skips the rest of the work; it's that the physics it uses to do the work evaluates them all at the same time.

Now consider what that means for passwords. A 24 qubit computer can test all 1, 2, and 3 character passwords at the same time.

There are problems.

For one, it's statistical, because quantum mechanics is statistical. If you're picking a needle out of a haystack, you're likely to flat out miss it.

For two, it really only makes sense against a mass run of a single topic.

For three, it's currently sufficiently slow that normal computers tend to run circles around it despite the parallelism thing. As qubit count grows, that may change. However classical computers won't miss needles in haystacks.

Generally speaking, quantum computing is probably actually not going to be a big deal in the long run except for very specialized topics.

3

u/causal_diamond Jan 03 '14

Thought I'd try to come up with an analogy for Grover's search algorithm, as this is the place most go to to spell out a quantum algorithm that contains all the features that distinguish quantum from classical computation.

You're a mobster, and you had some dealings with a notorious crime family – the Derpranos. In fact, things have gotten pretty bad – you owe all ten Derprano brothers in the family $1000. You desperately need to pay them back: they don't care how much they are owed, but you know that your life is in more and more danger the longer you owe them for. You know three things about these dim-witted brothers, however. First: they aren't smart. They're never going to check whether the money you give them is counterfeit or not. Second: they help each other out. Provided they have money themselves, they all contribute when one of the brothers is in debt. Third, provided you can fiddle the finances to only owe one brother, the others are likely to forget about you and you could probably bump off the one you owe quietly, without any major repercussions. Unfortunately, due to your limited abilities, there are only two strategies for printing the money:

(a) You print $1000 at a time, and give them to each brother in turn (i.e. give $1000 to brother A, print more money, give $1000 to brother B, print more money...). You do this until there is only one brother left, then you roll him up in a carpet and throw him off a bridge.

(b) Print $2000, and give this to a single brother (brother “X”, say). X is then indebted to you, and goes to his brothers for support. They oblige by declaring that some of the money that you owe each of them, you now owe X instead. Whilst being equally generous, they don't communicate and X ends up being owed more in total than any of the other brothers. Let's say that at this point, each brother gives $250 of the money he is owed to X. Now, each brother is owed $750 but X is owed -$2000 + $3250 = $1250. You then repeat this process, instead printing $2500 and giving it to brother X. His brothers then intervene by donating money, reducing the amount you owe them and increasing the amount you owe X. After a certain number of runs of the counterfeiting operation, you owe X an absolutely huge sum of money. But you owe all his brothers a vanishingly small amount: hoping they forget about the minuscule debt, you roll X up in a carpet and throw him off a bridge.

In this analogy, the first strategy is equivalent to a search algorithm performed on a classical computer: just like the step-by-step pay off, the classical algorithm is a step-by-step check of each member in the list until the target is found. The number of steps in the computation is the number of times you have to go back to the counterfeiting machine. The second strategy is the analogy to Grover's algorithm on a quantum computer: in the end, you have to return to the counterfeiting machine less (far less with an increasingly large Derprano family) by using this strategy. However, it requires different hardware: you need to be able to print arbitrary sums of money, and you need to rely on the brothers' mutual generosity (which are things that you can't use in the first scenario). I hope this made some sense!

48

u/shavera Strong Force | Quark-Gluon Plasma | Particle Jets Jan 03 '14

The kind of over-simplified answer is that it all comes down to "superposition of states." See, quantum particles act as if they aren't "truly" in one state or another, until some "measurement" happens that asks what state they're in and forces them into a state. Classical computers have bits of 1 or 0 exclusive. But a "qubit" can go through the "logic" or "circuit" of a quantum computer as a superposition of 1 and 0. So as the logic acts, it's acting on both 1 and 0 states simultaneously. Meaning while a computer may have to run the logic on the 1 case and then rerun the logic on the 0 case, a quantum computer computes them both simultaneously. Then, if you design your logic appropriately, you can have only "the correct" answer pop out.

So the thing that quantum computing has over classical is anything that's a massively parallel "search" in a way. Finding factors of numbers? Well just run every number through the logic at once, and see what pops out. Instead of a classical computer that has to compute each number one at a time.

237

u/[deleted] Jan 03 '14 edited Jan 03 '14

I really wish people wouldn't give this explanation, even when acknowledging it's a simplification. OP, I'm going to strongly recommend you read this, an excellent overview of how quantum computers work and what they can (and, perhaps, more importantly) can't do from one of the leaders in the field. /u/shavera's answer is an example of a very popular, but wrong, explanation of quantum computers that is widely repeated in popular science accounts—unfortunately, often by people who really ought to know better.

The quantum parallelism explanation is pretty much bunk. The fact that you can compute on all possible inputs in superposition means very little when, all things being equal, you will just randomly get one of all possible outputs when you measure. You've basically compressed all the genuinely important features of quantum circuits into the phrase "if you design your logic appropriately". This is why people have the mistaken impression that for an arbitrary problem a quantum computer can just do every calculation in parallel and it will somehow, magically spit out the right answer. The actual nuts-and-bolts of a quantum algorithm are figuring out how to use interference so that "good" answers are measured with high probability and "bad" answers are measured with low (ideally zero) probability. How well you can exploit quantum interference like this is highly-context specific, and sweeping it all under the "see what pops out" step is to seriously overstate what quantum computers can do.

So the thing that quantum computing has over classical is anything that's a massively parallel "search" in a way.

Well, no. It probably doesn't have that advantage over classical computers, and this is exactly the kind of confusion that comes from "quantum parallelism" popular explanation. It's proven that for a truly unstructured search—anything where you can't use the structure of the search space to inform your circuit design—that the optimal quantum speed up over classical is quadratic. Significant in some cases, but hardly massive. The very few known cases where quantum circuits do seem to have exponential speed up over classical computers (like factoring) are cases where the very specific structure of the problem at hand could be exploited for the quantum circuit. It's widely believed, in particular by people like Aaronson who wrote the article I linked, that this isn't going to possible in general and that the quadratic speed up from ignoring the problem's structure will often be the best case (or close to it) for these sorts of search problems.

24

u/[deleted] Jan 03 '14

Thank you for pointing that out, I'm tired of all those explanations that quantum computers do all the computations at once. They just don't, at least not in any useful way.

Another thing worth pointing out is that right now we are unable to build any useful quantum circuit, and that it is not certain we ever will be (though it does seem likely).

Besides, it has not been proved that the class of problems solvable in polynomial time with quantum computers is greater than the class of problems solvable in polynomial with probabilistic classical computers. That is to say, we do not know if quantum computing actually provide an exponential speed up over classical computing. Most researchers in quantum information theory believe this to be true (otherwise they would obviously work in some other field), but many computer scientists are quite sceptical.

To sum it up : quantum computers are not the magical almighty devices that journalists and others like to describe.

8

u/throwaway1100110 Jan 03 '14

But, let's not pretend they aren't a significant advancement.

Much like the first flying machine had nothing on transportation back then. It took a long time for it to become practical.

No they aren't magic machines that run at infinite speed, but like GPUs they have the potential to be very good at certain things.

I'd imagine that well end up using them alongside classical machines if we get the kinds worked out

3

u/The_Serious_Account Jan 03 '14

but many computer scientists are quite sceptical.

I'm surprised you say this. What have given you that impression? There are several results where quantum computers are proven to be be faster in an oracle setting. That seems like very compelling evidence to me and haven't heard many computer scientists have serious objections to the idea.

2

u/jesset77 Jan 03 '14

Besides, it has not been proved that the class of problems solvable in polynomial time with quantum computers is greater than the class of problems solvable in polynomial with probabilistic classical computers.

This has less to do with our ignorance of (hypothetical) quantum computers and more to do with our ignorance of the limits of classical computers.

The buzz is that we have QM algorithms (software) today that can solve some problems on yet-unbuilt quantum hardware faster than any software we've ever produced for already existing classical hardware. Putting matters the way I have here is very much mathematically proven.

Your statement gives the misleading impression that we don't know if our quantum algorithms are faster than our existing classical algorithms; but that impression is very false.

Instead the only unknown (besides running unto some unexpected obstacle trying to finally build QM hardware) is whether tomorrow somebody cracks a millennia-old problem to speed up the classical algorithms to keep pace with QM. Basically (to defend your correct, but easily misunderstood statement) we have not proven that classical computer software can't catch up to QM software, but we have proven that our QM algorithms today beat the pants off of any classical algorithms we have today. :3

We just can't use our QM software today until it's hardware gets built, and it is at least conceivable we won't be able to build the hardware and that such inability will teach us more about QM than we already know. ;3

6

u/zjm555 Jan 03 '14

Thank you. I'm a professional computer scientist who rolls his eyes when people talk about quantum computing in a way that implies it will solve NP hard problems in constant time. When I ask for an explanation rooted in reality, all I hear is hand-waving and it's clear that the people talking about it have no idea of the actual implementation of this magic.

4

u/[deleted] Jan 03 '14

One nice feature of quantum computing is that, short of coming to terms with the conceptual mind bender of quantum reality, you don't really need to understand much about quantum mechanics to understand how it works. Graduate level intro quantum computing courses often advertise themselves as, "No physics background need; computer science an asset." I suspect that, as a physicist who moved into quantum information, I've had to play a lot more complexity theory catch up than my computer science colleagues have played physics catch up. Anyways, all this is to say that your best bet is probably just to get a hold of a set of some lecture notes rather than hoping for a clear popular explanation. There's a nice set here from one of the founders of the field who is, himself, a computer scientist. If you've never seen quantum mechanics before, you might need to do some supplementary reading to get through the 'prerequisite' notes. After that, though, I suspect you could get through the notes titled 'Lectures 1 to 10' (which has all the general interest stuff like factoring and unstructured search) in an afternoon.

4

u/giygas73 Jan 03 '14

Thanks, your comments here totally cleared it up for me. I was really confused the previous users comments ala:

You've basically compressed all the genuinely important features of quantum circuits into the phrase "if you design your logic appropriately"

I agree with you that the advantage over the classic Von Neumann model is not always there, however in specific cases I would bet that the Quantum model will provide leaps and bounds of efficiency. I have heard that a lot of these improvements will be in the area of crypto and cryptoanalysis however who knows...

12

u/[deleted] Jan 03 '14

The funny thing is that it's almost a historical accident that quantum computers are interesting to anyone besides physicists. It just kind of happened that two mathematical problems they can solve efficiently are the two that public key cryptography is based on (factoring and discrete-log). Meanwhile, one thing we're very confident they can do much better than classical computers is simulate quantum systems, which was the entire reason they were proposed in the first place. Of course, this is hugely useful for fundamental scientific research, and those of us in the field tend to consider it their most important application—but, were it not for the unexpected cryptanalytic applications, I really doubt quantum computers would have the public profile they currently enjoy.

3

u/The_Serious_Account Jan 03 '14

And ironically, factoring and discrete-log are actually not that interesting problems. Sure we can break modern cryptography, but there are alternatives we can switch to. And then what? In what circumstances, except the artifically created ones through cryptography, do we need to find the prime factors of huge numbers?

Simulating quantum systems certainly seems the most interesting long term aspect. It's probably even a little too narrow to say it's only interesting within physics. The nobel prize in chemistry last year was given for the type of work that could benefit from a quantum computer. It seems it could reach into biology and medicine as well.

3

u/bleepbloopwubwub Jan 03 '14

The very few known cases where quantum circuits do seem to have exponential speed up over classical computers (like factoring) are cases where the very specific structure of the problem at hand could be exploited for the quantum circuit.

So quantum computing is only really useful in situations where we know the nature of a problem, but finding the answer might take a very long time with a normal computer? Are we telling the quantum computer "here's how this works, now provide us with the most likely answer?"

3

u/[deleted] Jan 03 '14

That's a pretty good summary. For instance, the quantum factoring algorithm makes use of results from number theory that inform the circuit design. If we didn't know about those results, we wouldn't be able to solve the problem. There's no 'universal quantum searching' algorithm that runs exponentially faster than a classical search.

2

u/bleepbloopwubwub Jan 03 '14

When you talk about informing the circuit design, is that a physical circuit like the components of a computer and does this mean that each quantum computer can only be built to perform a specific task?

→ More replies (1)

11

u/shavera Strong Force | Quark-Gluon Plasma | Particle Jets Jan 03 '14

Yeah but I thought the nuts and bolts of quantum logic was a lot more to get into than the superposition argument, which, to me, still remains the core of the quantum computing principle. Parallelism is just an easier thing to get into than rotations of Bloch spheres and the like.

35

u/[deleted] Jan 03 '14

Yes, I agree that just appealing to parallelism to explain the power of quantum computers is "easier". Unfortunately, it's also wrong. The nuts and bolts are interference and entanglement, which—while a bit more involved than just simple superposition—are essential to understanding what quantum computers actually do.

Personally, I don't think an accurate explanation is at all beyond the popular level (Aaronson does it nicely in under a page) and the extent of the public misunderstanding of what quantum computers can do is a direct result of the ubiquity of the answer you gave. When quantum computers enter into political dialogue, as they have these days, this is a serious problem. As a researcher in quantum information who regularly has to undo the damage this explanation has on people's understanding, I'm sincerely asking you—one scientist to another—not to use it any more.

19

u/shavera Strong Force | Quark-Gluon Plasma | Particle Jets Jan 03 '14

I fail to see how Aaronson's explanation

and a quantum computer would manipulate all those numbers in parallel, for instance, by hitting the particles with laser pulses. 3 When the particles’ states are measured at the end of the computation, however, all but one random version of the 10300 parallel states vanish. Clever manipulation of the particles could nonetheless solve certain problems very rapidly, such as factoring a large number.

Is anything but the parallelism argument I outline above.

I understand and agree it's important to place limitations on what quantum computers can do, which is why I state above:

So the thing that quantum computing has over classical is anything that's a massively parallel "search" in a way.

Which is, without the physical nitty gritty, what Aaronson says above, and what I gathered from my course in the material some time ago.

I agree quantum computers are not magic "do anything boxes." But the massively-parallel computation analogy I still stand by as being reasonably sound.

12

u/[deleted] Jan 03 '14

Because Aaronson goes on from there to explain how they do that and under what circumstances it's possible. In particular, he emphasizes the fact that superposition alone is not meaningful and talks about the use of interference.

The issue with your explanation is that it emphasizes one ingredient and completely ignores the (arguably more important) part. If you want to see rigorously that superposition, full stop, is not the 'engine' of a quantum computer, look at the one-way (measurement based) quantum computing framework. It very clearly shows what the resource 'consumed' by quantum computers is: entanglement. While entanglement requires superposition, it is much more specialized. Superposition occurs even classically in wave mechanics, while entanglement is fundamentally quantum mechanical. Hence, any explanation that solely emphasizes superposition in general—as yours does—completely misses the quantum nature of the problem. Quantum interference is fundamentally different from classical interference, and entanglement is a huge part of why.

You can argue all you want about whether you think your version is a fair simplification, but I think that we ought to be empiricists when it comes to teaching science as much as we are about pursuing it. Explaining quantum computers purely in terms of parallelism has empirically failed to adequately educate the public on how they work, as evidenced by the widespread misunderstanding about their power. Heck, one of the first questions you got—in the response to which you were kind enough to tag me—was confusion about this very point. It just isn't a pedagogically useful approach and we would all be better off if people quit doing it.

8

u/shavera Strong Force | Quark-Gluon Plasma | Particle Jets Jan 03 '14

I can definitely appreciate the argument that parallelism hasn't been sufficient to get the point across in appropriate detail. However, this gets to a point where I just don't know where to go from there though. What would you propose for a good 2 paragraph (give or take) explanation of quantum computing then? How to integrate entanglement and other aspects of quantum computing? How much additionally does the addition add to a lay person's understanding of quantum computing? Does the benefit outweigh the additional complexity of the answer? I just haven't found a good solution to that set of questions

→ More replies (6)

6

u/The_Serious_Account Jan 03 '14 edited Jan 03 '14

I get why /u/dx5rs dislikes your orignial explanation. I do often hear people, even physicists who should know better, say that a quantum computer can efficiently solve all problems in NP by trying all solutions at once. While that's not what you said, it's the kind of explanation that leads to such misunderstanding.

I don't think there's anything necessarily wrong with talking about the concept of quantum parallelism as part of the explanation. It seems impossible to give any sense of how quantum computers work without touching on it in some sense. Perhaps with more careful terminology. In any case, it should at the very least to be immediately accompanied by the caveat that any measurement will simply give you a random solution (as Scott does).

Only telling half the story here is extremely misleading.

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

2

u/linkschode Jan 03 '14

Fantastic reply, I will read the link you provided.

23

u/DarnTheseSocks Jan 03 '14

Then, if you design your logic appropriately, you can have only "the correct" answer pop out.

Could you elaborate on that? Wouldn't the result, once measured, appear to have taken one random path through the logic gates? If so, how is it any more efficient than testing random paths through the logic gates in serial?

12

u/miczajkj Jan 03 '14 edited Jan 03 '14

This is indeed right. Even if there are some ways to increase the possibility of the right outcome (one example is based on the Grover algorithm ), it is totally possible, that the system comes up with a wrong answer. But this is (depending on the problem) rather unlikely and the quantum solutions are that much faster, that you can easily let your system run three of four times to increase the answer's reliability.

22

u/shavera Strong Force | Quark-Gluon Plasma | Particle Jets Jan 03 '14

that's really where a course in quantum computing comes in hand. Sadly it's been like... 7 years since I've had one, so my memory on the subject is a bit hazy. Essentially though, the logic is "fixed" but the calculation goes over "everything" at once. To use the factoring example, in binary you'd start with 0000, 0001, 0010, 0011... each case running through logic to see if it was "right." Maybe you'd put all the wrong numbers in the wrong bin, and all the right numbers in the right bin. But in the quantum computer you're checking (|0>+|1>)(|0>+|1>)(|0>+|1>)(|0>+|1>) and only the right combination "comes out" of the logic, only one number "appears" in the right bin.

(granted it's more complicated than that, and sometimes there's only a strong probability that you have the right number rather than knowing for sure, but usually it's pretty easy to check if the answer is correct or not)

1

u/hikaruzero Jan 03 '14 edited Jan 03 '14

Wouldn't the result, once measured, appear to have taken one random path through the logic gates?

Essentially yes, the answer you get is probabilistic and randomly chosen, but the way the qubits are manipulated allows for an arbitrarily high probability of getting the correct answer. Basically, the correct answer states interfere constructively while the incorrect answer states interfere destructively. And while there's never a 0% chance of getting an incorrect answer, it can be reduced arbitrarily close to 0%.

Also, one of the ways of reducing the probability of an incorrect answer is by running a quantum computation with a low-but-not-too-low probability of an incorrect answer many times. As long as the probability for a wrong answer is less than 50%, each successive computation will make the combined probability of a wrong answer smaller and smaller. Even if it takes 1,000 runs through the computation to get to a significantly small chance of error, if you're doing a computation that would require quadrillions of classical computations, it's still an extreme increase in efficiency.

Hope that helps!

1

u/srthrthrth Jan 03 '14

this is just what probabilistic algorithms on classical computers do. where do quantum algorithms go further?

→ More replies (1)

7

u/toomuchdoing Jan 03 '14

This video is a good accompany to above comment.

1

u/fallenpenguin Jan 03 '14

That is a very good video that helped me understand quantum computers. I would have posted it, had you not been faster :D

5

u/IMainlyLurk Jan 03 '14

This article explains Shor's Algorithm without heavy math and shows how the correct answer would "pop out".

The third comment on the article is supposedly from Peter Shor, which is kinda funny.

3

u/Deep-Thought Jan 03 '14

Not only that, but the amount of information required to describe an n-qubit state grows exponentially with n (along the lines of 2n complex numbers for an n-qubit system). Just that shows us that it's pretty much impossible to simulate a quantum computer with a classical one.

3

u/shavera Strong Force | Quark-Gluon Plasma | Particle Jets Jan 03 '14

extending from here, IIRC, one of the interesting things we might do with a well-developed quantum computer is to model other quantum systems upon one. Quantum systems are, in general, fairly nasty for classical computation. It will be interesting to see if quantum computing will help us find a better way forward.

2

u/[deleted] Jan 03 '14

I never got beyond that point. My problem is this. If you put n qubits through that "logic", how are you going to guarantee the outcome? Suppose the logic demands that b0 = b2, and b1 = !b3, and b2 & b3, and b2 & !b4, or something silly like that. That puts four constraints on the qubits. How can you guarantee that these are satisfied at moment of collapse?

And, breaking prime numbers requires huge amounts of constraints on the values of the bits, so how could you guarantee that for e.g. 1k qubits, and the associated number of constratins, which is in the order of 0.5M?

3

u/shavera Strong Force | Quark-Gluon Plasma | Particle Jets Jan 03 '14

well if you go through /u/dx5rs 's comment, they discuss a bit more about what we mean by logic in the quantum computing sense. Where we want the state to prefer the right answer.

And, from my experience, which was admittedly limited and some time ago... yeah, part of the technical problems of quantum computing is that the logic/circuit design is immense and complex. Even a 2 digit decimal factorization was a rather complicated logic circuit. For RSA type numbers, the circuits (at least that I was introduced to at the time) were very complicated indeed (or at least many repeating common elements).

2

u/PigSlam Jan 03 '14

Meaning while a computer may have to run the logic on the 1 case and then rerun the logic on the 0 case, a quantum computer computes them both simultaneously. Then, if you design your logic appropriately, you can have only "the correct" answer pop out.

I guess the question should probably be "what's an example of how one would define a problem using the logic possible in a quantum computer so that the solution just "pops out" and how does that logic differ from how a binary computer would work?"

0

u/[deleted] Jan 03 '14

So basically your logic is at a crossroad with two guards, one of which tells the truth all the time, while the other one always lies?

→ More replies (5)

4

u/XylophoneLlama Jan 03 '14

Computers work by performing operations on bits, which are 0s or 1s. Quantum computers work by performing operations on qubits (quantum bits) in similar ways, except that qubits are not restricted to 0 or 1. They can be a quantum superposition of 0 and 1 (so they are some combination of being 0 and being 1 at the same time). This allows for algorithms that can perform not only multiple operations at once by acting on both states of the qubit, but also allows for operations which are impossible to perform with classical bits.

2

u/LS_D Jan 04 '14

The way I understand 'quantum superimposition' of 'qubits', is simply, the ability to have the equivalent of a digital "maybe"

Binary gives you 'yes/no' whereas Quantum Superimposed states (qubits) allow for the third option of "yes/no/maybe" which then allows for unique programming options

Although AFAIK the utilization of this capacity has yet to be 'properly' exploited, as there is insufficient hardware around at this point in time.

2

u/[deleted] Jan 05 '14

Lots of great replies, and also a lot of controversy. Judging by the replies so far it seems there is still a lot of misunderstanding and confusion among those supposedly in the know

Yes, that's true. No-one really intuitively understands much to do with quantum mechanics because it's too strange and weird when compared to regular human existance. Thus we can only understand and explain it by the use of mathematical equations, and therefore there really isn't much hope of formulating a correct layman's explanation.

3

u/jaxxil_ Jan 03 '14

Here is the best explanation I have heard that avoids all technical detail.

Suppose you are in a massive maze, and you want to find the quickest way through this maze. You could do this by simply trying every single path one by one and noting how long it is. This is what a normal computer would do. A solution analogous to what a quantum computer would do would be to fill the maze with a foot of water, then drop a rock. A wave starts rippling through the maze, effectively testing all paths through the maze in one go. When you stand at the end and see the first wave passing through the exit, all you have to do to determine what the quickest path through the maze is is to backtrack the path of that wave.

In effect, instead of looping through a process time and time again to see which is the correct answer, we can process the same question multiple time in one 'go'. This results in a computer that is very good at tasks where a normal computer would have to try many times with slightly different input parameters, like testing what the quickest path through a maze is.

0

u/myblindy Jan 03 '14

Flood fill works as an iterative algorithm too, this isn't a particularly good example. Besides sitting "at the end of the maze" kind of defeats the purpose of finding your way out in the first place doesn't it?

3

u/padelas14 Jan 03 '14

I don't know the exact physics but here is what I have understood so far:

There are those quantum systems that have the ability to be at more than one state simultaneously, each with some probability. This is called superposition. In computing terms it is like a bit being 0 and 1 at the same time. So if you have a string of n such bits that are both 0 and 1 you have simultaneously the representation of all the 2n combinations, again with some probability each, and if you can process this "string" that represents all the 2n combination you can search all the 2n space in one operation. It's like you process all the possibilities simultaneously and only the correct answers "stick" at the end . In this way you can solve some of the problems in the NP class (link).

10

u/noggin-scratcher Jan 03 '14

It's not nearly as simple as the commonly repeated "Do all the possibilities at once" idea - you need an algorithm for constructing/handling a quantum state so that the interposed states interfere constructively at the right answer and destructively at all the wrong answers.

That either means your desired answer needs to be drawing out some commonality, or that you need to find a way to iterate that reinforces your right answer and diminishes the wrong answers. Which is difficult; there aren't all that many quantum algorithms known so far (although that may also have something to do with the available time elapsed since the idea of quantum computation became A Thing).

4

u/backlyte Artificial Intelligence | Robotics | Quantum Computing Jan 03 '14

This is pretty key and should be voted up. From the wikipedia article referenced above:

There is a common misconception that quantum computers can solve NP-complete problems in polynomial time. That is not known to be true, and is generally suspected to be false.

NP-complete problems are the ones you could solve easily if you had a black box that allowed you to "try a exponential number of solutions at once and see which one works". There's no known quantum algorithm for any NP-complete problem. This includes things like the traveling salesman problem, graph coloring, the knapsack problem, subgraph isomorphism, etc. Even if we had a quantum computer these problems would still be intractable (as of our current understanding).

The problems that can be solved with a QC, discrete log/factoring for example, are ones where we can play some mathematical tricks with superposition and entanglement such that the correct answer is probabilistically reinforced due to special properties of the problem itself. In Shor's algorithm we use the periodicity of the discrete logs and the quantum Fourier transform (which can find periodicities) to extract logarithms and deduce factors.

1

u/srthrthrth Jan 03 '14

you can search all the 2n space in one operation. It's like you process all the possibilities simultaneously and only the correct answers "stick" at the end .

if that were true, then Grover's algorithm would have an infinite speed-up (2n to 1) rather than its actual square-root speed-up (n to n1/2 )

1

u/padelas14 Jan 03 '14

I see, there are iterations needed which are O(n1/2). Also as I read it is an optimal algorithm (link) so there seems to be an inherent need for computations relative to the size of the input and not O(1). But one point remains that at each iteration all the elements are processed simultaneously.

2

u/Boethias Jan 03 '14

I think Seth Lloyd gives a really good layman's explanation of quantum computing in this talk. He covers it from about 14:30 to about 16:30 . Though the whole talk is worth a listen is you have an hour to spare.

1

u/e67 Jan 03 '14

A oversimplified explanation I read in discover magazine once said this:

If you have to find a briefcase in a 10 storey building with 10 rooms per floor, there are max 100 rooms to look through to find your briefcase .. if you only have 1 person doing the searching.

If you have 2 people looking, or cuts down the work/time by half, since they search 50 rooms each.

But if you had a person in every room, you'd find it right away.

I dunno anything about quantum computing but that's the explanation that stuck with me.

1

u/[deleted] Jan 03 '14 edited Jan 03 '14

Hello, I'm studying CS in school and I think I can help.

There are these things called "qubits" which are basically bits that aren't just in one concrete state (0 or 1) but are in a superposition of them. This means that instead of saying "this qubit is zero or one," you have to say something more like, "the probability of this being 0 is x or 1 is y." So essentially, you get two little pieces of information encoded into the probabilities, instead of just one.

This effect is amplified dramatically when you have more qubits. For instance, when you have 3 qubits, those qubits are in some superposition of 8 different states. You can see now that for n qubits, you end up with 2n possible states, each with their own probabilities, in which you can encode 2n values. This is actually astonishing, since the world as we know it works in polynomial scale (x2, x3, so on), but this part of nature somehow juggles 2x possibilities for x qubits. Where are those numbers stored? How does nature keep track of 2number of particles in the universe many probabilities? We have no idea (at least I think we dont). Quantum computing is attempting to take advantage of this mysterious capability of nature to perform computations at an exponential scale which are normally not feasible with conventional computers.

I know I really only explained qubits, but the algorithms and the machinery to get a quantum computer running are necessarily extremely complicated and will take some time to understand. I think understanding the qubit, however, is the central thing that best describes the novelty and power of quantum computing.

Hope it was helpful!

1

u/Kiirojin Jan 03 '14

So for n regular bits, you can encode 2n values. For n qubits, you can encode 2n2n values? Is this expression is incorrect, could you give me the correct expression if there is one?

1

u/[deleted] Jan 03 '14

Not exactly. With n regular bits, you can express one value with a 2n range. With n qubits, you can encode 2n values (which can be a complex number and all this weird stuff).

EDIT: made a woopsie

1

u/lllillll Jan 03 '14 edited Jan 03 '14

I think it can be made more simple than everyone is stating here.

There are many problems in computing that involve looking for a single answer out of many possible answers. If we set up a quantum computer correctly, we can force it to find that answer for us using entangle particles.

This is possible because entangled particles act like they are in all states at once. It is like they are everything at once. We can place certain constraints on the particles, and they will tend to fit together in a certain way. Measuring the way the particles interfere with each other after we tweak other particles in certain ways gives us the answer we were looking for.

This allows us to solve problems that would normally involve checking many different things when looking for our answer. It is only useful for some kinds of problems, the most notable is that it would make current encryption obsolete, since it operates on the assumption that finding the correct decryption key is hard.

1

u/I_Has_Internets Jan 03 '14

Followup question that I didn't seem to find when browsing the comments. When quantum computers arrive, will this dramatically change or even create /require a new type of computer programming? Since qbits are classical bits are not the same and everything currently relies on 1s and 0s. My assumption is "Yes" but will it be a complete overhaul to most programming types or can the change happen solely on the assembly language side to keep other types working?

1

u/DanielSan_BJJ Jan 03 '14

I've read many answers which included how quantum superposition help speed up simulations on quantum computers. If possible I'd like to ask another question. I've read before that the phenomenon of quantum entanglement helps with the speeding up of data processing on quantum computers. I was never able to find a satisfatory reason as to why tho. Is quantum entanglement really important? If so, why?

1

u/[deleted] Jan 03 '14

This might be ignoring some other reasons. Here is one I find to be simple. If you have two bits with a regular computer you need two units of info. to describe the four combinations. The combinations are, 00, 01, 10, 11. You only need to know if the first and second numbers are 1 or 0 to describe these. When you have a quantum bit the conditions change. Because of superpositions these scenarios are probabilistic. For each case you need a probabilistic coefficient to describe them correctly. This results in more information for the same number of bits. The first being regular bits and the second being quantum bits. It turns out that N qubits has the same info as 2N classical bits. This allows you to do calculations quicker.

1

u/WiseAntelope Jan 03 '14

Okay, I'm going to throw a couple of things here. First, if you want to break a 2048-bit key using a quantum algorithm, you need a quantum computer that can deal with 2048 qbits at the same time, and last time I checked IBM got 15 together, the world was in awe and then we found out that their results were disputable, so we're still (publicly) pretty far away from that.

Second, cryptographers know that this might eventually become a reality and have been working on solutions to that. There are cryptographic algorithms that are hard to break even for quantum computers. Lattice-based cryptography is one of them.

1

u/AndrewJamesDrake Jan 03 '14

I got it explained to me like this awhile back:

The jump from 8Bit to 16Bit wasn't just a doubling in computer processing power. It was an exponential leap that increased the amount of information that can be worked with dramatically. Quantum Computing is a little like that, only instead of exending the number of bits you had to work with, it increases the ammount of information stored in each bit.

A current Bit has two states. On and Off, which are normally denoted as 1 and 0. A Quantum, or Q, Bit has four states it can be in: 11, 10, 00, and 01. The actual mechanics behind that are a bit above my current level, but I'm told it has to do with the likely positions the QBit might be in at any given moment.

At any rate, the 4-states of a Q Bit allow you to store a lot more information in a lot less space, and it takes far fewer processes for data to be processed. It's like going from 8 bit to 16 bit to 32 bit to 64 bit all over again. Only you don't have a simple doubling of the maximum length of a byte this time.

1

u/agamemnon42 Jan 03 '14

So there are a lot of posts on the quantum side, let me try to explain the importance of this from a computer science perspective. One of the main things computer scientists are interested in is how long it takes to solve a problem, and the main distinction is whether or not a problem can be solved in polynomial time.

Let's look at the example of sorting a list to illustrate what I mean by polynomial time. If you have a list of length n, the method of just taking each element and putting it into the right place in a new sorted list will take at most n2 steps. There are lots of more complicated sorting methods that can do it in n * log n. (note to CS people - I'm skipping O notation issues here). Anything that's able to be done in something like nsome constant is polynomial, and it's exponential if it takes (some constant)n time. Problems that take exponential time are bad because even for small n this gets too large too fast.

Now, we put problems that can be solved in polynomial time into a category we call P. There's a larger category called NP, which stands for non-deterministic (sound quantum enough? This will matter) polynomial. Problems in this category have the property that an answer can be checked in polynomial time, but you can't necessarily find the correct answer in polynomial time. The nice thing about quantum computing is, in theory, it allows you to simultaneously check all possible answers (in polynomial time). So, if we get quantum computing working well enough, this means we could use it to solve any problem in NP in polynomial time.

1

u/cromemako83 Jan 03 '14

TLDR: A quantum computer is a computation device that makes direct use of quantum-mechanical phenomena.

A quantum computer (also known as a quantum supercomputer) is a computation device that makes direct use of quantum-mechanical phenomena, such as superposition and entanglement, to perform operations on data. Quantum computers are different from digital computers based on transistors. Whereas digital computers require data to be encoded into binary digits (bits), quantum computation uses quantum properties to represent data and perform operations on these data.[1] A theoretical model is the quantum Turing machine, also known as the universal quantum computer. Quantum computers share theoretical similarities with non-deterministic and probabilistic computers. One example is the ability to be in more than one state simultaneously.

Source: wiki

1

u/splad Jan 03 '14

I think in order to fully understand how a quantum computer does its calculations you have to understand how information exchange affects the behavior of particles.

The important thing to know is that classical computers and quantum computers are both physical devices designed to perform operations on information, and both of them care very much about how information moves between particles. However at a very low level they are opposite in a way: Classical computing wants to hold information in discrete particles, and quantum computing wants to make decisions using waves. In other words the limit of classical computing is placed on how orderly and particle-like we can force our electrons to be inside very small devices, and the limit on quantum computing is on how long we can maintain a state of absolute disorder among particles, and then still measure them eventually. (Entanglement is one of the big strategies for doing that)

See, the strange thing about the universe is that a particle of any type (electron, photon, quark, neutrino etc.) seems to behave according to the rules of linear discreet logic when its properties are known(as in a specific point in space, movement in a straight line etc) and they seem to behave as waves when those properties aren't known(taking all paths, self interference etc.). I love the double slit experiment as an example of this because it shows how knowing the position of an electron causes it to behave like a cannon ball flying in a line at one of two slits, while not knowing allows it to be a wave and fly through both slits. It doesn't even matter when you measure it, if you will EVER know where it was, then it can only act like a particle, not a wave.

So the idea of quantum computing is that a wave-like particle can take every path through a (human-constructed) maze at once, so long as those humans don't know which path it took. The tricky bit of quantum computing is that we have learned that it is possible to "kinda" know something about the particle, and as it turns out that only "kinda" collapses the wave. That's why quantum computers deal in probabilistic results. You can send an electron down a million paths, and then take a weak measurement on it, and you can be 20% certain it went down one of the paths on the right side fastest. That is real information gained from a system that only functions when it isn't being measured!

If you do the same test many times you can be more and more certain which path is the shortest, but the number of times you run the test has nothing to do with the number of paths, so in that way a quantum computer could theoretically test the difference between an infinite number of things in a finite amount of time, which is impossible using classical computing. The NSA wants to use quantum computers to test every possible password combination in order to find the one which generates the correct hash(i.e. your password) and that's what those journalists were trying to explain.

1

u/[deleted] Jan 03 '14

What I understand is thus:

When observed, only one output can exist, and this result is random and depends on the probability of either output being true.

A well-designed gate can cause the probability of the correct answer to be much higher than the other answers, thus causing the right answer to appear (most of the time?)

1

u/crowzone Jan 04 '14

In my understanding it wouldn't necessarily have to be most of the time, just more often than any of the other wrong answers - For example, if the right answer happens 10% of the time, and all other answers (supposing there are infinite possible answers) the other 90% of the time, the computer would merely have to repeat the process enough times to see the pattern of one specific answer repeating 10% of the time, then test it classically to determine if it is correct.

Edit: The threshold for correctness would have to be relevant to the process being attempted, I just pulled 10% out of the air, the number would probably vary.

1

u/ChipotleMayoFusion Mechatronics Jan 03 '14

I like to think of quantum computers as analog simulations. An example would be measuring the position of a mass-spring-damper system to solve a set of differential equations. The path that the mass-spring-damper system takes is the solution to a math problem, so to solve the math problem you can set up the mass-spring-damper to produce the correct result.

If you had a computer that had to do second order dynamics problems or something mathematically similar, you could interface the computer to something that measures the results from the mass-spring-damper analog experiment.

Computers can do basic arithmetic very fast, so solving certain types of math problems is very easy for them. If a math problem becomes complex enough, it is sometimes faster to build an experiment. This is why physicists build big machines with magnets, lasers, plasmas, and whatnot. The behavior of these systems is so complex that a computer simulation would take too long.

It just so happens that the behavior of Qbits in a quantum computer matches the behavior of a certain set of math problems that are hard for normal computers to solve. We would like to build a quantum computer so that we can solve these problems faster.

1

u/unlikely_ending Jan 03 '14

great strides have been made in the development of quantum algorithms, but algorithms have to run on some sort of (fundamentally new) computing platform

but current quantum computing platforms are very primitive/embryonic and progress at present is extremely slow.

The challenges are formidable, and perhaps insurmountable.

The EdX MOOC hasba great (and free) course on Quantum Computing, presented by one of its pioneers.

1

u/thcbom Jan 04 '14 edited Jan 04 '14

Normal computers use Very thin small copper (aluminum sometimes) wires that cause the electricity to flow through differente diodes, depending on the gate it will read 1 or 0 (binary) atm we can put around a billion of these transistors on a chip (the limiting factor is heat dissipation) but with quantum computing you use the Quantum superposition of the electrons around an atom (at least the type i learned about)

So for a given amount of data or algorithims the quantum computer would be 1,000s of times smaller.

Source:

https://www.sciencenews.org/article/first-programmable-quantum-computer-created

http://computer.howstuffworks.com/quantum-computer1.htm

Edit: Berkeley gives a free course on Quantum Computation on https://courses.edx.org/courses/BerkeleyX/CS-191x/2013_August/info IDK when they're teaching it again tho

→ More replies (1)

1

u/randomginger11 Jan 04 '14

I don't know if it's quite what you're looking for, but I know veritassium did a great video on quantum computing (maybe 2). I used to be the same way, feeling like people never gave a satisfactory explanation of how it actually does computations. I do have a bit of knowledge of how atoms are arranged, how energy levels work, atomic spin and stuff like that, and I'm not sure if that knowledge is necessary for the video to make sense, but it's a great video nonetheless. I'm on mobile right now, so I can't link, but it's by veritassium on YouTube, shouldn't be too hard to find

1

u/DXPower Jan 04 '14

I need some help understand qubits themselves. I know that they can be in superpositions and stuff, but where does the extra information come from when you have a superposition? Because in the end aren't you eventually left with a bit of information when you measure it? I really need help understanding how you can have more information with a superposition.

1

u/beta_plane Jan 04 '14

Would a quantum computer be better or worse than a regular computer at solving partial differential equations for dynamical systems such as the ones used for weather/climate prediction? I'm curious because processing power is one of most limiting factors in numerical modeling of climate

1

u/JohnPombrio Jan 04 '14

Quantum computing is only for a couple of specialized computing problems, one of them is factoring a large number. For 99+% of computer operations and scientific calculations, a quantum computer is pretty much a waste. Cracking computer encryption is one of those small number of uses for a quantum computer, hence the NSA wanting one. Other folks want to build one to sell them to these small number of users. Nothing in these quantum computers would be of ANY interest to you or me, our regular computers are much, much more useful.

1

u/Strilanc Jan 04 '14 edited Jan 04 '14

Quantum computers can do one particular operation a whole lot faster than classical computers. That operation is... multiplying a vector by a matrix. In a really restricted way.

(Don't know what a matrix is? Here's a khan academy video skipped to doing an example of a vector/matrix multiplication. Basically a vector is a list of numbers, a matrix is a grid of numbers, and you multiply them by adding the columns of the grid together after scaling each column by the corresponding number in the list.)

What do I mean by "in a really restricted way"? Well...

  • Implicit State: The only vector you can use for the multiplication is a list of states the computer might be in, with each state weighted by some number. This is a double-edged sword: that list of weights is gigantic and the universe tracks it for you, making this a powerful operation, but it's incredibly difficult to stop the outside world from affecting the computer and splitting the list.
  • Limited Operations: You can only multiply by a matrix if you can undo that with another multiplication. The matrices you use need to be invertible (more specifically: unitary). Think of assembling a desk, now imagine all you can do with the parts is stir them.
  • Awful Output: We can't directly read the weights of the list of states the computer might be in. When we measure the result we end up with a single state, but higher-weighted states are more likely. So the whole goal is to use operations that make a result containing a correct answer end up with a really high weight.

So quantum computers can do one huge operation really fast, but there's restrictions on the operation and even when it's allowed you can only sample part of output. Only some problems can be solved faster under those restrictions, but a few of them are really important problems whose difficulty we happen to rely on when encrypting/signing stuff.

If you want to understand quantum computers in more depth, I recommend studying linear algebra.

1

u/[deleted] Jan 04 '14

Just saw a blurb on CNN, the NSA is funding a quantum computer and says it is somewhere between 5-10 years out, they have to be built in a building that is completely shielded from any source of radio or electromagnetic waves, so yeah, sounds like a ways away since the NSA has an unlimited budget.

1

u/bender787 Jan 03 '14

Here's a quick and dirty example. Let's say you had to crack a combination lock that had an answer of 7-4-6-1. Well if you didn't know the combination already you would need to try each possible combination, and these are the unnecessary calculations that you don't care about. Quantum computers are able to try every possible combination simultaneously rather than one-at-a-time by using this thing called superposition.

Superposition is a quantum mechanical phenomenon that allows particles to be both 0 and 1 at the same time. And because computers work on 0 and 1s, we can use these lil guys as little processors that try out all the different combinations for us.

Hope that helps!

2

u/DanielSan_BJJ Jan 03 '14

Do you happen to know what's the role of quantum entanglement in speeding up said computation? I've read in many places that quantum entanglement, such as quantum superposition, give quantum computers an inherent parallelism, allowing them to process data faster. I was never able to find a reasonable explanation of why this is the case.

1

u/bender787 Jan 04 '14

quantum entanglement is when two particles are entangled and become that fuzzy mix of both states. By quantum entangling particles you get the quantum superposition state.

Cool recent fact, when two particles are the quantum entangled, if you measure one, the other instantly takes on the same value. Scientists have discovered that because the information violates the speed of light it must be forming a wormhole. Sauce:

http://www.huffingtonpost.com/2013/12/04/quantum-entanglement-wormholes-universe-physicists_n_4383168.html

1

u/DanielSan_BJJ Jan 04 '14

Actually no information is being sent, only random noise, therefore there's no violation of the speed of light.

quantum entanglement is when two particles are entangled and become that fuzzy mix of both states. By quantum entangling particles you get the quantum superposition state.

I believe quantum entanglement is more than quantum superposition. It is more related to the second phenomenon you described:

Cool recent fact, when two particles are the quantum entangled, if you measure one, the other instantly takes on the same value.

You have two particles entangled such that the outcome of a measurement on one of them results in you knowing the result in the other (not necessarily the same value, in the measurement of entangled electron spins, for example, you will always get an opposite result).

I still don't understand exactally how this phenomenon helps speeding up a simulation in a quantum computer. I've read that it offers the computer an inherent parallelism, but I've never read an explanation of why!

1

u/Saganic Jan 03 '14

I'll take the uber layman approach, see if I get this right: Modern computing is based on 1's and 0's, two states for every bit. Qubit's used in quantum computing can be 1, 0, or a superposition of both. So whereas a bit has two possibilities, a Qubit has three, which allows for more efficient and less expensive operations at a fundamental level.

1

u/KaizenGamer Jan 03 '14

I'm here late and this will get burried, but here goes:

Electrons have positive and negative.

Quantum particles have 8 super-states they can be in. So instead of 0 and 1, you have 0, 1, 2,3 ,4 ,5, 6, 7.

So the capabilities of 10 electrons vs 10 quantum particles is...

1024 possible states vs 1,073,741,824 possible states.

0

u/just3ws Jan 03 '14

It's the difference between flipping a coin and rolling a dice.

Think of flipping one coin. The coin is black on one side and white on the other. One side represents on and the other is off. You can get a bit of use out of that to communicate one but of information at a time. Stop/go, etc. Computers can associate actions with the state of these bits of data to do useful things. Much like we say "heads I win" then flip a coin, heads or tails has only the meaning we attach to it. To get more done than just a single point of data we have to have a lot of coins to represent something meaningful, like a complex concept such as coloring a pixel on a screen. Then we need more coins to represent multiple possible concepts. This starts to get expensive because we have to have a lot of coins, a way to manage them, flip them, and then count up the results of each flip.

Imagine now trying to simulate rolling a single dice by flipping coins. How many coins does it take to represent a 6-sided die? Let's say six to represent a one side, we simply flip all the coins and count up, say heads, and that is the roll. That's a lot of work to simply get one value.

Quantum computing is like just having dice. You only need one roll to represent 6 possible values. This is much more powerful because now you can start to work with multiple positions as well. With the coin you really only can see one side at a time. Heads/tails, black/white. By adding the additional dimension of a dice you can not only have the face value but the values on the top, bottom, etc. the data from a single unit increased dramatically so much more information can be represented on a much smaller scale.