A Compilation Framework for Quantum Circuits with Mid-Circuit Measurement Error Awareness
Ming Zhong, Zhemin Zhang, Xiangyu Ren, Chenghong Zhu, Siyuan Niu, Zhiding Liang
TL;DR
MCM enables dynamic quantum circuits and qubit reuse but introduces pronounced, qubit-dependent errors, challenging traditional compilers that ignore this heterogeneity. MERA addresses this gap by performing lightweight profiling to obtain per-qubit MCM error distributions (stable for ~24 hours) and integrating this information into a three-stage workflow: MCM-aware layout, routing, and ALAP scheduling with context-aware dynamic decoupling (CADD). The framework normalizes and leverages MCM error data to bias qubit mapping, SWAP decisions, and pulse scheduling, achieving average fidelity improvements of $24.94\%$–$52.00\%$ over Qiskit-Compiler and up to $122.58\%$ over QR-Map across 27 benchmarks, including real-device gains on IBM Eagle and Heron. These results demonstrate MERA's effectiveness for MCM-dominated dynamic circuits and its potential as an add-on to existing compilation frameworks, with practical impact for resource-efficient quantum computing and error correction workflows.
Abstract
Mid-circuit measurement (MCM) provides the capability for qubit reuse and dynamic control in quantum processors, enabling more resource-efficient algorithms and supporting error-correction procedures. However, MCM introduces several sources of error, including measurement-induced crosstalk, idling-qubit decoherence, and reset infidelity, and these errors exhibit pronounced qubit-dependent variability within a single device. Since existing compilers such as the Qiskit-compiler and QR-Map (the state-of-art qubit reuse compiler) do not account for this variability, circuits with frequent MCM operations often experience substantial fidelity loss. In thie paper, we propose MERA, a compilation framework that performs MCM-error-aware layout, routing, and scheduling. MERA leverages lightweight profiling to obtain a stable per-qubit MCM error distribution, which it uses to guide error-aware qubit mapping and SWAP insertions. To further mitigate MCM-related decoherence and crosstalk, MERA augments as-late-as-possible scheduling with context-aware dynamic decoupling. Evaluated on 27 benchmark circuits, MERA achieves 24.94% -- 52.00% fidelity improvement over the Qiskit compiler (optimization level 3) without introducing additional overhead. On QR-Map-generated circuits, it improves fidelity by 29.26% on average and up to 122.58% in the best case, demonstrating its effectiveness for dynamic circuits dominated by MCM operations.
