Skip to main content

Meet Silq: The first intuitive programming language for quantum computers

Image used with permission by copyright holder

The creation of the C programming language was a massive milestone for classical computing. Developed by Dennis Ritchie and Ken Thompson at AT&T Bell Laboratories in the early 1970s, C was an easy programming language for would-be computer coders to learn. At the time, most computer programs were written in what is called assembly language, which communicates directly with the computer’s hardware. But while assembly programs gave users unparalleled control over their machines, they were long, complex, and difficult to debug. C was different. It was easy, intuitive, and helped open up computer programming to an entirely new audience. It was nothing short of a revolution in computing.

Now, nearly 50 years after C was created, computer scientists have reached a similar milestone: A new programming language that brings the same level of coding simplicity to quantum computing.

Recommended Videos

Drawing parallels between the development of classical computers and the state of quantum computing today is difficult. Quantum computers, for those unfamiliar with them, represent the future of computing as we know it. Unlike a classical computer, which encodes information as a series of ones and zeroes, the “qubits” in a quantum computer can be either a one, a zero, or both at the same time. Quantum computers operate under different, quantum rules to classical computers — and promise to eventually be almost unimaginably fast when it comes to crunching data and carrying out calculations.

They are, needless to say, a very different beast from classical digital computers. But if such a timeline comparison was to be made between present-day quantum computers and the evolution of classical computers, the 1960s or early 1970s probably isn’t too far off as an analogy. Modern quantum computers fill entire rooms, just like the mainframe computers in the 60s and 70s before personal computers became the norm.

IBM Quantum Computing | Scientists working on a quantum computer
IBM

Today, close to a quarter-century has passed since the creation of the world’s first actionable 2-qubit quantum computer in 1998. In the 60s and 60s, a similar period had elapsed since the switching on of ENIAC, the first general-purpose digital computer, in 1946. Heck, the world of quantum computer games is even starting to open up here in 2020. Just like it did with games such as Spacewar! in the 60s. In both cases, there was, or is, a whole lot of promise ahead for both modes of computing.

What we haven’t had until now has been quantum computing’s answer to C: a programming language accessible to the masses that allows said computers to be programmed simply, reliably, and safely. Perhaps until now, that is.

All roads lead to Silq

This is where Silq, a new quantum programming language developed by researchers at ETH Zurich in Switzerland, comes into play. Silq is, its creators claim, the world’s first high-level quantum language. It aims to bridge the conceptual gap that currently exists between classical and quantum languages. In doing so, the freely available language will hopefully help to lower the entrance barrier for non-expert quantum programmers. You know, kind of like what C did for classical computers all those years ago!

“It is tempting to claim that existing quantum languages are roughly as expressive as assembly languages,” Benjamin Bichsel, one of the researchers who created Silq, told Digital Trends. “[That’s because] they force the programmer to explicitly provide every single operation that should be performed by the computer. However, existing quantum languages are [really] more low-level than assembly languages in some aspects: They typically describe operations on individual quantum bits, which is more in line with low-level hardware description languages like VHDL or Verilog.”

Image used with permission by copyright holder

The level of abstraction provided by Silq, Bichsel said, is closer to that of C. It directly supports subexpressions, like (a+b)+c, which can’t be easily written in existing quantum languages. Unlike existing quantum languages, Silq enables a descriptive view on quantum algorithms for expressing the high-level intent of programmers. The compilation of these algorithms to low-level quantum circuits becomes a second-order concern that can be handled by a specialized compiler. Bichsel believes that analyzing Silq programs will be easier than analyzing programs in existing quantum languages because Silq programs are less focused on low-level details. This could help facilitate the developments of analysis tools supporting developers.

“Currently, the main approach to quantum computation is at the machine code level, or by using and adapting tools that others have already built,” James Wootton, an IBM researcher specializing in quantum computing, who was not involved with the Silq project, told Digital Trends. “This is the best way to ensure that it will be able to run on the devices available over the next decade. All current frameworks, like Qiskit from IBM Quantum, are set up in this way. Quantum programming in this way is much like the classical logic circuits that I used to assemble in my shed as a kid, so it is more intuitive than some might assume. But it is certainly not the method that all the quantum programmers of the future will want to use.”

For those who want to design their own quantum algorithms, rather than relying on pre-made quantum algorithm frameworks, solutions like Silq could be very interesting.

“It is good to see that more computer scientists are becoming interested in this problem, and implementing their ideas as software that people can actually use,” Wootton said. “This could allow people from outside the field of quantum computing to come up with new ideas for how to use these devices. It would be great to see that happen, and get new perspectives.”

Cleaning out the garbage

Of course, as noted up top, the comparison with programming languages like C isn’t exact. Quantum computers work fundamentally differently to classical computers, meaning that there are different problems to be addressed and solved.

IBM Quantum Computing feature
Brad Jones/Digital Trends

One of the main ideas behind Silq involves dealing with so-called “garbage” created during computation. This is something that classical computers are not so sensitive to, but which can cause errors for quantum computer calculations. The “garbage” finds its way into quantum programming because of the way that quantum computers calculate tasks using several intermediate steps; creating intermediate results or temporary values in the process. The process of getting rid of these superfluous values is made more difficult as a result of a phenomenon called quantum entanglement. Silq eliminates these values automatically.

“Silq addresses a fundamental problem that significantly complicates the development of quantum programs, compared to classical programs,” Bichsel said. “The key benefit of Silq is that it automatically handles uncomputation of temporary values. Unlike in the classical setting, where we can simply forget about temporary values that are produced during a computation, discarding temporary values in the quantum setting requires explicit operations to remove these values from consideration.”

Silq is already publicly available on code repository GitHub, licensed under the free and open-source Boost Software License 1.0. Because most of us don’t have a quantum computer at our disposal, there’s an ​extension available for ​Visual Studio Code​, thereby allowing developers to type-check and simulate Silq code on classical computers.

After all, if quantum computing’s as big as many predict, you never know when you’re going to be able to use it!

Topics
Luke Dormehl
Former Digital Trends Contributor
I'm a UK-based tech writer covering Cool Tech at Digital Trends. I've also written for Fast Company, Wired, the Guardian…
Honeywell is making a leap from thermostats to quantum computers
honeywell quantum computers computing

Honeywell is best known for the iconic round thermostat you've probably got on a wall in your house or apartment. The company has since stopped making thermostats, even smart ones, leaning instead on aerospace, defense, materials science, chemicals, and more -- all crucial elements for building a quantum computer, it turns out. And for the past decade, that's exactly what Honeywell Quantum Solutions has been quietly working on.

Quantum computers are generally used to solve problems involving massive amounts of data more easily, like optimizing the routes airplanes fly. As Tony Uttley, the president of Honeywell Quantum Solutions, told Digital Trends, quantum computers have “magical-type qualities around them” because of the speed at which these complex problems can be solved.

Read more
Coronavirus could meet its match with Folding@Home’s crowdsourced computing
Catalog DNA Data Storage

As Covid-19, also known as coronavirus, spreads across the globe, people are scrambling to look for a possible cure from the contagious virus, but it could be as simple as lending your computer’s unused power. 

Folding@Home (FAH) is a distributed computing project that uses spare processing power from people’s computers to aid in disease research. FAH has joined lab researchers to work toward a cure for the coronavirus and is encouraging people to download the free program to their computers.

Read more
Inside the weird, wild, and wondrous world of quantum video games
quantum computing video games ibm q research 6

In 1950, a man named John Bennett, an Australian employee of the now-defunct British technology firm Ferranti, created what may be history’s first gaming computer. It could play a game called Nim, a long-forgotten parlor game in which players take turns removing matches from several piles. The player who loses is the one who removes the last match. For his computerized version, Bennett created a vast machine 12 feet wide, 5 feet tall, and 9 feet deep. The majority of this space was taken up by light-up vacuum tubes which depicted the virtual matches.

Bennett’s aim wasn’t to create a game-playing machine for the sake of it; the reason that somebody might build a games PC today. As writer Tristan Donovan observed in Replay, his superlative 2010 history of video games: “Despite suggesting Ferranti create a game-playing computer, Bennett’s aim was not to entertain but to show off the ability of computers to do [math].”

Read more