At ETH Zurich, computer scientists have developed the first programming language that can be applied to program quantum computers in a safe, simple, and reliable way, similar to classical computers. Such advances have made programming quantum computers easier.
Programming quantum computers is still a challenge for researchers, which is why I’m so excited that we can now continue ETH Zurich’s tradition in the development of quantum computers and programming languages.
Martin Vechev, Computer Science Professor, Secure, Reliable and Intelligent Systems Lab (SRI), ETH Zurich
Vechev added, “Our quantum programming language Silq allows programmers to utilize the potential of quantum computers better than with existing languages, because the code is more compact, faster, more intuitive and easier to understand for programmers.”
Soon, Vechev will present Silq to other experts in the field at PLDI 2020, a conference for programming languages. For the purposes of discussion, adoption, and further advancement, he and his colleagues have also launched Silq on its own website (silq.ethz.ch).
In the past 10 years, quantum computing has gained considerable attention since these computers, which run based on the principles of quantum physics, exhibit immense potential.
At present, a majority of the researchers consider these computers will someday solve specific problems faster compared with classical computers. This is because they perform their calculations by using entangled quantum states where several bits of information overlap at a specific point in time.
This implies that in the coming years, quantum computers could efficiently solve problems that cannot be solved by classical computers within a reasonable timeframe.
Such a quantum supremacy is yet to be demonstrated definitively. But recently, certain crucial technical advances have been realized. In late summer 2019, a quantum computer successfully solved a problem—though a very particular one—very quick compared to the fastest classical computer.
Specific “quantum algorithms,” or computational strategies, are known to be faster compared to classical algorithms and do not use the potential of quantum computers. However, so far, such algorithms cannot be calculated on today’s quantum hardware since, at present, quantum computers are still highly error-prone.
Expressing the Programmer’s Intent
The potential of quantum computation can only be used with the most advanced technology, and a quantum programming language is also required to describe quantum algorithms. Theoretically, an algorithm is a “recipe” to solve a problem; a programming language describes the algorithm to enable a computer to carry out the required calculations.
At present, quantum programming languages are closely related to particular hardware; simply put, they precisely explain the behavior of the fundamental circuits. Such “hardware description languages” are error-prone and unmanageable for programmers as it is essential to elaborately detail the individual programming instructions to specifically describe the specifics required to execute quantum algorithms.
This is exactly where Vechev and his colleagues play a role with their development of Silq.
Silq is the first quantum programming language that is not designed primarily around the construction and functionality of the hardware, but on the mindset of the programmers when they want to solve a problem—without requiring them to understand every detail of the computer architecture and implementation.
Benjamin Bichsel, Doctoral Student, ETH Zurich
Bichsel belongs to Vechev’s group and supervises the development of Silq.
Computer scientists make a reference to computer languages that extract the technical details of the particular type of computer as high-level programming languages. Silq is the first-ever high-level programming language developed for quantum computers.
High-level programming languages tend to be more expressive, that is, they can elucidate even complex algorithms and tasks with less code. This renders them highly comprehensible and simpler to use for programmers. In addition, they can be used with various computer architectures.
Eliminating Errors Through Automatic Uncomputation
The ultimate novelty and simplification that Silq enables in quantum programming languages are related to a source of errors that has impeded quantum programming to date. A task is calculated by a computer in various intermediate steps, wherein temporary values or intermediate results are created.
Classical computers relieve the memory by automatically removing these values. Computer scientists term this “garbage collection,” as the superfluous temporary values are erased.
When it comes to quantum computers, quantum entanglement makes this disposal more complicated: the values calculated earlier can interact with the existing ones, thus hampering the correct calculation. Thus, a more advanced technique known as uncomputation is required to erase such temporary values in quantum computers.
“Silq is the first programming language that automatically identifies and erases values that are no longer needed,” noted Bichsel. The computer scientists realized this by using their knowledge of classical programming languages: the automatic uncomputation technique they developed involves using only programming commands free of any unique quantum operations—they are “qfree,” as Vechev and Bichsel note.
“Silq is a major breakthrough in terms of optimising the programming of quantum computers; it is not the final phase of development,” stated Vechev. Although several open questions still exist, since Silq is easier to perceive, Vechev and Bichsel believe they can stimulate not just the further advancement of quantum programming languages but also the theory and development of new quantum algorithms.
Our team of four has made the breakthrough after two years of work thanks to the combination of different expertise in language design, quantum physics and implementation. If other research and development teams embrace our innovations, it will be a great success.
Benjamin Bichsel, Doctoral Student, ETH Zurich
Bichsel, B., et al. (2020) Silq: a high-level quantum language with safe uncomputation and intuitive semantics. PLDI 2020: Proceedings of the 41st ACM SIGPLAN Conference on Programming Language Design and Implementation. doi.org/10.1145/3385412.3386007.