{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2025,10,10]],"date-time":"2025-10-10T01:19:38Z","timestamp":1760059178699,"version":"build-2065373602"},"reference-count":36,"publisher":"Association for Computing Machinery (ACM)","issue":"OOPSLA2","license":[{"start":{"date-parts":[[2025,10,9]],"date-time":"2025-10-09T00:00:00Z","timestamp":1759968000000},"content-version":"vor","delay-in-days":0,"URL":"http:\/\/www.acm.org\/publications\/policies\/copyright_policy#Background"}],"funder":[{"DOI":"10.13039\/100000181","name":"Air Force Office of Scientific Research","doi-asserted-by":"publisher","award":["FA95502310406"],"award-info":[{"award-number":["FA95502310406"]}],"id":[{"id":"10.13039\/100000181","id-type":"DOI","asserted-by":"publisher"}]}],"content-domain":{"domain":["dl.acm.org"],"crossmark-restriction":true},"short-container-title":["Proc. ACM Program. Lang."],"published-print":{"date-parts":[[2025,10,9]]},"abstract":"<jats:p>Most existing quantum programming languages are based on the quantum circuit model of computation, as higher-level abstractions are particularly challenging to implement\u2014especially ones relating to quantum control flow. The Qunity language, proposed by Voichick et al., offered such an abstraction in the form of a quantum control construct, with great care taken to ensure that the resulting language is still realizable. However, Qunity lacked a working implementation, and the originally proposed compilation procedure was very inefficient, with even simple quantum algorithms compiling to unreasonably large circuits.<\/jats:p>\n          <jats:p>In this work, we focus on the efficient compilation of high-level quantum control flow constructs, using Qunity as our starting point. We introduce a wider range of abstractions on top of Qunity's core language that offer compelling trade-offs compared to its existing control construct. We create a complete implementation of a Qunity compiler, which converts high-level Qunity code into the quantum assembly language OpenQASM 3. We develop optimization techniques for multiple stages of the Qunity compilation procedure, including both low-level circuit optimizations as well as methods that consider the high-level structure of a Qunity program, greatly reducing the number of qubits and gates used by the compiler.<\/jats:p>","DOI":"10.1145\/3763056","type":"journal-article","created":{"date-parts":[[2025,10,9]],"date-time":"2025-10-09T08:49:50Z","timestamp":1759999790000},"page":"166-192","update-policy":"https:\/\/doi.org\/10.1145\/crossmark-policy","source":"Crossref","is-referenced-by-count":1,"title":["Compositional Quantum Control Flow with Efficient Compilation in Qunity"],"prefix":"10.1145","volume":"9","author":[{"ORCID":"https:\/\/orcid.org\/0009-0004-4508-353X","authenticated-orcid":false,"given":"Mikhail","family":"Mints","sequence":"first","affiliation":[{"name":"California Institute of Technology, Pasadena, USA"}]},{"ORCID":"https:\/\/orcid.org\/0000-0002-1913-4178","authenticated-orcid":false,"given":"Finn","family":"Voichick","sequence":"additional","affiliation":[{"name":"University of Maryland, College Park, USA"}]},{"ORCID":"https:\/\/orcid.org\/0000-0003-0269-9815","authenticated-orcid":false,"given":"Leonidas","family":"Lampropoulos","sequence":"additional","affiliation":[{"name":"University of Maryland, College Park, USA"}]},{"ORCID":"https:\/\/orcid.org\/0000-0001-6842-5505","authenticated-orcid":false,"given":"Robert","family":"Rand","sequence":"additional","affiliation":[{"name":"University of Chicago, Chicago, USA"}]}],"member":"320","published-online":{"date-parts":[[2025,10,9]]},"reference":[{"key":"e_1_2_1_1_1","doi-asserted-by":"publisher","DOI":"10.1109\/LICS.2005.1"},{"key":"e_1_2_1_2_1","doi-asserted-by":"publisher","DOI":"10.1145\/3385412.3386007"},{"key":"e_1_2_1_3_1","doi-asserted-by":"publisher","DOI":"10.4204\/eptcs.195.3"},{"key":"e_1_2_1_4_1","unstructured":"Andrew M. Childs Ben W. Reichardt Robert Spalek and Shengyu Zhang. 2007. Every NAND formula of size N can be evaluated in time N^1\/2+o(1) on a quantum computer. arxiv:quant-ph\/0703015. arxiv:quant-ph\/0703015"},{"key":"e_1_2_1_5_1","doi-asserted-by":"publisher","DOI":"10.1145\/3505636"},{"key":"e_1_2_1_6_1","unstructured":"Steven A. Cuccaro Thomas G. Draper Samuel A. Kutin and David Petrie Moulton. 2004. A new quantum ripple-carry addition circuit. arxiv:quant-ph\/0410184. arxiv:quant-ph\/0410184"},{"key":"e_1_2_1_7_1","doi-asserted-by":"publisher","DOI":"10.1098\/rspa.1985.0070"},{"key":"e_1_2_1_8_1","doi-asserted-by":"publisher","unstructured":"Cirq Developers. 2025. Cirq. https:\/\/doi.org\/10.5281\/ZENODO.4062499 10.5281\/ZENODO.4062499","DOI":"10.5281\/ZENODO.4062499"},{"key":"e_1_2_1_9_1","unstructured":"Craig Gidney. 2017. Simple Algorithm for Multiplicative Inverses mod 2^n. https:\/\/algassert.com\/post\/1709"},{"key":"e_1_2_1_10_1","doi-asserted-by":"publisher","DOI":"10.1145\/2499370.2462177"},{"key":"e_1_2_1_11_1","doi-asserted-by":"publisher","DOI":"10.1145\/237814.237866"},{"key":"e_1_2_1_12_1","doi-asserted-by":"publisher","DOI":"10.48550\/arXiv.2409.04643"},{"key":"e_1_2_1_13_1","doi-asserted-by":"publisher","DOI":"10.1017\/CBO9781139031103"},{"key":"e_1_2_1_14_1","doi-asserted-by":"publisher","DOI":"10.1145\/3656428"},{"key":"e_1_2_1_15_1","doi-asserted-by":"publisher","DOI":"10.2298\/AADM190326023J"},{"key":"e_1_2_1_16_1","doi-asserted-by":"publisher","DOI":"10.2172\/366453"},{"key":"e_1_2_1_17_1","doi-asserted-by":"publisher","DOI":"10.1016\/j.jss.2024.112236"},{"key":"e_1_2_1_18_1","doi-asserted-by":"publisher","DOI":"10.1137\/050643684"},{"key":"e_1_2_1_19_1","doi-asserted-by":"crossref","unstructured":"Alexander McCaskey and Thien Nguyen. 2021. A MLIR Dialect for Quantum Assembly Languages. arxiv:2101.11365. arxiv:2101.11365","DOI":"10.1109\/QCE52317.2021.00043"},{"key":"e_1_2_1_20_1","doi-asserted-by":"publisher","DOI":"10.1088\/1367-2630\/18\/2\/023023"},{"key":"e_1_2_1_21_1","doi-asserted-by":"publisher","DOI":"10.5281\/zenodo.16567634"},{"key":"e_1_2_1_22_1","doi-asserted-by":"crossref","unstructured":"Mikhail Mints Finn Voichick Leonidas Lampropoulos and Robert Rand. 2025. Compositional Quantum Control Flow with Efficient Compilation in Qunity. arxiv:2508.02857.","DOI":"10.1145\/3763056"},{"key":"e_1_2_1_23_1","doi-asserted-by":"publisher","DOI":"10.5281\/zenodo.2573505"},{"key":"e_1_2_1_24_1","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-319-89366-2_19"},{"key":"e_1_2_1_25_1","doi-asserted-by":"publisher","DOI":"10.1017\/S0960129504004256"},{"key":"e_1_2_1_26_1","doi-asserted-by":"publisher","DOI":"10.1137\/s0097539795293172"},{"key":"e_1_2_1_27_1","volume-title":"HUGR: A Quantum-Classical Intermediate Representation. https:\/\/popl25.sigplan.org\/details\/planqc-2025-papers\/6\/HUGR-A-Quantum-Classical-Intermediate-Representation","author":"Sivarajah Seyon","year":"2025","unstructured":"Seyon Sivarajah, Mark Koch, Agustin Borgna, Alan Lawrence, Alec Edgington, Douglas Wilson, Craig Roy, Luca Mondada, Lukas Heidemann, and Ross Duncan. 2025. HUGR: A Quantum-Classical Intermediate Representation. https:\/\/popl25.sigplan.org\/details\/planqc-2025-papers\/6\/HUGR-A-Quantum-Classical-Intermediate-Representation"},{"key":"e_1_2_1_28_1","doi-asserted-by":"publisher","DOI":"10.1145\/3183895.3183901"},{"key":"e_1_2_1_29_1","doi-asserted-by":"publisher","DOI":"10.1145\/3689785"},{"key":"e_1_2_1_30_1","doi-asserted-by":"publisher","DOI":"10.1145\/3571225"},{"key":"e_1_2_1_31_1","doi-asserted-by":"publisher","DOI":"10.1088\/1361-6633\/ad7f69"},{"key":"e_1_2_1_32_1","doi-asserted-by":"publisher","DOI":"10.1007\/978-0-387-30440-3_428"},{"key":"e_1_2_1_33_1","doi-asserted-by":"publisher","DOI":"10.1038\/299802a0"},{"key":"e_1_2_1_34_1","doi-asserted-by":"publisher","DOI":"10.1145\/3563297"},{"key":"e_1_2_1_35_1","doi-asserted-by":"publisher","DOI":"10.1145\/3656397"},{"key":"e_1_2_1_36_1","doi-asserted-by":"publisher","DOI":"10.1145\/3649811"}],"container-title":["Proceedings of the ACM on Programming Languages"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/dl.acm.org\/doi\/pdf\/10.1145\/3763056","content-type":"application\/pdf","content-version":"vor","intended-application":"syndication"},{"URL":"https:\/\/dl.acm.org\/doi\/pdf\/10.1145\/3763056","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2025,10,9]],"date-time":"2025-10-09T17:40:18Z","timestamp":1760031618000},"score":1,"resource":{"primary":{"URL":"https:\/\/dl.acm.org\/doi\/10.1145\/3763056"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2025,10,9]]},"references-count":36,"journal-issue":{"issue":"OOPSLA2","published-print":{"date-parts":[[2025,10,9]]}},"alternative-id":["10.1145\/3763056"],"URL":"https:\/\/doi.org\/10.1145\/3763056","relation":{},"ISSN":["2475-1421"],"issn-type":[{"type":"electronic","value":"2475-1421"}],"subject":[],"published":{"date-parts":[[2025,10,9]]},"assertion":[{"value":"2025-03-25","order":0,"name":"received","label":"Received","group":{"name":"publication_history","label":"Publication History"}},{"value":"2025-08-12","order":2,"name":"accepted","label":"Accepted","group":{"name":"publication_history","label":"Publication History"}},{"value":"2025-10-09","order":3,"name":"published","label":"Published","group":{"name":"publication_history","label":"Publication History"}}]}}