English

Compiling a Q# Subset to QASM 3.0 in TypeScript via a JSON Based IR

Programming Languages 2025-07-18 v2 Quantum Physics

Abstract

We implement a compile toolchain from Q# to QASM 3.0 including a full-featured lexer and parser implementation, as well as a compiler that supports a subset of Q# features. The lexer, parser and compiler are shown to work with various input Q# programs and the implementation is compared against existing Q# compile tools. Unlike the Microsoft implementation of the official Q# compile toolchain, our implementation is written in TypeScript in order to port functionality to web environments.

Cite

@article{arxiv.2506.23407,
  title  = {Compiling a Q# Subset to QASM 3.0 in TypeScript via a JSON Based IR},
  author = {Marcus Edwards},
  journal= {arXiv preprint arXiv:2506.23407},
  year   = {2025}
}
R2 v1 2026-07-01T03:38:46.513Z