Q#: Enabling scalable quantum computing and development with a high-level domain-specific language

Krysta M. Svore, Alan Geller, Matthias Troyer, John Azariah, Chris Granade, Bettina Heim, Vadym Kliuchnikov, Mariia Mykhailova, Andres Paz, Martin Roetteler

Proceedings of the Real World Domain Specific Languages Workshop (RWDSL 2018) |

Published by ACM

View Publication | DOI

Quantum computing exploits quantum phenomena such as superposition and entanglement to realize a form of parallelism that is not available to traditional computing. It offers the potential of significant computational speed-ups in quantum chemistry, materials science, cryptography, and machine learning. The dominant approach to programming quantum computers is to provide an existing high-level language with libraries that allow for the expression of quantum programs. This approach can permit computations that are meaningless in a quantum context; prohibits succinct expression of interaction between classical and quantum logic; and does not provide important constructs that are required for quantum programming. We present Q#, a quantum-focused domain-specific language explicitly designed to correctly, clearly and completely express quantum algorithms. Q# provides a type system, a tightly constrained environment to safely interleave classical and quantum computations; specialized syntax, symbolic code manipulation to automatically generate correct transformations of quantum operations, and powerful functional constructs which aid composition.