5 ms·
Alongside the development of quantum hardware, which has ever-growing qubit numbers and ever-increasing fidelities and coherence times, there’s also software th
by reikonomusha 7y ago
Alongside the development of quantum hardware, which has ever-growing qubit numbers and ever-increasing fidelities and coherence times, there’s also software that’s getting more and more sophisticated. Most quantum computer providers have their own APIs for programming their machines [1,2,3]. Python seems to be the popular choice for these APIs.
But one piece of software I’ve been particularly interested in, and indeed contribute to, is Rigetti’s open source optimizing compiler called quilc [4,4’], which is a sort of a GCC/Clang for quantum computers. It’s the only open-source compiler of it’s kind. They also have a high-performance simulator [5], which is used sort of like a debugger. (Perhaps surprisingly, both are written in Common Lisp.)
What is very useful about the compiler is that it is retargetable, and can compile for even IBM’s architectures of tomorrow. You just give it an “isa” at the command line describing how many qubits it has, how they’re connected, and which gates they support, and quilc will happily compile and optimize your program for that architecture.
[1] Rigetti’s pyQuil https://github.com/rigetti/pyquil https://github.com/rigetti/pyquil
[2] IBM’s Qiskit https://github.com/Qiskit/qiskit https://github.com/Qiskit/qiskit
[3] Google’s Cirq https://github.com/quantumlib/Cirq https://github.com/quantumlib/Cirq
[4] quilc https://github.com/rigetti/quilc https://github.com/rigetti/quilc
[4’] quilc at FOSDEM https://youtu.be/qwfMzzKJDXI https://youtu.be/qwfMzzKJDXI
[5] quantum virtual machine https://github.com/rigetti/qvm https://github.com/rigetti/qvm
- Iwan-Zotow 7y ago> It’s the only open-source compiler of it’s kind. Huh?!? Microsoft Q# was open sourced this spring, I believe
- reikonomusha 7y agoThat is a language and programming framework, not an optimizing compiler. (To my knowledge, it also doesn’t have any real quantum computer backends.)
- 1000units 7y agoWow, they don't have a compiler for their "language and programming framework"? That's a pretty embarrassing oversight.
- imglorp 7y agoCommon Lisp: The Connection Machine (Thinking Machines Corp) used a variant called *Lisp. I wonder if that was an influence? http://www.softwarepreservation.net/projects/LISP/starlisp/starlisp-reference-manual-version-5-0.pdf http://www.softwarepreservation.net/projects/LISP/starlisp/s...
- 1000units 7y agoThis harkens back further to when Descartes wrote "Cogito, ergo sum", the first recorded instance of a Lisp program. Amazing.
- lispm 7y agoEarlier, the introduction of the Lisp Machine enabled the first Lisp programmers Adam and Eve to abandon bra and fig-leaf.
- monocasa 7y agoPart of lisp is just that it's really easy to sort of 80/20 rule you a compiler or DSL. In new spaces that haven't been fully explored, lisp is awesome for letting you iterate on fundamentals of a language design before you put the work into a full language.
- deleted 7y ago[deleted]
- bschmitt 7y ago> It’s the only open-source compiler of it’s kind. There other compilers/transpilers out there, e.g., ScaffCC[1] and Qubiter[2]. Also inside IBM's framework you have one: Qiskit Terra[3]. You can find more in [4]. > What is very useful about the compiler is that it is retargetable. Most, if not all, of them have this characteristic. Using Qiskit Terra you can definitely target Rigetti’s machines. You just need to provide the architecture specification, i.e., number of qubits and their coupling graph. As a side note, one really annoying characteristic in Rigetti's quilc is the impossibility of turning off optimizations. [1] https://github.com/epiqc/ScaffCC https://github.com/epiqc/ScaffCC [2] https://github.com/artiste-qb-net/qubiter https://github.com/artiste-qb-net/qubiter [3] https://github.com/Qiskit/qiskit-terra https://github.com/Qiskit/qiskit-terra [4] https://github.com/qosf/os_quantum_software https://github.com/qosf/os_quantum_software
- reikonomusha 7y agoThe operative phrase in that quote, and is by no means intended to be a technicality, is “of its kind.” In my opinion, quilc is in a class of its own, being fully automatic, retargetable, and optimizing, without the participation of an API or any sort of “setup” code. (This includes retargeting to every known gate set, not just CNOT or CZ.) Code goes in, code comes out, just like GCC or Clang. Optimizations may be completely turned off with the directive PRAGMA PRESERVE_BLOCK [0]. Other optimizations can be selectively enabled and disabled with command line options or pragmas. But, as with GCC, the user does not have full control over every aspect of optimization and transformation, but rather just a set of coarse-grained controls. Otherwise, it wouldn’t be a compiler so much as a library/framework for program manipulation. But one thing is true, quilc is intended to be fully automatic, not requiring (or even allowing) the user to list compilation “passes” or “transpilers”, which is typically what a software engineer expects when their primary concern is writing and running code. Many of the links you’ve listed are either “compilation frameworks” (like scaffcc, akin to LLVM), unitary factorizers (like qubiter, though I’m less familiar), and so on. [0] http://docs.rigetti.com/en/stable/compiler.html http://docs.rigetti.com/en/stable/compiler.html
- bschmitt 7y ago