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.

→ More replies (42)
→ More replies (6)
→ More replies (7)

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?

→ More replies (10)

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.

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

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.

→ More replies (1)

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)
→ More replies (1)

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

-3

u/bobes_momo Jan 03 '14

Exactly! And the only way to prevent the quantum process from breaking your encryption is to have unlimited numbers of "correct" answers present within the encoded transmission; that or use quantum entangled transmissions that cannot be intercepted except if you get one of the devices.

10

u/[deleted] Jan 03 '14

Would you care to explain?

9

u/bitwiseshiftleft Jan 03 '14

I'm a cryptographer, and to the best of my knowledge, this isn't true. Quantum computers could break RSA and discrete logarithm systems (DH, DSA, and anything using elliptic curves) using something called Shor's algorithm.

These are all public-key algorithms. There are other public-key algorithms that could replace them, and which have no known weakness to quantum attack. But these systems don't perform as well and aren't as well tested as RSA and DH systems, so they're mostly just a research project for now.

Because of Grover's algorithm, QC could speed up an attack on symmetric algorithms like AES by a square root, but most of those algorithms support 256-bit keys for this reason. That's a big enough key that even with a QC that's as fast as a conventional computer today, the attack wouldn't even be close to feasible.

While I'm here, D-Wave's system is a computer, and it probably has something quantum going on, but it doesn't support the operations necessary to run Shor's algorithm or Grover's algorithm.

→ More replies (5)

7

u/The_Serious_Account Jan 03 '14

Exactly! And the only way to prevent the quantum process from breaking your encryption is to have unlimited numbers of "correct" answers present within the encoded transmission;

I'm not actually sure what you're saying, but I'm extremely confident it's horribly wrong. There's no way you can have a "unlimited numbers of "correct" answers". The communication is finite so the number of messages is finite. Shannon wants a word with you.

→ More replies (1)
→ More replies (5)
→ More replies (20)

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!

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

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?

→ More replies (1)
→ 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.

→ More replies (1)

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.

→ More replies (1)

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.

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

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?

→ More replies (1)
→ 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?

→ More replies (1)
→ 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

→ More replies (2)

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.

→ More replies (1)

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.

→ More replies (2)

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.

→ More replies (11)

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)

→ More replies (3)

7

u/toomuchdoing Jan 03 '14

This video is a good accompany to above comment.

→ More replies (1)

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

→ More replies (6)

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.

0

u/[deleted] Jan 03 '14

[deleted] — view deleted comment

4

u/YoYoDingDongYo Jan 03 '14

It would mean the end of all encryption.

Not true. One time pad encryption will be secure no matter how much computation you can throw at it.

4

u/0xfe Jan 03 '14

quantum computer can solve any problem in a trillionth of a second

This is an exaggeration. Quantum computing can solve some problems orders faster than a classical computer.

It would mean the end of all encryption.

Not all encryption. Only encryption schemes that are fundamentally based on the class of problems that are easy for quantum computers (like prime factorization.) There are a number of proposals for cryptographic schemes that are (meant to be) resistant against quantum attacks.

3

u/ianp622 Jan 03 '14

No, there is only a small set of problems that can be solved with a quantum computer faster than with a regular computer. And they still take time according to the input size.

2

u/padelas14 Jan 03 '14

Quantum computing is thought to be able to solve some of the problems that plain computers can't solve efficiently. In the image the (infamous) NP class are the "hard" problems and the BQP class the problems that quantum computers are thought to solve. The relation between BQP and NP is not proven but is suspected ( as is the relation between P and NP ) .

As /u/0xfe says only some algorithms are based on the problems that quantum computers can solve. RSA is one of them which is very common. But there are also those algorithms that are thought to be quantum-resistant.

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.

0

u/naeshite Jan 03 '14

A Computer has 3 calculations to do

Normal CPU:Each calculation done one after the other, it may appear as though the calculations have been done at the same time but they have not

  • Thread 1: 5+4 = 9
  • Thread 2: 5+2 = 7
  • Thread 3: 100 + 4 = 104

Quantum CPU:Calculation done in parallel(at the same time)

  • Thread 1: 5+4 = 9, 5+2 = 7, 100 + 4 = 104
  • Thread 2: Not Required
  • Thread 3: Not Required

0

u/ThePopesFace Jan 03 '14

The above answers are correct (i think) but are hard to understand.

In simple terms:

A couple reasons: for starters, the thing that limits conventional computing power is the size of the transistors. A quantum computer could have transistors that are only 1 atom in size (the theoretical smallest) (more transistors = more computing power)

Secondly, a quantum computer can be in all states at once, normally a computer's transistor is either on or off. A quantum computer can be both, at the same time... because something something quantum mechanics. (I don't really understand that) This lets the computer run calculations a lot faster by doing multiple calculations at the same time.

1

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

eh, size isn't a great argument here. The machinery to keep a system in a quantum state and operate on it may be much much larger than any desktop computer.

0

u/skyride Jan 03 '14

Modern computers are "fast" by performing a large number of operations consecutively in a short period of time. Quantum computers are fast by being able to run a large number of calculations simultaneously.

For example a typical computer may work like this:

A -> b -> c-> d -> e -> f -> g

However a quantum computer can do:

a -> b
a -> b
a -> b
a -> b
a -> b
a -> b

There are 6 calculations done either way. The actual calculation is simpler, but it can be applied to a larger data set. That's extremely useful for certain problems, and actually a drawback for others.

Quantum computers aren't "better" than our current machines, they simply come with a different set of pros and cons.

0

u/[deleted] Jan 03 '14

I've read claims that quantum computers can "travel in time." I'm horribly botching this but I'm hoping someone can explain it with the correct terminology.

Basically, I've read claims that quantum computers will be able to test an answer and if that answer isn't correct, simply go back in time and try another possibility. So in essence, all computing becomes instantaneous.

As the OP said, I've asked this question before and never gotten a satisfactory answer - even though I've been told that this is impossible and also that it is completely possible. So which is it?

3

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

no that's definitely not what happens. While I'm at it there's another "mental picture" that is slightly "more right" than this answer, but still not scientifically correct: That the quantum computer creates a bunch of new universes, then destroys all of the universes where the wrong answer was calculated.

It operates on a superposition of all the qubits inside of this, which have many possible "trajectories" (ways they can change), and then tries to eliminate all the "trajectories" that don't give the right answer.

0

u/manthew Jan 03 '14

From the excerpt, I think what the NSA has failed to mentioned is that quantum computers are more efficient in transmitting information across two points without a third point interfering (or eavesdropping). Given the Snowden incidence, it's rational to invest in such a computer.

source: Video by PhD Comics is pretty interesting and easy to access.

0

u/anon275 Jan 03 '14

nobeardpete's explanation is the best I've heard. The way it was originally explained to me was: since computers think in "1's" and "0's" or "yes and no", and quantum computers have "the super position" something of an in between yes and no, instead of having to do each calculation separately, a quantum computer can do them all at one time. So it doesn't matter how fast a normal computer can calculate something because it will never be as fast as "all of them at the same time" this is probably suuuuper laymens terms, just thought I'd share because thats how I was able to grasp it.

-1

u/felixar90 Jan 03 '14

Take the D-Wave for example. With its 128 q-bits, it can solve a 128 cities traveling salesman problem in a single operation, when a standard computer would take some time, but it's pretty much the only thing it can do. And it must be physically "prepared" for each problem.

1

u/[deleted] Jan 03 '14

Hi Felixar90, having actually worked closely with the D-wave machine and the TSP problem (never got around to actually solving it but had the solution all mapped out), it's not as simple as saying a 128 qubit chip can solve a 128 city problem. This is for a couple of reasons. First of all, when you map the TSP problem to a quantum computer, your qubits actually represent connectiosn between cities, not cities themselves. Think of it this way: when you solve the TSP, you're thinking about which connections between cities you want on and which you want off. Since the qubits are the things that have either up or down spin, you actually want to map qubits to connections and qubit couplings to cities. This itself means that for a 128qbit graph, you actually can only solve about sqrt(128) city problems. Then you have the problem on very limited connectivity for the qubits and that restricts the number of cities as well. I can tell you from experience that it would be difficult if not impossibly to solve a problem bigger than 20 cities on a 512 qubit graph. You run into a few other problems as well related to the actual Ising model mapping of the TSP but that's a difficult problem all together :P

1

u/felixar90 Jan 03 '14

Oh, yeah right, it's the connections and not the cities. I remember watching a really interesting video about the D-Wave and TSP problem... (Or did I read it? it's fuzzy) but I can't remember all the details.

I remember they actually physically map the problem into the computer, and when they run it, the weakest connections are automatically eliminated, and the connection remaining tell you what the shortest possible path is.

1

u/[deleted] Jan 03 '14

Yeah, that's pretty much the gist of it. Basically the output you get is a histogram of all of the lowest energy groundstates that the machine ended up in (say after 10000 quantum annealings). Your lowest energy one is the optimal solutions. One of the nice things about the way this computer works is that even if you ran the machine only like 100 times, you might not get the actual optimal solution but you will definitely get solutions that are almost optimal (something that I think it hard to do in classical computing? correct me if i'm wrong).

1

u/felixar90 Jan 03 '14

Actually, past a certain point with classical computing, you have to use heuristics because a full solving would be too long. The problem with heuristic is that they do not always exist for a certain problem, they're not always usable and they give an almost optimal solution, or optimal. But you can't know wether it's THE solution or just a close one. And the same heuristic will always give the same unique solution for the same problem.

If the quantum computer can give you many different almost optimal solutions, then yeah, this is cool!

-1

u/Year3030 Jan 03 '14

I think it's hard to explain because we don't have a grand unified theory of everything.

The "quantum" computers they are making in canada (I forgot the name) are super cooled which means the bits superconduct which will be much faster than normal non-superconducting computers.

The true quantum computers supposedly use quantum entanglement which allows the bits to calculate in infinite parallel universes. If someone can explain that fully then .. well scientific breakthrough dude.

-1

u/[deleted] Jan 03 '14

[removed] — view removed comment

4

u/myblindy Jan 03 '14

OK but he's asking "why", "how". Lot of hand waving in this thread..

0

u/[deleted] Jan 03 '14

[deleted] — view deleted comment

3

u/DanielSan_BJJ Jan 03 '14

I have to agree with you. Quantum computing is not an easy topic to explain to people with no quantum physics background. However I think that the wikipedia page you refered doesn't help much either. It says that a quantum computer is based on this and that phenomenon, but doesn't explain what roles said phenomenons take in speeding up simulations.

1

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

Unfortunately, there can't be a simple layman explanation for something so cutting edge that the vast majority of people aren't even familiar with the concepts prerequisite to understanding the target concept.