Granthi, accepted at the OOPSLA 2026 programming languages conference, is a higher order quantum language in which every term, even function values, is a reversible quantum operation, so quantum routines can compose without a classical host.
In most quantum programming languages, when a piece of code wants to pass a routine around, to use it as an argument, return it, or compose it with another, that routine leaves the quantum layer and becomes a classical value. A new academic language called Granthi deliberately keeps the routine quantum, so even the function values in a program are unitary transformations on their boundary interface.
The language, accepted at OOPSLA 2026 and posted to arXiv in August, treats programs as first-class quantum values rather than recipes that eventually hand control back to a classical host. On the authors' account, it is the first higher-order quantum language carried end-to-end through a real compiler backend, pytket (Quantinuum's established quantum compiler), while keeping every well-typed term, including terms at function type, unitary on its inputs and outputs.
A "higher-order" language is one in which functions themselves are values that can be passed to and returned from other functions, the way a Python map takes a function as an argument. Most existing quantum languages break that property. To do anything higher-order, they convert the routine into a classical description, a circuit specification or a sequence of gate names, and let a classical compiler stitch it together later. Granthi rejects the conversion step. Its type system says: if the program type-checks, the program is a unitary map on its boundary interface, and that includes function-typed programs.
The authors justify that property through what they call β/η-stability, a discipline borrowed from typed lambda calculi. "β-stability" means a function application behaves like substitution; "η-stability" means a function is determined entirely by what it does to its inputs. Applied to a quantum setting, the discipline forces every term to be an isometry, a norm-preserving map and the quantum analogue of a pure function, on its boundary. Measurement, classical interaction, and feedback are out of scope, because each would break the unitarity guarantee.
Three concrete design commitments follow. First, quantum programs are first-class values: they can be passed, returned, and coherently composed. Second, the language's additive structure, the way it routes between alternative computational paths, is tag-preserving rather than observational, so the choice of branch can stay in superposition instead of collapsing into a classical if. Third, the language exposes finite label types with named reversible operations, giving programmers a domain-level vocabulary for control spaces without leaving the unitary fragment.
Together those commitments make a small set of features researchers have long wanted from quantum software directly expressible. Granthi compiles the quantum switch, a primitive that applies one of two operations depending on the state of a control qubit, to a static circuit without runtime branching. It supports interference on control-flow history, meaning a program can route its next step based on a quantum superposition of prior paths. And it gives programmers structured finite control over the kind of label spaces used in reversible computing, all inside a purely unitary type discipline.
The implementation is a domain-specific language embedded in OCaml. A surface program is elaborated through a binder-free core intermediate representation, a form in which variables are replaced by explicit wiring rather than named bindings, the way a circuit diagram replaces lines with named wires, and then lowered to executable quantum circuits through pytket. The source code is published at github.com/radhajagadeesan/QPL, and a versioned artifact sits on Zenodo as record 21705146.
The name "Granthi" comes from the Sanskrit word for "knot," a nod to the wiring at the core of the system. The OOPSLA 2026 publication is recorded in PACMPL Volume 10 as article OOPSLA2364, with DOI 10.1145/3839496. The arXiv listing shows a single submitter, Radha Jagadeesan, for version 1; the OOPSLA author list may differ and should be checked against the version of record before any load-bearing attribution.
There is no deployment claim here, no benchmark of runtime speedup, and no announced compatibility with a particular quantum hardware platform beyond the pytket backend. The paper is an arXiv preprint (with peer-review designation from OOPSLA 2026), and the work is scoped to the "purely unitary" fragment, the part of quantum computation that excludes measurement, classical I/O, and feedback loops. Researchers who want to model quantum algorithms that read intermediate results and adapt will still need a different tool.
Quantum software, on this account, is not a recipe for a circuit that a classical host will eventually run. It is a circuit, all the way down. Whether that model generalizes to hybrid algorithms, to error-corrected hardware, and to the kind of mid-circuit measurement recent superconducting platforms now permit is the next question the design will have to answer.