🤖 AI Summary
This work addresses the challenges of redundant control-flow expression and hardware deployment difficulties in quantum-classical hybrid programming. We propose Guppy, a domain-specific language embedded in Python, featuring native integration of quantum programming abstractions within Python’s syntax. Its core innovation lies in enabling seamless co-execution of classical control flow—including higher-order functions, conditionals, and loops—with quantum operations. By extending Python’s abstract syntax tree (AST) and introducing a quantum-aware intermediate representation (QIR), coupled with targeted compilation optimizations, Guppy supports direct compilation of hybrid programs to real quantum hardware. Experimental evaluation demonstrates that Guppy concisely expresses canonical algorithms such as Shor’s and VQE, and successfully validates correctness and execution efficiency on superconducting and ion-trap devices. The approach significantly improves readability, maintainability, and portability of quantum-classical hybrid programs.
📝 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.