Using Coalton to implement a quantum compiler (2022)
Published on: 2025-07-15 22:31:38
Using Coalton to Implement a Quantum Compiler
Sep 6, 2022
By Elias Lawson-Fox, Aidan Nyquist, and Robert Smith
Introduction: Coalton and the quilc compiler
Quilc is a state-of-the-art optimizing compiler for quantum computers written in Common Lisp. It is capable of taking arbitrary quantum programs written in Quil, and compiling and optimizing them into code that conforms to the majority of quantum computing architectures that exist today.
Quilc and its related tooling are around 50,000 lines of code, and though it has good test coverage, it falls trap to problems that frequently show up when using dynamically typed programming languagues, two of which are
type errors showing up at runtime, usually a result from the code following a less probable control path, and not having certain useful abstractions that can only be enabled by having a static type system (e.g., certain kinds of polymorphism).
Coalton, being a strictly typed language within Common Lisp, addresses these two pr
... Read full article.