GUPPY: Pythonic Quantum-Classical Programming
Mark Koch, Alan Lawrence, Kartik Singhal, Seyon Sivarajah, Ross Duncan
TL;DR
Guppy addresses the challenge that Python-based quantum programming often remains too close to circuit descriptions, lacking high-level control-flow suitable for real-time feedback. It introduces a Python-embedded domain-specific language that compiles to the Hugr intermediate representation, enabling complex quantum–classical control with static typing and linear quantum data. The approach provides Pythonic control flow, strong typing, a linear Qubit model, and Python interoperability, along with a hierarchical IR and integration with existing tooling like TKET and QIR/MLIR backends. This work advances practical, hardware-oriented quantum programming by enabling safe, high-level hybrid algorithms and paving the way for richer language features and optimizations.
Abstract
We present ongoing work on Guppy, a domain-specific language embedded in Python that allows users to write high-level hybrid quantum programs with complex control flow in Pythonic syntax, aiming to run them on actual quantum hardware.
