Curator's Take
AI Commentary
This article introduces Granthi, the first fully‑unitary higher‑order quantum language that treats whole programs as first‑class values, allowing them to be passed, returned and coherently composed without collapsing superpositions. By moving beyond the usual classical host layer, Granthi opens up expressive constructs such as a pure‑unitary quantum switch and interference‑based control flow—capabilities that could simplify the implementation of adaptive algorithms and distributed protocols. Although the current prototype only covers an executable fragment and relies on OCaml → pytket compilation, it demonstrates a concrete path toward richer quantum software stacks where higher‑order abstractions remain provably unitary.
— Mark Eatherly
Summary
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