As the rubber begins to meet the road for quantum computing, the conversation is shifting from one about the practicality of hardware to how future users will interface with quantum systems.
We have covered quite a bit about programming quantum machines over the last few years. From discussions about designing software frameworks that can automatically offload quantum and classical parts of an application to language efforts like Q# and other toolkits for developing on remote quantum computers, there seem to be more developer efforts than devices.
We are adding to this mix yet another quantum development platform that we learned about in more detail this year at the International Supercomputing Conference (ISC18) called Project Q, a standalone language like Q# but than is completely Python based, Apache 2 licensed, and ready to snap into any cloud-based quantum system available (although the team focused on the IBM Quantum Experience cloud over others in its descriptions).
Project Q is a Python-embedded domain-specific language. The framework allows testing of quantum algorithms through simulation and enables running them on actual quantum hardware using a back-end connecting to the IBM Quantum Experience cloud service. Through extension mechanisms, users can provide back-ends to further quantum hardware, and scientists working on quantum compilation can provide plug-ins for additional compilation, optimization, gate synthesis, and layout strategies.
According to Thomas Häner, who founded the effort in 2015 and still leads development, the real driver for finding a portable, open language that can fit many devices in theory is that the crossover point when quantum makes more sense than classical is near for certain applications. One example is in quantum chemistry where the problem sets are hitting scalability limits and could benefit from true quantum simulations and easy onboarding.
ProjectQ consists of a high level language to write quantum programs in that is usable by non-quantum experts. This code is fed into the compiler that can directly interface with the IBM quantum cloud while providing resource estimates. The simulator allows users to calibrate and benchmark their code and devices as well as to debug and an emulator shortcuts the simulation wherever possible.
Below is a snapshot of the ProjectQ syntax. The compilation engine allows users to plug in custom mappers and optimizers and other elements and then allocate qubits, quantum registers, and even quantum integers. Operations are applied to these (the “U”) and assigned classical parameters. This is applied to the quantum register.
In the example operation above simply specifying Hamiltonian is a one-shot way to approach solving a quantum chemistry problem in a few lines of code. He also demonstrated similar thin code required for Shor’s algorithm. The team has also build a library set to let users quickly specify functions and has collaborated on specific libraries, including FermiLib, which allows interfacing with classical electronic structure packages that can spit out the circuit to run on a quantum system or simulator.
Häner says that the level of abstraction is so high on Project Q that a group of his computer science students at ETH Zurich who had no quantum physics or computing experience were able to install and set up and use a variation quantum eigensolver after two two-hour teaching sessions.
Sign up to our Newsletter
Featuring highlights, analysis, and stories from the week directly from us to your inbox with nothing in between.