Silq’s code is remarkedly shorter – 46% than Q# and 38% than Quipper; is easier to read and write, and uses half the number of quantum primitives than other quantum programming languages.
Quantum computers are at a stage where classical computers were at one point in time.
The development of the C language in the 1970s was a breakthrough in classical computing. Before then, algorithms were expressed in assembly language that communicated directly with a computer’s hardware. Although it gave programmers a higher level of control over the machine, these computer programs were long, complex, and hard to debug, thus, limiting its usage and functionality. C changed that for the better. This was easy to use and intuitive language, which opened the world of programming to a much larger audience. So much so that most of the software today is written in C. 2020, is perhaps that moment for quantum computing!
Meet Silq – the world’s first high-level intuitive programming language for quantum computers that can be used by masses to program simply, reliably, and safely.
Here’s a quick roundabout of programming in the quantum world in the backdrop of the rise of Silq.
Taking the Silq Route in Quantum Computing
Silq was created by researchers at ETH Zurich, Switzerland, and like most good breakthroughs, originally, they didn’t set out to create a new quantum language.
Existing quantum programming languages force programmers to explicitly provide for every single operation, which makes the implementation of quantum algorithms tedious and prone to error, says Benjamin Bichsel, one of the researchers.
The identification of this weakness in quantum programming prompted ETH Zurich’s researchers to work on a solution and their two years of work led to the discovery of the first intuitive high-level programming language in quantum computing – Silq.
Similar to programming languages for classical computers, which are designed in a manner that doesn’t require programmers to know the workings of CPU, Silq aims to shield developers from the necessity of knowing every detail of the complexity of quantum computer architecture, and yet allowing them to code and run quantum algorithms successfully.
It is the first quantum language designed around the mindsets of programmers, and not the functionality of the hardware. This approach will make quantum computing more accessible to even non-expert quantum programmers as well as AI Engineers and data scientists who are interested in the field of quantum computing.
Now, before we jump onto how Silq improves upon current quantum languages, we look at a few fundamentals and a major problem that quantum programmers face, which Silq seeks to solve.
Quantum Computing: The Problem of Uncomputation
Quantum computers are built on the principles of both quantum physics and computer science. They differ from regular computers in two ways:
- Basic Unit of Information
Classical computers use ordinary “bits” to encode information, which is in the form of either 0 or 1. Quantum computers, on the other hand, use “qubits” as the basic unit, which can take any combination of 0 and 1 at the same time. A qubit can be visualized as a point on the globe.
Programming the circuits for quantum machines is a real challenge as qubits are far less stable than classical bits thanks to their two key properties – superimposition and entanglement. They even influence one another even when they are not connected physically.
- Disposing of the garbage
Qubits’ property of entanglement leads to a garbage problem. Garbage or temporary values (which are no longer needed) are always produced during a computation. While dropping off these values requires no action in classical computing, in quantum computing the process needs to be explicitly performed through uncomputation, or else these temporary values can creep back into the computation and derail the calculation. Writing an expression (a+b)-c, for instance, would require an outright application of gates in order to uncompute this value and dispose of intermediary results.
Silq makes the quantum programming easier, cleaner, and more compact with the automatic disposition of the garbage – thus solving a big problem in quantum computing – uncomputation.
Why Silq Is Better Than Current Quantum Languages
Existing quantum languages do not provide a sufficient level of abstraction to the programmers and bind them to superfluous rules. Bichsel, in fact, dubs a few aspects of the current quantum languages as even more low-level than assembly languages. Silq is different. It is the first quantum programming language that:
Benefit #1 Captures the high-level intent of programmers.
The abstraction provided by Silq is near to that of C. It can directly support nested expressions like (x + y) +z, which wouldn’t be so easily written in other quantum languages. It focusses on providing a more descriptive and high-level view on algorithms to the programmer and makes their complication to low-level circuits a second-order concern that can be achieved by a specific compiler. On the contrary, to write quantum algorithms in existing languages – Q#, Qiskit, Cirq, ProjectQ, Qwire, and others – programmers must describe the circuits outrightly so it can apply operations to individual qubits. It takes existing quantum languages to a much low-level of abstraction and makes them error-prone.
- Benefit #2 Is Shorter and Simpler.
It flows from the first. Since Silq is more expressive, it can describe even the complex algorithms in lesser code and with fewer built-in functions, concepts, gates, or annotations – when compared to, say, the widely used quantum language – Q#, which is considered on a more high-level than Qiskit or Cirq.
Silq requires 46% lesser code than Q#. Plus, it uses only half the libraries.
Benefit #3 Removes the Waste Safely and Automatically.
This is one of the greatest innovations of Silq that brings simplicity to quantum programming. The problem of garbage collection has always plagued quantum languages. Silq, like classical computing programming languages, automatically identifies and cleans up the temporary values (those no longer needed for computation) without requiring any intervention from the programmer. It is the first quantum programming language to safely handle uncomputation (also the source of the other two benefits mentioned before).
Benefit #4 Incorporates the latest classical computing techniques.
Silq has tried to bring in the simplicity of classical computing to the quantum world. It promises to facilitate the technology transfer of over half a century of programming and analysis techniques developed for classical computers to quantum computing. This coupled with the fact that Silq’s features can extend beyond Silq and be incorporated into other quantum languages, including Q#, makes Silq nothing short of a coding revolution for quantum computers.
Toward “Quantum Supremacy”
The development of a high-level quantum language was always prophesized to be the next logical step in quantum computing, and now it has arrived.
The hope with Silq is that it will lower the entry barrier for non-specialist quantum developers and AI engineers into the field by making the life of programmers easy through its faster, more intuitive, more compact, and easier to understand code. In doing so, expediting the advances in quantum computing – from material sciences to deep learning.
Silq is available for free on GitHub for the enthusiasts to try. While still in the research phase, it potentially stores the key to full-scale quantum computing by triggering new inquiries and a wider quantum research community, just what C did for classical computing 50 years ago!