10 ms·
Rigetti Forest 1.0 – programming environment for quantum/classical computing
- reikonomusha 9y agoHello HN! We at Rigetti are really excited to announce and release Forest. My colleague @dangirsh and I will be here today to answer any questions that might come up about Forest and quantum computing! Some potentially HN-interesting links: pyQuil, a Python library for quantum programming: https://github.com/rigetticomputing/pyquil https://github.com/rigetticomputing/pyquil pyQuil on RTD: https://pyquil.readthedocs.io/en/latest/ https://pyquil.readthedocs.io/en/latest/ Grove, a collection of quantum algorithms in Python: https://github.com/rigetticomputing/grove https://github.com/rigetticomputing/grove
- jvns 9y ago> We’ve gone from single-qubit devices to fully-functional 8-qubit systems that are now in the final stages of validation. 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)
- reikonomusha 9y agoThis is a good question. 8 qubits will not solve any problems that a classical computer can't. In fact, considering just how blazing fast modern CPUs are, you can simulate an 8-qubit chip faster and with more fidelity than you can with 8 homegrown 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] [0] http://demo.rigetti.com http://demo.rigetti.com
- jvns 9y ago> you can simulate an 8-qubit chip faster and with more fidelity than you can with 8 homegrown qubits. 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)
- wzeng 9y agoThe largest full quantum computer simulation done so far is 45-qubits which was performed on the Cori supercomputer [0][1]. The main limitation in these kinds of exact simulations is memory, and so simulating 50-qubits would require about a 1000x the memory of Cori, which is infeasible. 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-news/2017-2/record-breaking-45-qubit-quantum-computing-simulation-run-at-nersc/ https://www.nersc.gov/news-publications/nersc-news/science-n... [1] https://arxiv.org/abs/1704.01127 https://arxiv.org/abs/1704.01127
- reikonomusha 9y agoRight now, if you want to simulate 40 qubits, you need a computer with at least 16 terabytes of RAM. 41 qubits needs 32 terabytes. You can't do this in a single machine, but you could get these with enough computers linked together. But big iron doesn't scale exponentially, so at some point, you run out of atoms in the universe to use as transistors. 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.
- pieteradejong 9y agoAs a software engineer looking for a highly marketable and differentiated skill set, given your projections for quantum computing roadmap, when should I start exploring this area? (or: when should I start writing code and doing side projects)
- reikonomusha 9y agoNow. "Exponential" is faster than most people, including myself, can believe. When one unit of resource doubles your computational capacity, it doesn't take many units. 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.
- pieteradejong 9y agowhat would be signs that this is taking off commercially? will explore the github repo!
- reikonomusha 9y agoThere are lots of "checkpoints" one can imagine with the commercialization of a technology. Right now, large industry players, whose survival depends on their tech strategy, are investing in quantum computer R&D. I don't mean that these companies are themselves trying to build quantum computers, but they are interested in applying them to their hardest technical problems. 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?
- jcccc 9y agoHow is Forest different from IBM's quantum experience?
- dangirsh 9y agoGreat question. Both the IBM Q experience and Rigetti Forest allow users to write quantum algorithms with Python that can execute on real quantum hardware. Forest is different in 3 main ways: 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-practical-quantum-instruction-set-architecture-a684f0590a0c https://medium.com/@rigetticomputing/introducing-quil-a-prac... [2] https://arxiv.org/abs/1509.04279 https://arxiv.org/abs/1509.04279 [3] http://pyquil.readthedocs.io/en/latest/qpu.html http://pyquil.readthedocs.io/en/latest/qpu.html [4] http://pyquil.readthedocs.io/en/latest/qvm_overview.html http://pyquil.readthedocs.io/en/latest/qvm_overview.html
- jcccc 9y agoAwesome, thanks for the reply. Would you be providing the computational resources to run those 30 qubit simulated experiments? Would there be a limit? That's no small system size!
- negativ0 9y agotoo bad "rigetti" in Italian means literally "you puke"
- reikonomusha 9y agoUnlike Italian, the company name is pronounced with a hard G. And as far as I know, "rigetti" in Italian is "you discard". Take it as discarding the transistor era of computing for wonderful qubit era. :D
- tomdre 9y agoIt's both "discard", "puke", and "throw again"
- spullara 9y agoit is the founder's last name.
- deleted 9y ago[deleted]
- andreyf 9y agoBut does it run Linux?
- silassales 9y agocrysis
- dangirsh 9y agoWe couldn't make the binaries small enough for our current device ;) 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. [1]: http://pyquil.readthedocs.io/en/latest/qpu.html http://pyquil.readthedocs.io/en/latest/qpu.html
- pierre_d528 9y agoI came across this video trying to understand what are quantum computers about... After all, Feynman himself said: "If you think you understand quantum mechanics then you don't understand quantum mechanics." and "If you cannot build it, you do not understand it." I wonder if anyone could link to something that makes the stuff clear. https://www.youtube.com/watch?v=dKAF9OCQtIo 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."
- wzeng 9y agoIf you're looking for a short, and practical introduction using Python, then one is included as part of the documentation for pyQuil (part of the Forest toolkit): http://pyquil.readthedocs.io/en/latest/intro_to_qc.html http://pyquil.readthedocs.io/en/latest/intro_to_qc.html
- Karrot_Kream 9y agoDo you guys provide access to actual quantum/hybrid computers now or is it all simulated?
- deleted 9y ago[deleted]
- wzeng 9y agoSigning up automatically gives you access to run on the simulator. For select users, we are providing some limited access to one of our prototype quantum processors. It's the one discussed in this paper [0]. This initial access doesn't allow a user to run full quantum programs like on the simulator, but but one can test out a few interesting experiments. You can read about what experiments are available here [1]. If you'd like to apply to run some experiments on our hardware then email us with some information about you and your interests at support@rigetti.com 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_Parametric_Entangling_Gates_on_a_Multi-Qubit_Lattice.pdf http://www.rigetti.com/papers/Demonstration_of_Universal_Par... [1] http://pyquil.readthedocs.io/en/latest/qpu.html http://pyquil.readthedocs.io/en/latest/qpu.html
- Karrot_Kream 9y agoHow many issues are there going from the simulator to the practical circuit? I've had issues with the IBM computers. Thanks for all the cool stuff to play with!
- wzeng 9y agoWe haven't integrated arbitrary circuit execution features in yet, but when we do we'll make the transition as smooth as possible. 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.
- deleted 9y ago[deleted]
- drdre2001 9y agoYour GitHub account [0] gives Common Lisp some love. Why did you choose to use this language? Specifically, for the implementation of your Quantum Virtual Machine? [0]https://github.com/rigetticomputing https://github.com/rigetticomputing
- reikonomusha 9y agoThat's my doing. 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. [0] https://arxiv.org/abs/1608.03355 https://arxiv.org/abs/1608.03355 [1] http://www.sbcl.org/ http://www.sbcl.org/
- teafaerie 9y agoSo if I understand it right this process requires some pretty specialised and delicate equipment... for instance you have to be able to get Helium3 down to something like as cold (compared to us) as the sun is hot. For what I'm asking it doesn't matter if that is technically true... point is you need some pretty fancy technology. 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?
- reikonomusha 9y agoI don't know whether or not we will have the technology in the future to eliminate the need for such environments. Different kinds of qubits are an active research activity. Ions, dots, diamond vacancies, etc. 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.
- teafaerie 9y agoThanks. That helps me to think about it in a more realistic and pragmatic way. Good analogy!
- deleted 9y ago[deleted]
- deleted 9y ago[deleted]
- teafaerie 9y agoAlso what percentage of the engineers at Rigetti actually think that you are in any sense "leveraging the multiverse" with this sort of technology, and how many of you prefer an alternative explanation? 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...
- reikonomusha 9y ago@dangirsh is polling people at the company now to answer this question! 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.
- dangirsh 9y agoI think this is the best question so far :) 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 https://en.wikipedia.org/wiki/Many-worlds_interpretation [2]: https://plato.stanford.edu/entries/qm-everett/ https://plato.stanford.edu/entries/qm-everett/ [3]: http://www.preposterousuniverse.com/blog/2013/01/17/the-most-embarrassing-graph-in-modern-physics/ http://www.preposterousuniverse.com/blog/2013/01/17/the-most... [4]: https://www.youtube.com/watch?v=24YxS9lo9so https://www.youtube.com/watch?v=24YxS9lo9so
- maimaiml 9y agoHi there! I see CL repositories on github too ? Do you guys also actively use Lisp at Rigetti ?
- deleted 9y ago[deleted]
- reikonomusha 9y agoAnswered here: https://news.ycombinator.com/item?id=14598948 https://news.ycombinator.com/item?id=14598948
- juliangoldsmith 9y agoWhat is the state of languages for programming quantum computers? 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?
- dangirsh 9y agoWe have a Python library called pyQuil [1] for writing high-level programs for quantum computers. The "assembly" you mentioned is Quil [2], which we don't expect most users to use directly. 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/ https://pyquil.readthedocs.io/en/latest/ [2]: https://medium.com/@rigetticomputing/introducing-quil-a-practical-quantum-instruction-set-architecture-a684f0590a0c https://medium.com/@rigetticomputing/introducing-quil-a-prac... [3]: https://www.microsoft.com/en-us/research/project/language-integrated-quantum-operations-liqui/ https://www.microsoft.com/en-us/research/project/language-in... [4]: http://www.mathstat.dal.ca/~selinger/quipper/ http://www.mathstat.dal.ca/~selinger/quipper/ [5]: https://arxiv.org/pdf/1608.03355.pdf https://arxiv.org/pdf/1608.03355.pdf
- ConAntonakos 9y agoI read this as "Bighetti" from HBO's Silicon Valley.