silq

Quantum computing has gained recent traction in the research ground as we are hopeful that it will show real-world use cases in coming years. There is steady research in this area to find the best programming language for the machines. Silq is the new breed as a high-level language for quantum computers researched by a group of Switzerland’s ETH Zurich scientists.

There are other high-level languages for quantum computing of course. As per the researchers, those languages work at a very low abstraction level, which is hard to understand for quantum programmers.

The post you may be interested in – Why Python not the programming language of the future

History of Silq

The history of Silq started its journey from the effort of solving a core problem in quantum computing. As per ETH associate professor of computer science Martin Vechev to analyze and reason about quantum programs for solving a core problem, a language was required to express the problem. Though there are existing languages, those were not ideal for the problem, neither optimal. Hence, the research team looked into the different languages like Microsoft’s Q# or SDK like IBM’s Qiskit.

Though creating a new language out of it was not the fundamental motto, there was a need for some programming language to solve advanced problems in quantum computing. Hence, they started working on the existing languages and found them inadequate. The language they were looking for needed more high-level properties in reasoning about.

We have mentioned many times already that classical languages are not suitable for quantum computation. But why? As per Prof. Vechev, the fundamental challenge with quantum computing is uncomputation (explained later). At the same time, uncomputation is the core of Silq. It is built-in natively in Silq.

Why Use Silq

In Quantum computations, the generation of temporary value is a common phenomenon. When you want to remove those values from considerations, an implicit measurement collapses the state of quantum computing. Hence, to remove these temporary values without inducing an implicit measurement, the existing languages must have some algorithms to uncompute them. Not to mention, this is a significant gap as well roadblock of quantum computing language to classical language. This can result in computation mistakes such as turning to drop of temporary values highly unintuitive.

Silq language solves this problem by automatically bridging the gap by uncomputing temporary values. Silq exploits the fundamental pattern of quantum algorithms. It states that uncomputation can be done in the following scenarios:

  • Classically describing uncomputed value through original evaluation.
  • For uncomputation, the variables are preserved for evaluation.
  • In low-level programming languages understanding the algorithms are difficult. Hence, programmers often make more errors without understanding them. On the contrary, in Silq, the type-checker prevents programmers from making common mistakes. Besides, the Silq team also incorporated the recent inclusions of classical languages in Silq in the context of quantum computing. 
  • Silq produces programs that are shorter than those written in Quipper or Q#. The language use at least 46% lesser code than other quantum languages. Additionally, it uses a lesser number of quantum primitives.
  • For the time being, Silq is not yet run on any existing quantum hardware. Instead, the researchers use their own emulator to test the assumptions. The compilation here is two-step processes. High-level intent is expressed first, and then it helps to decide the architecture it will run on and the optimization ways for that architecture.

Benefits of Silq

  • Silq as a quantum language is safe, and its automatic uncomputation enables its novel annotations const and free.
  • The algorithms are simpler to understand as well as shorter in nature.
  • The language enables physical semantics that are intuitive and statically prevents errors. This property is non-existent in existing quantum languages.
  • Silq follows the laws of quantum physics while modifying the program’s quantum state by using intuitive semantics.
  • Silq avoids the notational overhead. As a result, the language achieves lesser static safety in programs.
  • Silq removes garbage or superfluous values automatically that can result in quantum entanglement
  • The language is more compact and quicker
  • The type-checker restricts programmers from making common errors
  • Needs significantly fewer built-in functions, annotations, and gates as compared to Q#

Installation 

Silq can be installed for Linux, Mac, and Windows in two ways – 

  • By Visual studio code plugin – Recommended
  • Install from GitHub

For the complete installation procedure, please refer – https://silq.ethz.ch/install

Final Verdict

Silq supports a descriptive view of the quantum algorithms, which is uncommon among other quantum languages such as Q#, ProjectQ, Quipper, or QWire. Silq has the ability to express the high-level intent of the programmer. The program written in Silq is easier to read and write and incorporate lesser code. No doubt, Silq is going to be the next level of quantum language.

For more programming related details on Silq, please visit their site – https://silq.ethz.ch/

Leave a comment