Qunity: A Unified Language for Quantum and Classical Computing
Finn Voichick, Liyi Li, Robert Rand, Michael Hicks
Abstract
We introduce Qunity, a new quantum programming language designed to treat quantum computing as a natural generalization of classical computing. Qunity presents a unified syntax where familiar programming constructs can have both quantum and classical effects. For example, one can use sum types to implement the direct sum of linear operators, exception-handling syntax to implement projective measurements, and aliasing to induce entanglement. Further, Qunity takes advantage of the overlooked BQP subroutine theorem, allowing one to construct reversible subroutines from irreversible quantum algorithms through the uncomputation of "garbage" outputs. Unlike existing languages that enable quantum aspects with separate add-ons (like a classical language with quantum gates bolted on), Qunity provides a unified syntax and a novel denotational semantics that guarantees that programs are quantum mechanically valid. We present Qunity's syntax, type system, and denotational semantics, showing how it can cleanly express several quantum algorithms. We also detail how Qunity can be compiled into a low-level qubit circuit language like OpenQASM, proving the realizability of our design.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext ae53af11-6662-4989-b56a-227a7d7e3011Cited by top-tier papers13
- The T-Complexity Costs of Error Correction for Control Flow in Quantum ComputationCharles Yuan, Michael CarbinPLDI 2024 · 10 citations
- Quantum Control Machine: The Limits of Control Flow in Quantum ProgrammingCharles Yuan, Agnes Villanyi, Michael CarbinOOPSLA 2024 · 9 citations
- Modular Synthesis of Efficient Quantum UncomputationHristo Venev, Timon Gehr, Dimitar Dimitrov, Martin T. VechevOOPSLA 2024 · 5 citations
- Quantum Register Machine: Efficient Implementation of Quantum Recursive ProgramsZhicheng Zhang, Mingsheng YingPLDI 2025 · 3 citations
- QbC: Quantum Correctness by ConstructionAnurudh Peduri, Ina Schaefer, Michael WalterOOPSLA 2025 · 3 citations
Builds on5
- Silq: a high-level quantum language with safe uncomputation and intuitive semanticsBenjamin Bichsel, Maximilian Baader, Timon Gehr, Martin T. VechevPLDI 2020 · 145 citations
- Projection-based runtime assertions for testing and debugging Quantum programsGushu Li, Li Zhou, Nengkun Yu, Yufei Ding et al.OOPSLA 2020 · 120 citations
- Linear Dependent Type Theory for Quantum Programming Languages: Extended AbstractPeng Fu, Kohei Kishida, Peter SelingerLICS 2020 · 23 citations
- Verified compilation of Quantum oraclesLiyi Li, Finn Voichick, Kesha Hietala, Yuxiang Peng et al.OOPSLA 2022 · 17 citations
- Symmetries in reversible programming: from symmetric rig groupoids to reversible programming languagesVikraman Choudhury, Jacek Karwowski, Amr SabryPOPL 2022 · 10 citations
Related papers
- Compositional Quantum Control Flow with Efficient Compilation in QunityMikhail Mints, Finn Voichick, Leonidas Lampropoulos, Robert RandOOPSLA 2025
- Quantum Circuits Are Just a PhaseChris Heunen, Louis Lemonnier, Christopher McNally, Alex RicePOPL 2026
- A Case for Synthesis of Recursive Quantum Unitary ProgramsHaowei Deng, Runzhou Tao, Yuxiang Peng, Xiaodi WuPOPL 2024 · 10 citations
- Hadamard-Pi: Equational Quantum ProgrammingWang Fang, Chris Heunen, Robin KaarsgaardPOPL 2026
- With a Few Square Roots, Quantum Computing Is as Easy as PiJacques Carette, Chris Heunen, Robin Kaarsgaard, Amr SabryPOPL 2024 · 7 citations
