173 points · by reikonomusha · 9y ago · 71 comments
Some potentially HN-interesting links:
pyQuil, a Python library for quantum programming: https://github.com/rigetticomputing/pyquil
pyQuil on RTD: https://pyquil.readthedocs.io/en/latest/
Grove, a collection of quantum algorithms in Python: https://github.com/rigetticomputing/grove
How hard of a problem can you solve with 8 qubits? For example, if you're implementing shor's algorithm -- it looks (very naively) from the wikipedia article that to efficiently factor a number of size N, you need about log(2N) qubits. So with 8 qubits you could factor the number 32 efficiently (is that calculation right?). Can you do things more difficult than 'factor 32' with 8 qubits?
(not intended as an attack at all, i genuinely just do not understand how to reason about the power of quantum computing devices with X qubits)
Shor's algorithm isn't a good candidate for near-term use of a quantum computer. Other algorithms, such as the variational quantum eigensolver or the quantum approximate optimization algorithm are better. These can be used to solve chemistry and optimization problems, for example.
We actually made a little demo to show a little game you can play with 8 qubits. It may not be able to handle the load of HN if it finds its way to the masses, but check it out! [0]
That is really useful to know! At what point does that stop being true? like, if I had 100 qubits could I still simulate them faster on a classical computer than with actual quantum qubits? (I imagine this is a hard question to answer because it's a complexity theory question, and I guess quantum computers with 100 qubits don't actually exist in real life, but I'd be curious to know what known bounds there are on the answer)
And 100 qubits. That needs more than 18 quintillion terabytes of RAM. In other words, it's not going to happen.
With more memory, you need more time. Every quantum operation [0] needs to touch all of that memory. And if it takes 10 ns to touch one byte of memory, then it will take hours to even do one simple operation on 36 qubits. [1] On a quantum computer, an operation would be on the order of nanoseconds.
I would say this, as a rough answer to your question: A quantum computer is practically faster and more useful when you can no longer touch the RAM necessary to simulate it in a 1 millisecond. Going off of our 10 ns rule, 1 ms = 10^6 ns. So if 10 ns allows us to do something with 1 byte, then that's 10^5 bytes. So just about 10 KB.
And, drum roll, that's just under 10 qubits [2].
[0] There are some very special cases where this isn't true, but these special cases also don't give you any sort of quantum advantage.
[1] There are some tricks you can play to speed things up, like parallelizing across processors. But now you'll have to factor in communication time, memory, and bandwidth.
[2] One factor I'm not considering is the fidelity. Superconducting qubits can be thought of as analog devices with analog noise.
There are some other methods of approximate simulation, but that gives the cut off for full, exact simulation of a quantum computer.
[0] https://www.nersc.gov/news-publications/nersc-news/science-n... [1] https://arxiv.org/abs/1704.01127
I assume once the "computer" reaches a new local maximum score (i.e. each time they find a way to get a new high score) you're storing the time it took for the algorithm to reach that score, even if it goes off and looks for other less-high-scoring combinations after.
However, the "player's" score is dependent entirely on when they submit their solution. If I click the bubbles to reach a maximum score of 11 early on, and then spend a significant amount of time trying other combinations to make sure it's the best I can do, my score is based on how long I took trying all combinations instead of how long it took me to first reach 11 (like how it scores the computer).
I know it's structured as a "race", but this little discrepancy in scoring makes it feel a lot more like it's testing heuristics of how well you can reason "this is probably the maximum score" instead of actually tackling it in the same way a computer would.
I like to use the analogy. Adding 1 GB of RAM these days isn't that big of a deal. You can maybe open two more tabs in Chrome. :) Adding 1 giga-qubit to your computer would make it 4.6 x 10^301029995 times better. That's unimaginably more powerful than anything any human can think of.
We don't have quantum software engineering figured out. And it's not going to be figured out by a few academics, although they may lay some good foundations. It's going to be figured out by the same folks who figured out traditional computing: people who try stuff, break stuff, and experiment.
What you're ignoring with your exponential growth argument is that it is also exponentially harder to add one qubit while maintaining usefulness (i.e. long decoherence times).
I'd say, anyone who doesn't want to work either in academia or on "vanity projects" like D-Wave's much-hyped collabs with Lockheed, Google etc. should wait half a decade and see.
[1] Arguably the D-Wave machines are faster than a human, but we don't have evidence (yet) that it's not just a fancy annealing ASIC.
I do disagree that it is exponentially more difficult to add a qubit. Coherence times are something to optimize, and densely packing qubits is also difficult with coherence times, but the notion of adding a qubit to a system doesn't come with an inherent exponential difficulty.
Regarding whether it is useful or not to learn quantum computing for your profession, if it's true that systems can be built that grow with exponential power, then they'll be relevant faster than one might think.
Please don't make bullshit claims about exponential speedups. I don't know exactly what technology you are claiming to have, but statements like this cause me to believe less in your technology, not more.
We've been through the cycle of unfounded hype many times (with D-WAVE and others). Scott Aaronson has an entire category on his blog filled with depressingly many posts debunking the same bullshit over and over [0].
But, as John Preskill points out...this is not even the really interesting thing here. Quantum simulation actually lies outside the class of NP, because there is no efficient way to verify the solution of such a simulation.
This area is where quantum computers, in my opinion, are the most interesting, we will be able to do things we simply cannot on a classical computer....and for the record..most people commenting should know that D-WAVE operates using the Adiabatic model, and is not a universal quantum computer.
This is not disagreed by experts in the field of quantum computing, including Scott.
That's not true and you should know better. For example, there are very few problem for which quantum computers are known to perform better than standard computers.
Of course, I am saying "mathematical entities", and almost all practitioners of quantum computing are aware of the challenge to actually build them.
Quantum computation is such a new and different computing paradigm, that whoever is prepared will be able to reap the benefits much earlier. And, if the promises of scaling are true (they are from a fundamental physics standpoint), such companies will propel themselves far ahead of the competition.
I would say that, in the current stage of development of quantum software and hardware, even a seasoned software professional will not—on short order—be able to apply the tools directly to their problems. As a programming language enthusiast, it's like taking a long-time K&R C programmer, and asking them to be productive in Agda. It's not that they can't, but they probably won't be able to do it by tomorrow. It'll take time, energy, and investment to think in new ways.
I personally believe that commercialization will become more and more apparent when services are accelerated by quantum computation. But how many people are going to share that secret sauce?
I understand if you don't want to make a public statement about such divisive (and perhaps, more importantly, ill-defined) matters in this context. I'm just curious about the way that the people who are actually building these things tend to view them...
After an informal poll of ~30 of our scientists/engineers, ~8 said they subscribe to the many-worlds interpretation [1] [2] of quantum mechanics. To be honest, this is a discussion that comes up surprisingly infrequently at the office!
This result reminds me of Sean Carroll's "Most Embarrassing Graph in Modern Physics" [3]. When top theoretical physicists are polled, it seems like no interpretation of quantum mechanics even takes the majority! In my view, the lack of consensus around this (after ~100 years) underscores the strangeness of the theory.
I should mention that David Deutsch (one of the pioneers of quantum computing), Steven Hawking, Max Tegmark, Sean Carroll, John Preskill, and many other prominent physicists prefer the many-worlds interpretation (citation needed).
If you like the "leveraging the multiverse" view of quantum computing, be sure to watch David Deutsch's video lectures [4]! In his view, multiple universes is the way to explain the power of a quantum computer.
[1]: https://en.wikipedia.org/wiki/Many-worlds_interpretation
[2]: https://plato.stanford.edu/entries/qm-everett/
[3]: http://www.preposterousuniverse.com/blog/2013/01/17/the-most...
As for me, the only way I could even attempt to understand this quantum mechanics business was through the multiverse perspective. Fun fact: The QVM actually implemented the multiverse interpretation of quantum mechanics. Every qubit measurement, in particular, would branch the wavefunction into two separate universes. This was a perfect way to bring my computer to a grinding halt in no time.
When we started thinking about quantum programming languages, we didn't know what they should look like. Experimenting with different languages efficiently requires a language that makes language-building easy. I find that there are two classes of languages that provide that: Lisp-likes with metaprogramming and ML-likes with a good type system including algebraic data types.
Quil [0], our quantum instruction language, came out of language experimentation in Lisp. In fact, the Quil code:
H 0
CNOT 0 1
MEASURE 0 [0]
used to look like this: ((H 0)
(CNOT 0 1)
(MEASURE 0 (ADDRESS 0)))
This was a no-hassle way to play around without thinking about how to wrangle lex and yacc with shift/shift and shift/reduce issues. If you've ever used them, it takes a while to get what you want, and integrate it into a product you're trying to create.In addition to the need to construct languages, we also needed to simulate/interpret the language. Simulating the evolution of a quantum state is very expensive (which is why we are building quantum computers!), and is usually relegated to some closer-to-metal language like C.
Unfortunately, in C, high-speed numerical code (that is also blazing fast) is very difficult to experiment with, extend, maintain, etc.
Fortunately, over the past 30 years, Lisp compilers have become excellent at producing native machine code. With a compiler like SBCL [1], you can produce code which is very nearly optimal. For example, we have a function to compute the probability from a wavefunction amplitude. Here it is:
> (disassemble #'probability)
; disassembly for PROBABILITY
; Size: 90 bytes. Origin: #x22B67F5A
; 5A: F20F104901 MOVSD XMM1, [RCX+1]
; 5F: F20F105109 MOVSD XMM2, [RCX+9]
; 64: F20F59C9 MULSD XMM1, XMM1
; 68: F20F59D2 MULSD XMM2, XMM2
; 6C: F20F58D1 ADDSD XMM2, XMM1
; ...
There's some additional code that follows, but it disappears because this function is also inlined at the call sites.Writing the QVM and associated compiler in Lisp has allowed us to move fast. The code is compact, extremely robust, and extremely fast.
I could say a lot more about this, but that's the gist of why we thought it was a sensible decision.
Now it's true that classical computers used to take up whole buildings. Living people remember this. And progress is supposed to be getting faster and faster. But given the particularly arcane constraints... how long if ever before this kind of technology can be a part of the daily lives of most Teran Citizens? Will it ever be possible for us to have it at home? Or will we always have to send out requests to more centralised machines that will then send us back answers?
The bigger point to realize, I think, is that most people's computing doesn't even happen at their home anymore. Much of it happens on some blade in a server rack. I think, for the time being, quantum computing will be just like that.
It was pretty inconceivable, in my retrospective of computing, to think that vacuum tubes would be miniaturized to fit in little boxes in bedrooms. You really needed the discovery of a IC transistor to let that happen. That hasn't happened yet with qubits, and I don't think one can with any certainty predict it.
1. Forest was designed with near-term applications in mind. Specifically, it uses our quantum instruction set (Quil) [1], which was designed for implementing classical/quantum hybrid algorithms [2]. These algorithms can leverage near-term quantum devices significantly more than "textbook" quantum algorithms (like Shor's). IBM Q places much less emphasis on hybrid computation.
2. Forest provides raw access to the quantum hardware. There's an API [3] for users to run "analog" experiments to understand the performance and noise characteristics of our qubits. If you're developing near-term applications for quantum computers, having access to this physical layer of quantum devices is crucial. IBM Q doesn't provide a similar API to my knowledge.
3. Programs written with Forest can execute on up to 30 virtual qubits on the Rigetti QVM [4]. This allows users to develop quantum algorithms ahead of any physical device that can run them. Especially if you include noise modeling (we do), 30 qubits is well beyond what you could simulate with your laptop. IBM Q offers a 20 qubit simulator, which is roughly 1000 times less powerful than 30 qubits.
I must mention that IBM recently announced their experience will have up to 17 real qubits! This is larger than any physical device Forest is currently connected to, and represents exciting progress.
[1] https://medium.com/@rigetticomputing/introducing-quil-a-prac...
[2] https://arxiv.org/abs/1509.04279
[3] http://pyquil.readthedocs.io/en/latest/qpu.html
[4] http://pyquil.readthedocs.io/en/latest/qvm_overview.html
Is there a chance that you can roughly summarize noise levels, to give an idea of what to expect? Something along the lines of Table 2 (page 6) in arXiv:1705.02771 would be helpful.
A. Bermudez et al. "Assessing the progress of trapped-ion processors towards fault-tolerant quantum computation", arXiv:1705.02771 https://arxiv.org/abs/1705.02771
You can find metrics for some of our more recent hardware here: http://www.rigetti.com/papers/Demonstration_of_Universal_Par...
[1]: http://pyquil.readthedocs.io/en/latest/qvm_overview.html
I wonder if anyone could link to something that makes the stuff clear.
https://www.youtube.com/watch?v=dKAF9OCQtIo
"QBism is NOT NEW but at least people are reviving what Bohr thought. QM just involves expectations of observables and the Born rule is just "metaphysical fluff." The confusions are all about false counterfactuals."
I noticed you seem to be using assembly at the moment. Are there higher-level languages out there at the moment, or are those still a ways off?
Other high-level languages for quantum computing include LIQUi|> [3] and Quipper [4]. Each approach has it's strengths, but we believe Quil/pyQuil is the best choice for near-term applications. See the Quil paper [5] for more details.
[1]: https://pyquil.readthedocs.io/en/latest/
[2]: https://medium.com/@rigetticomputing/introducing-quil-a-prac...
[3]: https://www.microsoft.com/en-us/research/project/language-in...
The access to quantum hardware is limited at this point, but we'll be adding new features over the coming months.
[0] http://www.rigetti.com/papers/Demonstration_of_Universal_Par... [1] http://pyquil.readthedocs.io/en/latest/qpu.html
Thanks for all the cool stuff to play with!
It's important to remember though that noise is a fact of life for this generation of small prototype quantum processors. You'll definitely see a difference between a perfect simulation and true hardware.
We use Linux heavily to develop our own quantum OS. Programs written with Forest targeting the QPU [1] pass through the quantum OS, which runs on the control systems at our facilities. Thanks to our cloud API, users don't need to know these details.
Take it as discarding the transistor era of computing for wonderful qubit era. :D