Hasty Briefsbeta

Bilingual

Using Coalton to Implement a Quantum Compiler

a year ago
  • #quantum-computing
  • #type-systems
  • #compiler
  • Quilc is an optimizing compiler for quantum computers written in Common Lisp, capable of compiling arbitrary quantum programs into code for various quantum computing architectures.
  • Coalton, a strictly typed language within Common Lisp, addresses runtime type errors and lack of useful abstractions in dynamically typed languages, making it suitable for implementing new features in quilc.
  • Discrete compilation is a significant new feature in quilc, implemented using Coalton, which allows quantum programs to be compiled into a set of discrete native operations, avoiding the precision issues of continuous operations.
  • The Ross-Selinger algorithm is used for discrete compilation, focusing on decomposing parametric operations like RZθ into a set of discrete operations (Clifford+T set), enabling arbitrary precision approximations.
  • Coalton's type classes and ad hoc polymorphism facilitate the implementation of mathematical objects and operations required for the Ross-Selinger algorithm, such as arithmetic over specific number rings.
  • Quilc's discrete compilation feature is validated through numerical experiments, showing convergence to expected probabilities and efficient operation counts as precision increases.
  • The implementation demonstrates Coalton's capability to handle complex mathematical algorithms efficiently and correctly, paving the way for further improvements and contributions to the language.