LIQUi|>: A Software Design Architecture and Domain-Specific Language for Quantum Computing

Pronounced as ‘liquid’.

This is a talk by Dave Wecker from Microsoft Research explaining latest in quantum research and Microsoft’s accomplishments to date. Following are the links:




Languages, compilers, and computer-aided design tools will be essential for scalable quantum computing, which promises an exponential leap in our ability to execute complex tasks. LIQUi|> is a modular software architecture designed to control quantum hardware. It enables easy programming, compilation, and simulation of quantum algorithms and circuits, and is independent of a specific quantum architecture. LIQUi|> contains an embedded, domain-specific language designed for programming quantum algorithms, with F# as the host language. It also allows the extraction of a circuit data structure that can be used for optimization, rendering, or translation. The circuit can also be exported to external hardware and software environments. Two different simulation environments are available to the user which allow a trade-off between number of qubits and class of operations. LIQUi|> has been implemented on a wide range of runtimes as back-ends with a single user front-end. We describe the significant components of the design architecture and how to express any given quantum algorithm.

The system is currently over 30,000 lines of code.

Below are my notes and all of the slides from the talk.

There are six quantum technologies presently available:

Ion Traps Works but very slow
Superconducting D-Wave using flux quota as a unit of computation
Linear Optics Very nice, runs at room temperature, very stable, long coherence times, but you need optical bench to do a qubit, so scalability is problematic at this time.
Nitrogen Vacancy center Diamond, diamonds are not perfect, in certain places where you expect carbon there are nitrogen, runs at room temperature but you need to hunt diamonds you can run computations with, not very scalable.
Quantum dots Analogous to Superconductors but using charge instead of flux as a unit of computation.
Topological Noise is your enemy, state of matter that is immune to noise

What’s a killer app?

Will it break cryptography? No!

Quantum simulation is where Feynman started with quantum computing. What is a better system to simulate quantum world than the quantum computer itself? That is where you will get exponential speedups over classical computers.

Machine learning is another area, but you will never get exponential speedups, you are limited to polynomial speedups – still useful.

A qubit is a superposition of 0 and 1. It is either zero or one. If it were in the range between zero and one that would be a probability. Qubit lies on a surface of a 3-sphere in 4D space and defined by a unit vector of alpha and beta.

While on a classical side you deal with a bit, in quantum we work with matrices. Matrices are reversible and a computation can be run either way.

In case of classical it’s a truth table. In quantum, it’s not just zero or one, we are computing all possibilities at once rather than flipping a single bit.

While in classical we have error correction codes (ECC), the problem of noise is very hard in quantum. Noise is anything in the universe that interacted with my qubit! That’s why we run at an extremely low temperature; temperature equals noise.

The big difference is in computation due to the matrix nature of a qubit. One operation on n qubits equates to operations. This where you get massive speedup.

Here’s a breakdown of quantum computing groups at MSR:

Below are Microsoft’s goals with LIQUi|>

You can simulate quantum computer on a classical one, but there are significant limitations because demand for memory doubles for every qubit. Today the limit is about 30 qubits on 32GB of memory. 45 qubits takes a petabyte of main memory. Modern supercomputers cannot get into 40 qubits.

One of the recent papers which describes the simulator can be found here.

Hello Quantum World example:

Here’s how the code looks:

To run the code:

Gates are not built in, you make them:

Following diagram shows how long it takes to simulate Shor’s algorithm. Blue, red, and orange are versions of the simulator. 3 years is reduced to 4 month, and to 4 days – gives a massive speedup.

Error correction is an area of extensive research with problems similar to those in classical computing.

Here’s an example of Steane 7 code:

Quantum Error Correction

Stean Code (Wiki)

Steane’s 7-qubit block code

Example of Steane code for the previous Hello World example:

Noise is very difficult to characterize:

Hamiltonian is what D-Wave machine is doing, it lets you do machine learning and optimizations.

To learn more about D-Wave read the following two papers. First one answered the question: Yes, its quantum! The second one asked: Is it useful?

Quantum annealing with more than one hundred qubits

Defining and detecting quantum speedup

Here’s how to calculate page rank:

Here’s the result of just 256 pages, in the blue is the classical and in the orange – quantum:

There’s a problem with it though which is similar to classical accelerators like GPUs: you have to load data to get results for just one computation, load all of it (entire web) every time you run a computation.

Interesting problems are in chemistry: you need very few qubits to solve problems with many molecules.

Some of the molecules that were simulated in LIQUi|>:

Three papers are available now: first is that ‘yes, it takes few qubits but it runs very slow, you need billions of operations (good news is that it is not infinite, only takes 300 million years)’; second is that ‘ok, but we can do it faster’; the new paper that’s just to come out reduces required time to run to ~300 seconds!

There are easier problems to simulate:

Quantum Fourier Transform example:

‘Stupid question’: How do you draw this?

Download all referenced papers here.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: