203 points · by Anon84 · 7y ago · 166 comments
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
[2] IBM’s Qiskit https://github.com/Qiskit/qiskit
[3] Google’s Cirq https://github.com/quantumlib/Cirq
[4] quilc https://github.com/rigetti/quilc
[4’] quilc at FOSDEM https://youtu.be/qwfMzzKJDXI
[5] quantum virtual machine https://github.com/rigetti/qvm
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
[2] https://github.com/artiste-qb-net/qubiter
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.
This turn off compilation itself. If you read the documentation you referred me to, you will notice that code inside the directive won't be guaranteed to be legal QPU code after compilation.
> 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.
I don't know what you mean by "compilation framework" nor where you are drawing the line of what is a compiler, but ScaffCC is a compiler. It is built using llvm (so it is akin to Clang, not llvm) and compiles Scaffold to QASM.
http://www.softwarepreservation.net/projects/LISP/starlisp/s...
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.
Huh?!?
Microsoft Q# was open sourced this spring, I believe
Yes, you can scale up vacuum tube computers to solve meaningful tasks, but it was barely more cost effective than human "calculators" except for specific applications. I think the same analogy applies for modern day quantum computers and classical computers.
If quantum computers happen (which is still a big if) then mostly two things will happen:
1. Cryptographers will have to switch many of their algorithms and things like TLS will get a bit slower and will need a bit more data transmitted.
2. It's interesting for science, e.g. for simulations.
For the regular dev I'm pretty sure it won't have any meaningful impact.
Also even if quantum computers happen they won't be on our desks any time soon. It'll probably more like "you can rent a QC for specialized tasks in the cloud, but it will be relatively expensive and if you don't really need one you'll use something else".
I'm not aware of any symmetric cipher that the industry in broad consensus would consider "better" than AES-256.
As to whether it will be usable within 20 years, time will tell.
[0] - https://www.nature.com/articles/nature23879
[1] - https://ai.google/research/teams/applied-science/quantum/ - see 'Near-Term Applications'
I don't really know much about the topic but my understanding is that it could potentially be more dense then the theoretic limit of current transistor sizes.
Current sizes of quantum bits: cavities are cm to mm scale; transmons and photonics can be much smaller, but nowhere near the size of modern transistors; ions need to be trapped in something and usually the scale is not better than the other options.
There is the hope that qubits can be made in silicon and use lithographic technologies, but then at best we will reach the density of current CPUs (but such a thing is science fiction at the moment).
Science fiction has hypothesized about quantum computing that involves macroscopically-sized bits of carefully constructed matter running a number of qubits best described with scientific notation, but it's not clear how one would set up problems or read anything out of such a thing.
I think the biggest change will be that quantum computing can really kill at machine learning, upping the numbers of nodes in neural networks with an exponential relationship to the number of qubits.
It might turn neural nets into a neat toy that Facebook uses to show us sort-of good ad predictions to something that really cuts into a wide range of things that only humans are capable of doing.
This is not true. Some parallelizable tasks will benefit from massive speed ups but most won't.
https://www.quantamagazine.org/quantum-supremacy-is-coming-h...
From the article
Quantum supremacy, we don’t use [the term] at all, said Robert Sutor, the executive in charge of
IBM’s quantum computing strategy. We don’t care about it at all.
The article also mentions practical considerations such as "quantum advantage", fault tolerance, and other initiatives competing with IbM.
Relevant
https://wikipedia.org/wiki/Quantum_supremacy
https://medium.com/@jackkrupansky/what-is-quantum-advantage-...
True. Another way he could have responded is: We don't care if quantum computers actually do anything useful, only that we can use the PR to get positive stock price movement.
I don't think they have just yet. There is a simulated QC on conventional hardware with around 50 qbits. We are close, though, it might still happen this year.
TLDR quantum computing is going nowhere (excluding the low probability of a breakthrough in the field)
Isn't that a contradiction?
I think however that once the hardware part is solved, the software part will move quickly, since people have been working on the software since long before the hardware existed.
yet here we are, still using the same old hard disks. we have SSDs now, at least.
One key aspect of that is that all of the qubits are entangled. The qubit isn't in more than two states, but in 2 states at once, and N qubits are in 2^N states at once. It's not quite as simple as that: you can't really just set up any algorithm in a quantum computer the way you would with a classical one. But for those problems amenable to quantum computation (including, notably, prime factoring), they can be solved very fast.
With 2^53 qubits we should be able to factor some very, very large prime numbers.
https://arxiv.org/abs/1301.7007
"Pretending to factor large numbers on a quantum computer (2013)"
"Of course this should not be considered a serious demonstration of Shor’s algorithm. It does, however, illustrate the danger in “compiled” demonstrations of Shor’s algorithm. To varying degrees, all previous factorization experiments have benefited from this artifice. While there is no objection to having a classical compiler help design a quantum circuit (indeed, probably all quantum computers will function in this way), it is not legitimate for a compiler to know the answer to the problem being solved. To even call such a procedure compilation is an abuse of language."
More references:
https://crypto.stackexchange.com/questions/59795/largest-int...
https://www.schneier.com/blog/archives/2009/09/quantum_compu...
>Instead, it came up with an answer to the "order-finding routine," the "computationally hard" part of Shor's algorithm that requires a quantum calculation to solve the problem in a reasonable amount of time.
They weren't the first team to do this, either, they just miniaturized parts of the hardware.
QC is about setting up interference patterns between the qbits, it is fundamentally unlike classical computing. For some problems algorithms can be designed that use those interferences to compute things, like the famous Shor's algorithm for polynomial time prime factoring.
QC speeds things up only in the cases where an asymptotically faster algorithm can be designed this way, it is not a general purpose parallelization mechanism.
And we don't know many things it speeds up for sure! For example: we don't actually know that there isn't a classical polynomial time prime factors algorithm we haven't found. Here is a recent example of a quantum algorithm leading to the discovery of a classical algorithm that is equivalent to the quantum: https://www.quantamagazine.org/teenager-finds-classical-alte...
Not really. From an information theory perspective, holding two states is the most efficient way of computing. Or at least, there is no speed-up gained from doing computations in any other base than 2.
Quantum computers can be in both states at the same time (as far as that interpretation of quantum mechanics goes). So, if you keep the qubits all in this superposition state, you can calculate multiple things at the same time.
Assuming the cost of operations on each digit is a multiple of its number of states, the most efficient base for computing with arbitrary numbers is 3, which is the closest integer to the optimal base e:
From a physical perspective, holding two states is the most efficient way of computing. I.e. the electronics required to compute in bases other than 2 involve higher power and present difficult challenges.
Explains to 5 different levels of CS knowledge.
>> that can hold more than 2 states
--> that can hold more than 2 states AT THE SAME TIME (in weird quantum conditions)
So you're not trying 00, 01, 10, 11; you're trying [00|01|10 |11] at the same time, as well as other state in between 0 and 1.
So, how much faster are they? A million times faster? A trillion? A googol times faster?
Back of the envelope calculation:
The best classical algorithm takes 10^34 steps. The fastest computer on earth _Summit supercomputer_ runs at 200 petaflops (2.5M cores, ~10^6x faster than your desktop computer)
Actual quantum computers perform at 1 million operations/s per qubit
for 2048-RSA, Shor's algorithm needs 4096 non-noisy qubits (we are far from that) and run in 10^7 steps
So for this particular problem:
Best classical computer (as of today): 1 billion years
An (hypothetical) quantum computer: ~10 seconds
Yeah, a trillion times faster...
I've read articles that debate the existence of any quantum computers. Are we past that now, or are there people out here that would question whether these are real quantum computers?
Sounds natural and obvious, so why haven't I heard this solution to Schrodinger's Cat many times before? Why is Schrodinger's Cat still considered a problem worth discussing ?
The result you cite: they don't even consider those early NMR "computers" to be quantum in any meaningful sense. They're avogadro computers.
you said the number 15 was never factored on a quantum computer - this is false.
You can run as many gates as you want - go ahead and run 4608 gates in qiskit right now - the measurements will be random but you can do it.
IDK where you got that equation for the number of gates but it's probably for the general case - doesn't take into account the fact that different gate sets can be used to reduce the total.
Also confused on the error correction part - the whole point of error correction is to make the coherence time independent of the number of 'gates' in your circuit - so yeah with error correction you get more gates but you also get an effectively infinite coherence time...
The premise of your question is a bit misleading. Quantum computers do not run classical algorithms faster, rather they run algorithms specifically designed to take advantage of the quantum coherence. For many tasks this does not provide an advantage. For some very special (and occasionally useful) tasks, the advantage seems to be exponential. Simulating quantum mechanics (as in chemistry, material design, drug design) is one of these tasks. Some linear algebra tasks are also faster. Lastly, some researchers are hopeful that novel gradient-free optimizations algorithms exist for quantum hardware, but this is a bit more controversial.
Next
https://physics.stackexchange.com/questions/164500/can-exist...
(tldr: noone knows)
Any genuine interpretation of QM will agree on what a quantum computer outputs, because by definition, interpretations are ways of changing the words you drape around a calculation, not the result of the calculation itself. So quantum computers don't support or oppose any genuine interpretations. They only oppose strawmen.