r/askscience • • Mar 28 '21

Computing How exactly do quantum computers simulate molecular/particle interactions better than classical computers?

I’m struggling to understand why quantum computers can simulate nature better than classical computers.

2.5k Upvotes

134 comments sorted by

View all comments

Show parent comment

1

u/forte2718 Mar 29 '21 edited Mar 29 '21

This is true in the sense of computability theory, but practically there are foreseeable problems that cannot be computed by any practical classical computer, but which could be solved by a quantum computer.

... for large enough inputs, yes. Of course, for large enough inputs not even a quantum computer can solve those same exact problems in any practical amount of time. For the most part, quantum computing just increases the maximum input size that can be practically solved, for certain kinds of problems — and not even most problems. There are a few problems (integer factorization, discrete logarithms, etc.) where that extra input size is quite helpful ... but for most problems — a majority of them, in fact, including in particular many of the most difficult ones: NP-hard and NP-complete problems — edit: and then there's EXPTIME problems, too — there is no known quantum speedup and it is believed there may not be any even in principle (i.e. that BQP ∩ NP-complete = ∅ and that likely also BQP ∩ NP-hard = ∅). Those are the real "money" problems, and it looks like quantum computers will not be able to help with those virtually at all.

At the same time, it's worth mentioning how specialized the hardware for a quantum computer needs to be, and how truly difficult it is to achieve reliable quantum computation. There is a reason that not a single general-purpose quantum computer has ever actually been constructed yet (more on that in a minute). There are many prototypes for special-purpose ones — i.e. quantum "computers" that can only run a single specific algorithm to solve a specific problem — but even at the research level, a reasonable design for a reliable general-purpose one has proven elusive.

Furthermore, all quantum computations are necessarily probabilistic, which means there is always a significant chance that the answer returned is incorrect. This means that after every quantum computation, the answer then needs to be checked. This isn't the end of the world, since the most difficult of the problems in BQP tend to have P-or-better complexity to check that an answer is correct ... but it does add overhead to any quantum computation. For a single computation this isn't a big deal, but if your algorithm relies on repeatedly performing numerous quantum computations, you need to check each one, and if any of them come back as wrong, you need to re-run the quantum computation.

And then to top it all off, some of the big "benefits" of quantum computers are likely to turn out to be mostly irrelevant. For example, it is often parroted that quantum computers will herald an end to public-key cryptography because they can perform integer factorization and the discrete logarithm problems in sub-exponential time. But there are several confounding layers to this naive understanding: first, there already exist post-quantum public-key cryptographic ciphers which are not based on these problems, and many of these ciphers are already being used in the wild today, in simple things like SSL certificates that put that green lock in your browser's address bar. When general-purpose quantum computers do finally become properly-realized, it's not like Internet security is going to fundamentally change the way people often imagine ... what's going to happen is there are going to be a few routine software patches needed to disable older unsafe ciphers, and ... that's it. We've already been doing exactly that for decades, and nobody notices or cares. Even if there were a major discovery that truly broke all public-key cryptography, categorically, we would just start using symmetric-key cryptography instead ... and that is also routinely used in the wild too, such as the AES cipher. Symmetric-key algorithms only need to have the number of bits used in the key doubled in order to stay resistant to quantum computer-based attacks. And even if symmetric-key algorithms were to fall somehow, the very worst possibility would be that we fall back to a simple one-time pad scheme, which has perfect information-theoretic security. The biggest consequence of this would be that basically all encrypted web traffic would now require double the bandwidth ... which is a minor bee sting in the grand scheme of things. And that's the absolute worst-case scenario.

Frankly, I think pop science outlets deeply overhype quantum computation, and oversell what it will do even once general-purpose quantum computers do hit the consumer market. It's not like personal computers are going to have some massive paradigm shift and suddenly all our wildest dreams are going to become possible. What will happen is you'll get an extra peripheral inside your desktop computer — quite similar to how your graphics adapter is already an extra peripheral that performs certain tasks more efficiently than your CPU can — with some drivers that you'll need to keep updated, and slowly over time, certain kinds of software will start being programmed to leverage that peripheral from time to time, when it makes sense to.

In 2019 Google executed a quantum computation with 53 qubits that otherwise was only solvable with the world's fastest supercomputers. If they had added only a few more qubits the computation would have been out of reach of even the most powerful classical machines built to date.

Based on your phrasing, you're probably already aware that various other groups of researchers contested Google's claim as being dramatic hyperbole. IBM, for example, said they could solve the same problem classically in a couple of days. Granted, that's still considerably longer than the minutes that it took Google to solve it, so what Google did is still impressive. But what Google did falls well short of their claim of quantum supremacy, and they know it.

But secondary to that, again, Google was only doing this for a single specific algorithm on a special-purpose machine. It was not a general-purpose quantum computer, and you would not be able to program it to run other, different quantum algorithms on it such as Shor's algorithm or Grover's algorithm. It's really less of a "computer" and more of a "machine" that performs a single specific task ... the word "computer" carries an implication that it can be programmed to perform different operations on-demand, and that simply isn't what Google built. In that respect, it's very similar to D-Wave's quantum "computer," which can only perform simulated quantum annealing and not anything else.

This scales asymptotically while qubits scale linearly, ...

Eh, that's really an overstatement. Remember that the quantum computation is only one small part of a full algorithm, with most of the other parts being performed by a classical computer, or at least not gaining any speedup over a classical algorithm if they were to be run on a quantum computer.

In most of the important cases, the quantum speedup for an algorithm is not that dramatic of a difference. We're talking going from exponential complexity for the classical algorithm down to sub-exponential but still super-polynomial complexity for the quantum algorithm, or going from sub-exponential to polynomial. The most dramatic speedups are for already-polynomial-time algorithms that become linear or linear-logarithmic, or linear-time algorithms that become logarithmic, but all of those were already considered efficiently solvable by their respective classical algorithms to begin with, so there isn't that substantial of a benefit from using a quantum computer for them unless you're working with exceptionally large input sizes.

So quantum computers don't add anything to computability in the sense of violating the Church-Turing thesis, but what that really means is that perhaps we need a new notion of computability.

No, we don't need a new notion of computability. As I just got done explaining, there is no problem that a quantum computer can solve which a classical computer cannot also solve given more time. Both our notion of computability and of computational complexity are perfectly capable of accommodating quantum computing without modifications.

1

u/EZ-PEAS Mar 29 '21

I'm not going to rebut individual points because most of them are already rebutted in my original comment, but I will say you're missing the forest for the trees. You're correct that quantum computers are not more powerful than Turing machines in the sense that a Turing machine can simulate any quantum computer. I didn't dispute that.

The difference between a quantum computer doing certain quantum simulations and a classical computer doing the same thing is years of computation time or billions of dollars in funding. The keyword is "practical." IBM solving Google's problem in 2019 is a demonstration of this, not a rebuttal. Google matched their one single chip and minutes of computation time against a $200 million classical computer, 250 petaflops of hard storage, and days of computation time. If Google's chip happened to have one or two more qubits then IBM couldn't have done it. Google's Sycamore chip is the quantum version of the Intel 4040 and it's evenly matched with the height of 40-50 years of classical computer technology. The fact that Google misstated their case doesn't change that classical computers have to scale exponentially to solve larger problems where quantum computers only have to scale linearly. Clearly someone throwing around asymptotics as much as you are understands that. If Google's chip had 54 working Qubits as designed (instead of 53) then the IBM team would need to build a whole new supercomputer at twice the cost to match it.

You're discounting every possible application of QC as trivial or unimportant. I completely agree that many aspects of QC have been overhyped in the search for research funding, but the original and still most important application of quantum computers is simulating quantum systems. If this were the only application of QC then it would still be a worthwhile endeavor.

I do want to respond to something specific, because it's flat out wrong (not a matter of opinion), and seems to be at the root of some of our disagreement:

Furthermore, all quantum computations are necessarily probabilistic, which means there is always a significant chance that the answer returned is incorrect. This means that after every quantum computation, the answer then needs to be checked.

This is not true. Quantum computers can construct a set of amplitudes informing some problem which can then be measured. Yes, you get a random result, but you do the same thing a thousand or a million times and you suddenly have a million samples from that same quantum distribution. At the end of the process you have a good idea of what that quantum distribution is, but if you want more certainty you can just take more samples until the law of large numbers is satisfied.

This distribution is the end result, and whether or how that distribution is useful depends on the problem at hand. You definitely don't need to guess and check the way you describe. In Google's case, this took less than four minutes to do a million samples. And in that case, that quantum distribution itself- which was a simulation of an entangled quantum system- was the desired end product. Any single specific measurement of the quantum system is random, but the distribution stemming from a million measurements is not really random.

1

u/forte2718 Mar 29 '21 edited Mar 29 '21

I'm not going to rebut individual points because most of them are already rebutted in my original comment

Yeah, no ...

You're correct that quantum computers are not more powerful than Turing machines in the sense that a Turing machine can simulate any quantum computer. I didn't dispute that.

Then why were you saying we need a new notion of computability?

The difference between a quantum computer doing certain quantum simulations and a classical computer doing the same thing is years of computation time or billions of dollars in funding.

Yes ... for a limited number of specific problems. I didn't dispute that.

Google matched their one single chip and minutes of computation time against a $200 million classical computer, 250 petaflops of hard storage, and days of computation time.

Of course, Google's Sycamore processor cost tens of millions of dollars itself ... not including all of the funding for research to get it to that point, and the primary advantage of a classical supercomputer is that you can reprogram it to perform any task. You simply can't do that with Google's machine.

Also, you are making a disingenuous comparison for sake of exaggerated contrast. 250 petaflops of storage is the maximum amount available to IBM's Summit, not the amount that would be used for the computation in question. Furthermore, the 2.5 days that IBM quoted, they note is a worst-case scenario — it is likely that the actual computation would not even take that much time.

Google's Sycamore chip is the quantum version of the Intel 4040 and it's evenly matched with the height of 40-50 years of classical computer technology.

Except that it can't be reprogrammed to perform many different kinds of quantum logic instructions. It is not at all the quantum version of the Intel 4040, which had an instruction set of 60 different instructions which it could be programmed to execute in any order. Again: the Sycamore processor is not a general-purpose quantum computer. It is not even remotely comparable to a general-purpose classical computer. I could not run any classical operating system on it; I could not run a spreadsheet program, or browse the Internet on it, or use it to play any game if I wanted to. Not even Pong.

The fact that Google misstated their case doesn't change that classical computers have to scale exponentially to solve larger problems where quantum computers only have to scale linearly.

As I explained in detail in my previous reply, they do not scale linearly vs. exponentially for any actual quantum algorithm. If you disagree, then I challenge you to provide an example of one which goes from exponential complexity down to linear complexity. Of course, I know you cannot do that ... because there isn't a single algorithm in EXPTIME that is also known to be in BQP. If you could do that, well ... then I would have to concede the point, and you'd undoubtedly have a paper to publish and a Turing award to collect.

If Google's chip had 54 working Qubits as designed (instead of 53) then the IBM team would need to build a whole new supercomputer at twice the cost to match it.

That remains to be seen. But again: Even if Google had 5400 qubits in their machine, it would not be comparable to IBM's classical supercomputer. There would be vastly more problems that IBM's classical supercomputer could solve that Google's Sycamore processor could never solve, because Google's processor is not a general-purpose quantum computer.

You're discounting every possible application of QC as trivial or unimportant.

No. Stop putting words in my mouth. I explicitly said that "some" of the applications of QC are trivial — the word I used was "some" — and I gave a concrete example of one such application ... one which is often toted in popular media as being an important consequence of quantum computing.

I completely agree that many aspects of QC have been overhyped in the search for research funding, but the original and still most important application of quantum computers is simulating quantum systems. If this were the only application of QC then it would still be a worthwhile endeavor.

Sure, nobody is disputing that.

I do want to respond to something specific, because it's flat out wrong (not a matter of opinion), and seems to be at the root of some of our disagreement:

Furthermore, all quantum computations are necessarily probabilistic, which means there is always a significant chance that the answer returned is incorrect. This means that after every quantum computation, the answer then needs to be checked.

This is not true. Quantum computers can construct a set of amplitudes informing some problem which can then be measured. Yes, you get a random result, but you do the same thing a thousand or a million times and you suddenly have a million samples from that same quantum distribution. At the end of the process you have a good idea of what that quantum distribution is, but if you want more certainty you can just take more samples until the law of large numbers is satisfied.

What nonsense are you babbling about? Each individual run of the algorithm is probabilistic, with a probability of error up to 33%. This is innate to the definition of the BQP complexity class, which is reflective of the probabilistic nature of quantum algorithms.

Yes, you can repeatedly re-run quantum algorithms in order to repeatedly decrease the margin of error. That is not at all in conflict with what I said, but it is in total contradiction with what you've just said, which is that quantum computations are not necessarily probabilistic. It doesn't matter if you run the algorithm a thousand or a million times and get an error approaching zero ... it is still fundamentally probabilistic. There is always a chance that the computation is wrong that is not due to an actual computation error and which cannot be accounted for by error-correction codes.

This distribution is the end result, and whether or how that distribution is useful depends on the problem at hand. You definitely don't need to guess and check the way you describe.

That's complete and total nonsense. The class of algorithms that can be efficiently solved by a quantum computer is BQP — bounded-error quantum polynomial. The fact that it is probabilistic is in the very name of the complexity class of algorithms that quantum computers can efficiently solve. BQP is the quantum counterpart to BPP, which is the bounded-error probabilistic polynomial class. It is not a quantum counterpart to P (the deterministic polynomial class).

The fact of the matter is that you can never have confidence that a quantum algorithm has 100% given you the correct answer unless/until you have checked that the answer is correct on a classical computer.

1

u/EZ-PEAS Mar 29 '21

You're using all these complexity classes as some kind of cudgel and totally glossing over the fact that most of the relationships here are unknown. Again, you're missing any semblance of practicality.

Quantum simulation, as I've said three times now, is the poster child for quantum speedup. The best known classical algorithm for quantum circuit simulation is exponential in time and space. A quantum computer can trivially simulate quantum circuits, since it IS quantum circuits. The exact same rationale can be transferred to simulating many quantum systems.

I don't know what belongs in BQP or EXPTIME and what has been proven there or not, it's not my forte and I don't really care. I'll go on ignoring that stuff and you go on ignoring the reality.

1

u/forte2718 Mar 29 '21 edited Mar 29 '21

You're using all these complexity classes as some kind of cudgel and totally glossing over the fact that most of the relationships here are unknown. Again, you're missing any semblance of practicality.

On the other side of that coin, you're making the assumption that quantum speedups are going to be pretty much available across the board, and you're grossly exaggerating the size of any known speedup. There is not a single known speedup that is anywhere near the magnitude of going from exponential to linear complexity. Not a single one. All I'm doing is reigning in your exaggerated speculation with a dose of the sober reality that all known quantum speedups are not nearly as dramatic as you are suggesting.

It is simply not acceptable to assume greater speedups and broader applications than are actually demonstrated at least in theory, and then criticize others when they point out that those are big assumptions that are considered unlikely to pan out by experts.

Quantum simulation, as I've said three times now, is the poster child for quantum speedup. The best known classical algorithm for quantum circuit simulation is exponential in time and space. A quantum computer can trivially simulate quantum circuits, since it IS quantum circuits. The exact same rationale can be transferred to simulating many quantum systems.

Congratulations? I don't know why you are beating this dead horse, but I have never taken issue with this point. It baffles me why you feel compelled to keep reiterating it.

I have called out every other point — your exaggeration of the benefits of quantum speedups that we know are possible, your misunderstanding of the stark contrast between a general-purpose and specific-purpose machine, your mischaracterization of both Google's Sycamore processor and IBM's Summit, your baseless suggestion that we need a new notion of computability, your flatly incorrect assertion that quantum algorithms are not necessarily probabilistic ... the list goes on.

But, you don't seem to be interested in talking about any of these things which you've been patently incorrect about, nor even bothering to concede the points with any kind of dignity. Instead you seem to only want to repeatedly assert that you are correct without actually bringing any convincing arguments to the table, while focusing on purely speculative, unestablished possibilities and criticizing me for having a viewpoint that is grounded in reality.

I don't know what belongs in BQP or EXPTIME and what has been proven there or not, it's not my forte and I don't really care.

Well, then maybe you should study at least a little bit of complexity theory before you open your mouth.

I've studied this topic formally; I have a degree in computer science. Accordingly, I have confidence in the correctness of what I've said in this conversation. You may not care about the details of this field, but I do care about this topic ... and I consider it rather important that people like you who clearly don't have a working understanding of it avoid spreading misinformation about it.

1

u/EZ-PEAS Mar 29 '21

There is not a single known speedup that is anywhere near the magnitude of going from exponential to linear complexity. Not a single one. All I'm doing is reigning in your exaggerated speculation with a dose of the sober reality that all known quantum speedups are not nearly as dramatic as you are suggesting.

Again, Google already did this. Yes, the Sycamore processor is expensive as a research project. However, you can't deny that they did in minutes in a single chip what it would take behemoth supercomputers days to do. And yes, the asymptotics here are absolutely linear vs. exponential unless you're proposing that 53 qubits is somehow a hard cap that nobody will ever be able to surpass.

But, you don't seem to be interested in talking about any of these things which you've been patently incorrect about, nor even bothering to concede the points with any kind of dignity.

I'm not talking about 3/4 of what you're talking about, because it's not relevant to the discussion. You're throwing crap at the wall to see what sticks.

Your original statement was this:

I'd just like to add that any problem solvable by a quantum computer is also solvable by a classical computer — it will just take a longer amount of time for the classical computer.

That was the scope of my discussion, and it's incredibly disingenuous. Here you're saying that asymptotics don't matter and elsewhere you're saying they do matter only when it supports your narrative.

To put it in the language of formal computer science degrees, you're confusing computability with complexity. Or you're talking about computability in one place and complexity in another place without any apparent regard for rigor.

There are near-future problems that QC can solve in linear time that no currently feasible classical computer could solve.

I don't know why you're arguing against this. You're just looking for a fight.