Quantum Control Machine: The Limits of Control Flow in Quantum Programming
Charles Yuan, Agnes Villanyi, Michael Carbin
Abstract
Quantum algorithms for tasks such as factorization, search, and simulation rely on control flow such as branching and iteration that depends on the value of data in superposition. High-level programming abstractions for control flow, such as switches, loops, higher-order functions, and continuations, are ubiquitous in classical languages. By contrast, many quantum languages do not provide high-level abstractions for control flow in superposition, and instead require the use of hardware-level logic gates to implement such control flow.
The reason for this gap is that whereas a classical computer supports control flow abstractions using a program counter that can depend on data, the typical architecture of a quantum computer does not analogously provide a program counter that can depend on data in superposition. As a result, the complete set of control flow abstractions that can be correctly realized on a quantum computer has not yet been established.
In this work, we provide a complete characterization of the properties of control flow abstractions that are correctly realizable on a quantum computer. First, we prove that even on a quantum computer whose program counter exists in superposition, one cannot correctly realize control flow in quantum algorithms by lifting the classical conditional jump instruction to work in superposition. This theorem denies the ability to directly lift general abstractions for control flow such as the 𝜆-calculus from classical to quantum programming.
In response, we present the necessary and sufficient conditions for control flow to be correctly realizable on a quantum computer. We introduce the quantum control machine, an instruction set architecture featuring a conditional jump that is restricted to satisfy these conditions. We show how this design enables a developer to correctly express control flow in quantum algorithms using a program counter in place of logic gates.
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.
6 top-tier papers have cited it since. Know what they found before your reviewers do.
Lune can draw on
the full paper · the top-tier papers that cite it · related work
Free to start. No credit card required.
Lineage
- Quantum Control and General Recursion Beyond the Unitary Case cites Quantum Register Machine: Efficient Implementation of Quantum Recursive Programs
- Quantum Control and General Recursion Beyond the Unitary Case cites Verification of Recursively Defined Quantum Circuits
- Quantum Control and General Recursion Beyond the Unitary Case cites Silq: a high-level quantum language with safe uncomputation and intuitive semantics
- Projection-based runtime assertions for testing and debugging Quantum programs cites A verified optimizer for Quantum circuits
- Quantum Register Machine: Efficient Implementation of Quantum Recursive Programs cites Verification of Recursively Defined Quantum Circuits
- Quantum Register Machine: Efficient Implementation of Quantum Recursive Programs cites A verified optimizer for Quantum circuits
- Quantum Register Machine: Efficient Implementation of Quantum Recursive Programs cites Silq: a high-level quantum language with safe uncomputation and intuitive semantics
- Verification of Recursively Defined Quantum Circuits cites A verified optimizer for Quantum circuits
- A verified optimizer for Quantum circuits cites Silq: a high-level quantum language with safe uncomputation and intuitive semantics
- Cobble: Compiling Block Encodings for Quantum Computational Linear Algebra cites Quantum Register Machine: Efficient Implementation of Quantum Recursive Programs
- Cobble: Compiling Block Encodings for Quantum Computational Linear Algebra cites A verified optimizer for Quantum circuits
- Cobble: Compiling Block Encodings for Quantum Computational Linear Algebra cites Silq: a high-level quantum language with safe uncomputation and intuitive semantics
Cited by top-tier papers6
- Quantum Register Machine: Efficient Implementation of Quantum Recursive ProgramsZhicheng Zhang, Mingsheng YingPLDI 2025 · 3 citations
- Quantum Control and General Recursion Beyond the Unitary CaseKathleen Barsse, Romain Péchoux, Simon PerdrixLICS 2026
- Verification of Recursively Defined Quantum CircuitsMingsheng Ying, Zhicheng ZhangPLDI 2026
- Granthi: Higher-Order Quantum Programming via Unitary WiringSamson Abramsky, Radha JagadeesanOOPSLA 2026
- Cobble: Compiling Block Encodings for Quantum Computational Linear AlgebraCharles YuanPLDI 2026
Builds on9
- 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
- A verified optimizer for Quantum circuitsKesha Hietala, Robert Rand, Shih-Han Hung, Xiaodi Wu et al.POPL 2021 · 111 citations
- Formal verification of a constant-time preserving C compilerGilles Barthe, Sandrine Blazy, Benjamin Grégoire, Rémi Hutin et al.POPL 2020 · 77 citations
- Quantum abstract interpretationNengkun Yu, Jens PalsbergPLDI 2021 · 69 citations
Related papers
- Compositional Quantum Control Flow with Efficient Compilation in QunityMikhail Mints, Finn Voichick, Leonidas Lampropoulos, Robert RandOOPSLA 2025
- Full abstraction for the quantum lambda-calculusPierre Clairambault, Marc de VismePOPL 2020 · 25 citations
- Causality in Pure Quantum Computation with Quantum ControlKengo Hirata, Takeshi TsukadaLICS 2026 · 1 citation
- Quantum Circuits Are Just a PhaseChris Heunen, Louis Lemonnier, Christopher McNally, Alex RicePOPL 2026
- The Power of Simulation for Equivalence Checking in Quantum ComputingLukas Burgholzer, Robert WilleDAC 2020 · 25 citations
