paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Granthi: Higher-Order Quantum Programming via Unitary Wiring

Granthi:基于酉线路连线的高阶量子编程
OOPSLA 10(OOPSLA2)2026匹配度 2/10 · 论文属于量子编程语言设计,涉及高阶类型、酉语义与编译实现,虽在PL领域且有形式化+工程实现,但未涉及用户核心关注的静态分析、LLM/Agent、浮点程序分析或贝叶斯程序分析,主题偏离较大。引用 0 inbox
Samson Abramsky, Radha Jagadeesan
crossref: 2026-10-02

AI 速览

一句话:提出纯酉高阶量子语言 Granthi,让量子程序成为可传递、相干复合的一等值并编译为静态量子电路。

现有量子编程语言把高阶结构局限在经典宿主语言中,量子层只能对量子比特做一阶操作。本文提出 Granthi——一种纯酉(purely unitary)的高阶量子编程语言,基于三条设计准则:量子程序是一等值,可被传递、返回并相干地复合;加法结构被实现为保持标签的路由而非可观测分支,因此控制可以处于叠加态;面向程序员的有限标签类型与具名可逆操作为其提供领域级控制空间而无需暴露标签管理。语言保证每个良类型项(包括函数类型的项)都在其边界接口上表示一个酉算子,编译器则把这一连线精确实现为物理量子比特布局上的量子电路(假设 pytket 后端正确)。Granthi 已端到端实现:一个 OCaml DSL 通过无 binder 的核心 IR 将表层程序 elaboration 为经 pytket 生成的可执行量子电路。该语言直接支持量子 switch(论文的贯穿示例,被编译为静态电路),以及控制流历史上的干涉与结构化有限控制。

问题
现有量子语言把高阶结构交由经典宿主承担,量子层只能做一阶的量子比特操作,无法把函数等高阶对象作为相干的一等量子数据。
方法
设计纯酉高阶语言 Granthi:量子程序为一等值、加法结构为保标签路由以允许叠加态控制、用有限标签类型封装控制空间;以 OCaml DSL 经无 binder 核心 IR 编译到 pytket 电路,并保证每个良类型项表示其边界上的酉算子。
评估
端到端实现并在量子 switch、控制流历史干涉和结构化有限控制等案例上编译为静态量子电路,正确性依赖 pytket 后端的正确性假设。
原文摘要(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.

链接与引用

DOI 原文 · PDF(开放获取) ·

BibTeX
@article{paperbot12096,
  title = {Granthi: Higher-Order Quantum Programming via Unitary Wiring},
  author = {Samson Abramsky and Radha Jagadeesan},
  journal = {Proceedings of the ACM on Programming Languages},
  volume = {10},
  number = {OOPSLA2},
  year = {2026},
  doi = {10.1145/3839496}
}