Programming Your Quantum Computer
The hardware doesn’t yet exist, but languages for quantum coding are ready to go.
The year is 2024, and I have just brought home my first quantum computer. When I plug it in and switch it on, the machine comes to life with a soft, breathy whisper from the miniature cryogenic unit. A status screen tells me I have at my disposal 1,024 qubits, or quantum bits, offering far more potential for high-speed calculation than all the gigabits and terabytes of a conventional computer. So I sit down to write my first quantum program.
And that’s where I get stuck every time I run through this daydream. I know a little about the basic principles of quantum computation, but I’ve never had a clear vision of what it would be like to write and run programs on a quantum computer. Can I express my ideas in a familiar programming language, with all the usual algorithmic idioms, such as loops and if-then-else statements? Or is the experience going to be completely new and alien—like quantum mechanics itself?
Most of what I’ve read tends to support the new-and-alien thesis. The protocol for solving a problem with a quantum computer is often described like this: Prepare a set of qubits in a suitable initial state, apply a specified series of operations, then measure the final state of the qubits. If all goes well, the measurement will yield the answer to the problem. To me, this process doesn’t sound like computer programming; it sounds like running a physics experiment. I yearn for some other way of describing the computation, closer to my accustomed habits of thought.
Evidently I am not alone in this sentiment. Several high-level programming languages for quantum computers have been developed, even though the computers themselves don’t yet exist. I have been exploring two of these languages, QCL and Quipper, which are surprisingly rich and full-featured. The languages provide a glimpse of how programming might be done when my kiloqubit computer finally arrives.
» Post Comment