Lune

POPL2023Top-tier venue

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 Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

13 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • Verified compilation of Quantum oracles cites Silq: a high-level quantum language with safe uncomputation and intuitive semantics
  • The T-Complexity Costs of Error Correction for Control Flow in Quantum Computation cites Silq: a high-level quantum language with safe uncomputation and intuitive semantics
  • Quantum Register Machine: Efficient Implementation of Quantum Recursive Programs cites Verified compilation of Quantum oracles
  • Quantum Register Machine: Efficient Implementation of Quantum Recursive Programs cites The T-Complexity Costs of Error Correction for Control Flow in Quantum Computation
  • Quantum Register Machine: Efficient Implementation of Quantum Recursive Programs cites Silq: a high-level quantum language with safe uncomputation and intuitive semantics
  • Quantum Register Machine: Efficient Implementation of Quantum Recursive Programs cites Modular Synthesis of Efficient Quantum Uncomputation
  • Quantum Register Machine: Efficient Implementation of Quantum Recursive Programs cites Quantum Control Machine: The Limits of Control Flow in Quantum Programming
  • Modular Synthesis of Efficient Quantum Uncomputation cites Silq: a high-level quantum language with safe uncomputation and intuitive semantics
  • Quantum Control Machine: The Limits of Control Flow in Quantum Programming cites Projection-based runtime assertions for testing and debugging Quantum programs
  • Quantum Control Machine: The Limits of Control Flow in Quantum Programming cites Silq: a high-level quantum language with safe uncomputation and intuitive semantics
  • QbC: Quantum Correctness by Construction cites Silq: a high-level quantum language with safe uncomputation and intuitive semantics
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers13

  1. The T-Complexity Costs of Error Correction for Control Flow in Quantum ComputationCharles Yuan, Michael CarbinPLDI 2024 · 10 citations
  2. Quantum Control Machine: The Limits of Control Flow in Quantum ProgrammingCharles Yuan, Agnes Villanyi, Michael CarbinOOPSLA 2024 · 9 citations
  3. Modular Synthesis of Efficient Quantum UncomputationHristo Venev, Timon Gehr, Dimitar Dimitrov, Martin T. VechevOOPSLA 2024 · 5 citations
  4. Quantum Register Machine: Efficient Implementation of Quantum Recursive ProgramsZhicheng Zhang, Mingsheng YingPLDI 2025 · 3 citations
  5. QbC: Quantum Correctness by ConstructionAnurudh Peduri, Ina Schaefer, Michael WalterOOPSLA 2025 · 3 citations

Builds on5

  1. Silq: a high-level quantum language with safe uncomputation and intuitive semanticsBenjamin Bichsel, Maximilian Baader, Timon Gehr, Martin T. VechevPLDI 2020 · 145 citations
  2. Projection-based runtime assertions for testing and debugging Quantum programsGushu Li, Li Zhou, Nengkun Yu, Yufei Ding et al.OOPSLA 2020 · 120 citations
  3. Linear Dependent Type Theory for Quantum Programming Languages: Extended AbstractPeng Fu, Kohei Kishida, Peter SelingerLICS 2020 · 23 citations
  4. Verified compilation of Quantum oraclesLiyi Li, Finn Voichick, Kesha Hietala, Yuxiang Peng et al.OOPSLA 2022 · 17 citations
  5. Symmetries in reversible programming: from symmetric rig groupoids to reversible programming languagesVikraman Choudhury, Jacek Karwowski, Amr SabryPOPL 2022 · 10 citations

Related papers

  1. Compositional Quantum Control Flow with Efficient Compilation in QunityMikhail Mints, Finn Voichick, Leonidas Lampropoulos, Robert RandOOPSLA 2025
  2. Quantum Circuits Are Just a PhaseChris Heunen, Louis Lemonnier, Christopher McNally, Alex RicePOPL 2026
  3. A Case for Synthesis of Recursive Quantum Unitary ProgramsHaowei Deng, Runzhou Tao, Yuxiang Peng, Xiaodi WuPOPL 2024 · 10 citations
  4. Hadamard-Pi: Equational Quantum ProgrammingWang Fang, Chris Heunen, Robin KaarsgaardPOPL 2026
  5. With a Few Square Roots, Quantum Computing Is as Easy as PiJacques Carette, Chris Heunen, Robin Kaarsgaard, Amr SabryPOPL 2024 · 7 citations
Dusk over the sea between two cliffs drawn in fine vertical lines