A number of commercially available quantum computers, such as those based on trapped-ion or superconducting qubits, can now perform mid-circuit measurements and resets.In addition to being crucial for quantum error correction, this capability can help reduce the number of qubits needed to execute many types of quantum algorithms by measuring qubits as early as possible, resetting them, and reusing them elsewhere in the circuit.In this work, we introduce the idea of qubit-reuse compilation, which takes as input a quantum circuit and produces as output a compiled circuit that requires fewer qubits to execute due to qubit reuse.We present two algorithms for performing qubit-reuse compilation: an exact constraint programming optimization model and a greedy heuristic.We introduce the concept of dual circuits, obtained by exchanging state preparations with measurements and vice versa and reversing time, and show that optimal qubit-reuse compilation requires the same number of qubits to execute a circuit as its dual.We illustrate the performance of these algorithms on a variety of relevant near-term quantum circuits, such as one-dimensional and two-dimensional time-evolution circuits, and numerically benchmark their performance on the quantum adiabatic optimization algorithm (QAOA) applied to the MaxCut problem on random three-regular graphs.To demonstrate the practical benefit of these techniques, we experimentally realize an 80-qubit QAOA MaxCut circuit on the 20-qubit Quantinuum H1-1 trapped-ion quantum processor using qubit-reuse compilation algorithms.
A number of commercially available quantum computers, such as those based on trapped-ion or superconducting qubits, can now perform mid-circuit measurements and resets.In addition to being crucial for quantum error correction, this capability can help reduce the number of qubits needed to execute many types of quantum algorithms by measuring qubits as early as possible, resetting them, and reusing them elsewhere in the circuit.In this work, we introduce the idea of qubit-reuse compilation, which takes as input a quantum circuit and produces as output a compiled circuit that requires fewer qubits to execute due to qubit reuse.We present two algorithms for performing qubit-reuse compilation: an exact constraint programming optimization model and a greedy heuristic.We introduce the concept of dual circuits, obtained by exchanging state preparations with measurements and vice versa and reversing time, and show that optimal qubit-reuse compilation requires the same number of qubits to execute a circuit as its dual.We illustrate the performance of these algorithms on a variety of relevant near-term quantum circuits, such as one-dimensional and two-dimensional time-evolution circuits, and numerically benchmark their performance on the quantum adiabatic optimization algorithm (QAOA) applied to the MaxCut problem on random three-regular graphs.To demonstrate the practical benefit of these techniques, we experimentally realize an 80-qubit QAOA MaxCut circuit on the 20-qubit Quantinuum H1-1 trapped-ion quantum processor using qubit-reuse compilation algorithms.
The practical applications of quantum computing is currently limited by the small number of available qubits. Recent advances in quantum hardware have introduced midcircuit measurements and resets, enabling the reuse of measured qubits and thus reducing the qubit requirements for executing quantum algorithms. In this work, we present a systematic study of dynamic quantum circuit compilation, a process that transforms static quantum circuits into their dynamic equivalents with fewer qubits through qubit reuse. We establish the first graph-based framework for optimizing qubit-reuse compilation. In particular, we characterize the task of finding the optimal compilation strategy for maximizing qubit reuse using binary integer programming and provide efficient heuristic algorithms for devising general compilation strategies. We conduct a thorough analysis of quantum circuits with practical relevance and offer their optimal qubit-reuse compilation strategies. We also perform a comparative analysis against state-of-the-art approaches, demonstrating the superior performance of our methods in both structured and random quantum circuits. Our framework lays a rigorous foundation for understanding dynamic quantum circuit compilation via qubit reuse, holding significant promise for the practical implementation of large-scale quantum algorithms on quantum computers with limited resources.
Near-term quantum computations are limited by high error rates, the scarcity of qubits and low qubit connectivity. Increasing support for mid-circuit measurements and qubit reset in near-term quantum computers enables qubit reuse that may yield quantum computations with fewer qubits and lower errors. In this work, we introduce a formal model for qubit reuse optimization that delivers provably optimal solutions with respect to quantum circuit depth, number of qubits, or number of swap gates for the first time. This is in contrast to related work where qubit reuse is used heuristically or optimally but without consideration of the mapping effort. We further investigate reset errors on near-term quantum computers by performing reset error characterization experiments. Using the hereby obtained reset error characterization and calibration data of a near-term quantum computer, we then determine a qubit assignment that is optimal with respect to a given cost function. We define this cost function to include gate errors and decoherence as well as the individual reset error of each qubit. We found the reset fidelity to be state-dependent and to range, depending on the reset qubit, from 67.5% to 100% in a near-term quantum computer. We demonstrate the applicability of the developed method to a number of quantum circuits and show improvements in the number of qubits and swap gate insertions, estimated success probability, and Hellinger fidelity of the investigated quantum circuits.
Mid-circuit measurement (MCM) enables qubit reuse and dynamic control in quantum processors, underpinning resource-efficient algorithms and quantum error correction. However, MCM introduces non-negligible errors, including measurement-induced crosstalk, idling-qubit decoherence, and reset infidelity. Additionally, MCM error rates vary across qubits within the same processor, with some exhibiting substantially higher errors. Existing compilers, including Qiskit-compiler and QR-Map, ignore MCM error variations, leading to fidelity loss in circuits with frequent MCM operations.
In this paper, we present MERA, an MCM-error-aware quantum compilation framework that integrates MCM error modeling into the layout, routing, and scheduling stages. We first use the lightweight profiling method to capture a per-qubit MCM error distribution that remains stable for over 24 hours. The distribution guides MERA in applying MCM-error-aware layout and routing, while MERA further incorporates context-aware dynamic decoupling to improve fidelity. In evaluation, MERA delivers 24.94% -- 80.48% average fidelity gains over the Qiskit-compiler (optimization level 3) across different groups in selected benchmarks without additional SWAP overhead. It also boosts the fidelity of QR-Map-generated circuits by 29.26% on average (up to 122.58%), demonstrating its effectiveness for circuits with frequent MCM operations.
Recently developed quantum computers support mid-circuit measurements, allowing qubit measurement, resetting, and reuse during the execution of quantum circuits. This capability opens new opportunities for optimizing quantum circuit compilation, particularly in the context of Noisy Intermediate-Scale Quantum devices. This paper explores the role of machine learning in integrating mid-circuit measurements into the compilation process, focusing on strategies to minimize errors. Specifically, we propose a reinforcement learning method to enable physically-aware qubit reuse and a machine learning method to support physically-aware synthesis-based qubit reuse. We conduct an extensive experimental evaluation to demonstrate the effectiveness of our methods using various quantum algorithms executed on an IBM quantum computer.
To optimize quantum computing performance, it is essential to reduce circuit complexity and minimize resource costs.In particular, mid-circuit measurement and qubit reuse techniques are highly effective in reducing the number of ancillary qubits in algorithms with repetitive operations.This study analyzes how the application of mid-circuit measurement and qubit reuse techniques affects circuit performance, using the Quantum Ripple Carry Adder (QRCA) as an example, which involves numerous repetitive tasks.For this purpose, the QRCA circuit was evaluated in terms of size, depth, and the number of ancillary qubits after applying these techniques.Experimental results showed that in conventional QRCA circuits, the number of ancillary qubits increases with the input size.However, when mid-circuit measurement and qubit reuse techniques were applied, the number of ancillary qubits remained fixed, effectively reducing from O(n) to O(1).Nonetheless, it was observed that this reduction in ancillary qubits increased circuit depth and size.These findings suggest a trade-off between qubit count, circuit depth, and size must be comprehensively considered to select the optimal circuit design.This research aims to contribute to the efficient implementation of optimized quantum circuits by appropriately utilizing mid-circuit measurement and qubit reuse techniques in algorithms that require maximum utilization of limited qubit resources.
Qubit reuse offers a promising way to reduce the hardware demands of quantum circuits, but current approaches are largely restricted to reordering measurements and applying qubit resets. In this work, we present an approach to further optimize quantum circuits by fully utilizing the potential of dynamic quantum circuits-more precisely by moving measurements and introducing dynamic circuit primitives such as classically controlled gates in a way that forges entirely new pathways for qubit reuse. This significantly reduces the number of required qubits for a variety of circuits, creating new opportunities for running complex circuits on near-term devices with limited qubit counts. We show that the proposed approach drastically outperforms existing methods, reducing qubit requirements where previous approaches are unable to do so for popular quantum circuits such as Quantum Phase Estimation (QPE), Quantum Fourier Transform~(QFT), and Variational Quantum Eigensolver (VQE) ansätze, as well as leading to improvements of up to 95% for sparse random circuits.