Granthi: Higher-Order Quantum Programming via Unitary Wiring
Samson Abramsky, Radha Jagadeesan
摘要
Many mainstream quantum programming languages confine higher-order structure to a classical host while restricting the quantum layer to first-order operations on qubits. This paper presents Granthi, a purely unitary higher-order quantum programming language built on three design commitments: quantum programs are first-class values that may be passed, returned, and coherently composed; additive structure is tag-preserving routing rather than observational branching, so control may remain in superposition; and programmer-facing finite label types with staged reversible-operation bindings provide domain-level control spaces without exposing tag management. These bindings are eliminated by elaboration before Source typing.
Granthi deterministically normalizes each Source program to a canonical wiring form. Every well-typed Source program-including a term of function type-has a unitary boundary interpretation. Under backend correctness (BC), the reference compiler produces a unitary circuit realizing that interpretation.
Granthi's currently supported executable fragment is implemented end-to-end: an OCaml DSL elaborates surface programs through a higher-order Core IR to executable quantum circuits via pytket. The language directly supports the pure-unitary quantum switch for explicitly supplied operations; closed instances compile to static circuits. It also supports interference on control-flow history and structured finite control, all within the purely unitary fragment.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
脉络
- Qudit Quantum Programming with Projective Cliffords 引用了 Qunity: A Unified Language for Quantum and Classical Computing
- Quantum Control Machine: The Limits of Control Flow in Quantum Programming 引用了 Twist: sound reasoning for purity and entanglement in Quantum programs
- Quantum Control Machine: The Limits of Control Flow in Quantum Programming 引用了 Qunity: A Unified Language for Quantum and Classical Computing
它引用的 Paper7
- Qunity: A Unified Language for Quantum and Classical ComputingFinn Voichick, Liyi Li, Robert Rand, Michael HicksPOPL 2023 · 35 次引用
- Twist: sound reasoning for purity and entanglement in Quantum programsCharles Yuan, Christopher McNally, Michael CarbinPOPL 2022 · 30 次引用
- Quantum Control Machine: The Limits of Control Flow in Quantum ProgrammingCharles Yuan, Agnes Villanyi, Michael CarbinOOPSLA 2024 · 9 次引用
- With a Few Square Roots, Quantum Computing Is as Easy as PiJacques Carette, Chris Heunen, Robin Kaarsgaard, Amr SabryPOPL 2024 · 7 次引用
- Qudit Quantum Programming with Projective CliffordsJennifer Paykin, Sam WinnickPOPL 2026 · 1 次引用
相关 Paper
- Compositional Quantum Control Flow with Efficient Compilation in QunityMikhail Mints, Finn Voichick, Leonidas Lampropoulos, Robert RandOOPSLA 2025
- Linear Dependent Type Theory for Quantum Programming Languages: Extended AbstractPeng Fu, Kohei Kishida, Peter SelingerLICS 2020 · 23 次引用
- Quantum Control and General Recursion Beyond the Unitary CaseKathleen Barsse, Romain Péchoux, Simon PerdrixLICS 2026
- Quantum Circuits Are Just a PhaseChris Heunen, Louis Lemonnier, Christopher McNally, Alex RicePOPL 2026
- Proto-Quipper with Dynamic LiftingPeng Fu, Kohei Kishida, Neil J. Ross, Peter SelingerPOPL 2023 · 17 次引用
