Home Computer Hardware Microsoft taps LLVM for quantum computing

Microsoft taps LLVM for quantum computing

by admin
Microsoft taps LLVM for quantum computing

Microsoft has introduced an intermediate representation for quantum programs, called QIR (Quantum Intermediate Representation), to serve as a common interface between programming languages for gate-based quantum computing and target quantum computation platforms.

Introduced September 23 and based on the LLVM intermediate language, QIR specifies rules to represent quantum constructs in LLVM. No extensions or modifications to LLVM are necessary.

QIR supports Microsoft’s open source Q# language for developing quantum algorithms but is not specific to Q#. Any language for gate-based quantum computing can be represented. QIR also is hardware-agnostic, not specifying a quantum instruction or gate set.

One application cited as being enabled by QIR involves using the LLVM-based Clang compiler to compile QIR into executable machine code for a classical target, providing a path to build a simulator in C or C++ by implementing quantum instruction set functions.

Microsoft has made the draft QIR specification available in the new Q# language repository on GitHub. The company has also rolled out a compiler extension that generates QIR from Q#; it can be found in the feature/QIR branch of the Q# compiler repository. Directions for using the extension have been posted, as well.

Microsoft said that as quantum computing capabilities mature, most large-scale quantum applications will take advantage of both classical and quantum resources working together. LLVM offers QIR capabilities for describing rich classical computation integrated with quantum computation. LLVM also supports integration with many classical languages and tools already supported by the LLVM tool chain. 

Copyright © 2020 IDG Communications, Inc.

Source link

You may also like

Leave a Comment