into the quantum computing mesh with a new programming language
Some computer scientists are so eager to work work quantum computers, they created a new language to make working with quantum circuits easier.
Quantum computers are slowly but surely arriving, and while they won’t be able to create brand new synthetic intelligences where modern computers have failed, or will even be faster for most tasks typical users will need to execute, they’ll be very useful in certain key areas of computing as we know it today. These machines aren’t being created as a permanent replacement to your laptop but to solve what are known as BPQ problems which will help your existing devices and their direct descendants run more securely and efficiently route torrents of data from the digital clouds. In computational complexity theory, BPQ problems are decision problems that could be performed in polynomial time when using superposition and quantum entanglement is an option for the device. Or to translate that to English, binary, yes/no problems that we could solve pretty efficiently if we could use quantum phenomena. The increase in speed comes not from making faster CPUs or GPUs, or creating ever larger clusters of them, but from implementing brand new logical paradigms into your programs. And to make that easier, a new language was created.
In classical computing, if we wanted to do factorization, we would create our algorithms then call on them with an input, or a range of inputs if we wanted to parallelize the calculations. So in high level languages you’d create a function or a method using the inputs as arguments, then call it when you need it. But in a quantum computer, you’d be building a circuit made of qubits to read your input and make a decision, then collect the output of the circuit and carry on. If you wanted to do your factorization on a quantum computer — and trust me, you really, really do — then you would be using Shor’s algorithm which gets a quantum circuit to run through countless possible results and pick out the answer you wanted to get with a specialized function for this task. How should you best set up a quantum circuit so you can treat it like any other method or function in your programs? It’s a pretty low level task that can get really hairy. That’s where Quipper comes in handy by helping you build a quantum circuit and know what to expect from it, abstracting just enough of the nitty-gritty to keep you focused on the big picture logic of what you’re doing.
It’s an embedded language, meaning that the implementations of what it does is handled with an interpreter that translates the scripts into its own code before turning into bytecode the machine that it runs on can understand. In Quipper’s case the underlying host language is Haskell, which explains why so much of its syntax is a lot like Haskell with the exception of types that define the quantum circuits you’re trying to build. Although Haskell never really got that much traction in a lot of applications and the developer community is not exactly vast, I can certainly see Quipper being used to create cryptographic systems or quantum routing protocols for huge data centers kind of like Erlang is used by many telecommunications companies to route call and texting data around their networks. It also begs the idea that one could envision creating quantum circuitry in other languages, like a QuantumCircuit class in C#, Python, or Java, or maybe a quantum_ajax() function call in PHP along with a QuantumSession object. And that is the real importance of the initiative by Quipper’s creators. It’s taking that step to add quantum logic to our computing.
Maybe, one day quantum computers will direct secure traffic between vast data centers, giving programmers an API adopted as a common library in the languages they use, so it’s easy for a powerful web application to securely process large amounts of data obtained through only a few lines of code calling on a quantum algorithm to scramble passwords and session data, or query far off servers will less lag — if those servers don’t implement that functionality on lower layers of the OSI Model already. It could train and run vast convolutional neural networks for OCR, swiftly digitizing entire libraries worth of books, notes, and handwritten documents with far fewer errors than modern systems, and help you manage unruly terabytes of photos spread across a social networking site or a home network by identifying similar images for tagging and organization. If we kept going, we could probably think of a thousand more uses for injecting quantum logic into our digital lives. And in this process, Quipper would be our jump-off point, a project which shows how easily we could wrap the weird world of quantum mechanics into a classical program to reap the benefits from the results. It’s a great idea and, hopefully, a sign of big things to come.