arXiv:2609.08075cs.PLSep 2026

Manuscript Offprint

arXiv:2609.08075

Mapping Dynamic, Hierarchical Quantum Circuits

Marouane Benbetka, Merwan Bekkar, Bokyeong Yoon, Riyadh Baghdadi, Martin Kong

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original. This text is shared under the same licence.

Marouane Benbetka, Merwan Bekkar

New York University

Abu-Dhabi, UAE

mb10324@nyu.edu, mb10325@nyu.edu

Riyadh Baghdadi

New York University

Abu-Dhabi, UAE

Baghdadi@nyu.edu

Bokyeong Yoon

The Ohio State University

Columbus, USA

yoon.731@osu.edu

Martin Kong

The Ohio State University

Columbus, USA

moreno.244@osu.edu

Abstract

Qubit mapping is a critical pass in quantum compilation. Despite various advances, dynamic circuits, those exhibiting data dependent control-flow, often resulting from qubit measurements, are not yet supported by the vast majority of available qubit mappers. The crucial limitation to overcome is the dependence on flat, one-dimensional representations of circuits. Further, qubit mappers currently lack compiler abstractions that capture the hierarchical nature of circuits, hindering the qubit mapping process.

In this paper, 1^{1} we introduce a new qubit mapping method and analyses to tackle hierarchical dynamic circuits. Our novelty resides in four key aspects: modeling (statically) sub-circuits in disjoint control-flow paths, introducing a novel Qubit Reconciliation pass to maintain consistency between sub-circuit and control-flow boundaries, a loop-entry remapping pass, and a refined cost function enhanced for SWAP count, circuit depth, circuit latency and error. We demonstrate the efficiency of our approach on a wide range of dynamic circuits on two monolithic Quantum Processing Units of 127 and 156 qubits, and on chiplet hexagon-based QPUs. On monolithic QPUs, our qubit mapper improves the SWAP count by up to 52%, depth by up to 18%, latency by up to 18.6%, and error by up to 40%. On chiplet architectures, we achieve improvements of up to 36% on SWAP count, 8.7% on depth, 15% on latency, and 15% of error.

Keywords: Hierarchical Circuits, Qubit Mapping, Dynamic Circuits, Reconciliation.

ACM Reference Format:

Marouane Benbetka, Merwan Bekkar, Bokyeong Yoon, Riyadh Baghdadi, and Martin Kong. . Mapping Dynamic, Hierarchical Quantum Circuits . In Proceedings of . ACM, New York, NY, USA, 15 pages.

1 Introduction

Recent advances in technology have enabled mid-circuit measurements and qubit reset in quantum systems [12, 43].

Such features are fundamental in enabling new classes of experimental methods such as Repeat-Until-Success, classical feed-forward control, Quantum Error Correction, and Fault-Tolerant Quantum Computing. This paper tackles the problem of qubit mapping and routing for circuits with nested, data-dependent control-flow, where the result of mid-circuit measurements are used to select the execution of gates forming sub-circuits. We target classes of circuits that exhibit selective and iterative (loop-based) control-flow constructs with fixed-count, symbolic-count and nested control-flow structures.

Dynamic control-flow is the principal inhibitor of current qubit mapping methods, as it induces execution uncertainty and a dynamic dependence structure in quantum circuits. Multiple (new) classes of applications use mid-circuit measurements to condition the execution. Examples include teleportation and fault-tolerant protocols, magic state distillation, and phase correction. Teleportation protocols leverage classical feedback using circuits of constant depth that generate multi-partite entanglement [23]. Additionally, dynamic control-flow also enables fault-tolerant protocols, which often rely on feed-forward mechanisms.

There is a critical demand for effective qubit mapping methods that support quantum circuits with data-dependent control-flow (dynamic circuits, for short), as evidenced by recent work [3, 7, 9, 12, 15, 17, 21–23, 30, 31, 44–46, 50, 54, 57, 66]. While there has been a significant body of work that maps and routes qubits to address nearest-neighbor topological constraints [1, 28, 33, 52, 55, 60, 61, 63, 64], these have yet to tackle the problem in the context of dynamic control-flow. The primary underlying challenge is that the qubit mapping process is an inherently straight-line code compilation pass. To repair the connectivity between qubit arguments of any two-qubit gate, the current logical-to-physical mapping must be known. In light of this, naive mapping strategies for loops with fixed – known a priori – iteration counts resort to fully unrolling the loop body, effectively producing a static circuit. However, for-loops with parametric (symbolic) counts, while-loops and branch conditionals with data-dependent control-flow (using classical bits obtained

1^{1}Accepted for publication to the 2027 International Symposium on Code Generation and Optimization (CGO).

from mid-circuit measurements) pose significant challenges to qubit mappers.

In this paper, we introduce DynamiQ, a novel multi-objective qubit mapping and routing framework designed and implemented to handle dynamic quantum circuits featuring data-dependent control-flow. Unlike prior methods designed solely for static, acyclic circuits, DynamiQ explicitly models control-flow structure, ensuring consistent mapping states across all possible execution paths. It also introduces a fundamentally improved hardware-, error-, and latency-aware cost function. DynamiQ's cost model accounts for the current circuit depth and integrates QPU calibration data (two-qubit error rates). These additions make the mapping method both error-resilient and depth-efficient, improving mapping quality for dynamic circuits.

The contributions of our work are: i) A new hierarchical qubit mapping method that unifies the qubit mapping state across disjoint execution paths of the same nesting level by applying the token-swapping approximation of [32] at control-flow boundaries. The new method supports fixed and symbolic iterative constructs and multi-branch conditionals that exhibit data-dependent control-flow; ii) An enhanced multi-objective mapping cost function for straight-line circuits that builds on the Qlosure method [4]. The new cost function unifies four objectives, circuit depth, SWAP count, circuit error (i.e. aggregated error) and circuit latency; iii) Due to the lack of quantum benchmark suites with dynamic control-flow, we develop a new generator for hierarchical circuits, d-QUEKO (Dynamic-QUEKO) based on the QUEKO algorithm [56]; iv) Finally, an evaluation showing the effectiveness of DynamiQ over the LightSABRE mapper [68], on two monolithic QPUs (127/156-qubit) and two chiplet architectures, on dynamic and rotated surface-code circuits.

References (36)