BT

InfoQ Homepage News Microsoft Open-Sources Q#, its Language for Quantum Computing

Microsoft Open-Sources Q#, its Language for Quantum Computing

Bookmarks

At its Build 2019 conference, Microsoft has announced it will open-source parts of its Quantum Developer Kit, including the Q# compiler and quantum simulators, this summer on GitHub.

Microsoft announced its Quantum Developer Kit and made it available to developers at the end of 2017, along with its plans to build a quantum computer of its own.

In contrast to other companies that have joined the quantum race, including Google, IBM, and others, Microsoft chose to create a new programming language, called Q# in assonance with C# and F#, to describe quantum computations.

Our high-level programming language, Q#, was designed to address the challenges of quantum information processing; it is integrated in a software stack that enables a quantum algorithm to be compiled down to the primitive operations of a quantum computer.

Q# is a domain-specific language with a native type system that, in addition to "classical" primitive types, also includes a direct representation of quantum abstractions, such as qubits, quantum operations and operators, and so on. Similarly, its flow-control instructions, besides for and repeat loops, return statements, etc., also comprise a few statements that can only be used within quantum operations. Those include using, which lets acquire a qubit, and borrowing, which grants temporary access to a qubit.

The following is an example of a Q# program that is able to set a qubit in a given state by looking at it and, if it is not in the required state, flipping it:

namespace Quantum.Bell {
    open Microsoft.Quantum.Primitive;

    operation Set (desired: Result, q1: Qubit) : () {
        body {
            let current = M(q1);
            if (desired != current) {
                X(q1);
            }
        }
    }
}

Microsoft Quantum Simulator is able to simulate up to 30 logical qubits using 16GB of memory. Microsoft claims that programs written for the simulator will run unmodified on their quantum computer, when available.

On the hardware front, Microsoft is pursuing a topological quantum processor using topological qubits. Topological qubits store information globally, within its topological structure, like it happens with a string, which you can say whether it is knotted or not only by looking at the whole picture and not to any of its local properties.

According to Microsoft, the open sourcing of their Quantum Developer Kit will mostly benefit programmers who want to contribute to the evolution of this evolving field, and all those institutions that require the use of open-source software and will be in a condition to use Q# for their research.

Rate this Article

Adoption
Style

Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Community comments

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

BT

Is your profile up-to-date? Please take a moment to review and update.

Note: If updating/changing your email, a validation request will be sent

Company name:
Company role:
Company size:
Country/Zone:
State/Province/Region:
You will be sent an email to validate the new email address. This pop-up will close itself in a few moments.