Granthi: Higher-Order Quantum Programming via Unitary Wiring
Samson Abramsky, Radha Jagadeesan
University College London · DePaul University
Key points
From the paper's conclusion- 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 named reversib
Abstract
Existing 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 named reversible operations provide domain-level control spaces without exposing tag management. Every well-typed term—including at function type—denotes a unitary on its boundary interface, and the compiler realizes exactly its wiring as a quantum circuit on the physical qubit layout (assuming correctness of the pytket backend). Granthi is implemented end-to-end: an OCaml DSL elaborates surface programs through a binder-free core IR to executable quantum circuits via pytket. The language directly supports the quantum switch—the paper’s running example, compiled to a static circuit—as well as interference on control-flow history and structured finite control, all within the purely unitary fragment.
Read the paper
Discussion
Science Skim's AI key points, plus readers' public thoughts
Readers' thoughts
No reader thoughts yet.
Related papers
- pfoqcompiler: Efficient Compilation of Quantum Control in Recursive First-Order Quantum ProgramsarXiv · 2026
- Autonomous Code Migration for Quantum Programming Languages: A Case Study with QED-C BenchmarksarXiv · 2026
- Typed Compositional Quantum Computation with LensesJournal of Automated Reasoning · 2026
- QWeaver: Quantum Circuit Cut Workflow with MLIR-based Compiler, Runtime, and Weaver Hybrid TasksarXiv · 2026
- Essential Unitarity for Higher-Order Quantum Computation (Extended Abstract)arXiv · 2026
- Simulating Quantum Computation Using Probabilistic ProgrammingarXiv · 2026