We introduce the Hierarchical Unified Graph Representation (HUGR): a novel graph based intermediate representation for mixed quantum-classical programs. HUGR's design features high expressivity and extensibility to capture the capabilities of near-term and forthcoming quantum computing devices, as well as new and evolving abstractions from novel quantum programming paradigms. The graph based structure is machine-friendly and supports powerful pattern matching based compilation techniques. Inspired by MLIR, HUGR's extensibility further allows compilation tooling to reason about programs at multiple levels of abstraction, lowering smoothly between them. Safety guarantees in the structure including strict, static typing and linear quantum types allow rapid development of compilation tooling without fear of program invalidation. A full specification of HUGR and reference implementation are open-source and available online.
翻译:本文介绍了层次化统一图表示(HUGR):一种基于图的新型中间表示,适用于混合量子-经典程序。HUGR的设计具有高表达性和可扩展性,能够捕捉近期及未来量子计算设备的能力,以及新型量子编程范式中新出现且不断演化的抽象概念。其基于图的结构对机器友好,支持基于模式匹配的强大编译技术。受MLIR启发,HUGR的可扩展性进一步允许编译工具在多个抽象层次上对程序进行推理,并在这些层次之间平滑地降低表示级别。该结构中的安全性保证(包括严格的静态类型和线性量子类型)使得编译工具能够快速开发,而无需担心程序失效。HUGR的完整规范及参考实现均已开源,可在线上获取。