This repository contains the first-place winning submission for the QPU Circuit Packing Challenge at the Q-SITE Hackathon 2024. Our project introduces a hardware-aware approach to packing multiple copies of quantum circuits onto a single QPU execution, maximizing efficiency while maintaining high fidelity.
Most quantum algorithms underutilize today's large QPUs. For example, running a 20-qubit circuit on IBM’s 127-qubit Eagle chip wastes over 100 idle qubits.
Goal:
Develop a strategy to replicate and pack a user's small circuit multiple times on a QPU, reduce the required number of shots, and control fidelity degradation.
- 🧩 Replicate the input quantum circuit
n
times. - ⚙️ Transpile each copy to disjoint, high-fidelity subregions of the QPU.
- 🔬 Execute all copies in one job, reducing total shots.
- 📊 Recover and separate measurement results with minimal fidelity loss.
- Uses IBM's coupling map and
Layout2qDistance
to assign the best zones to each circuit. - Avoids "noisy" or poorly connected qubits, guided by modularity-based community detection.
- Greedy + Graph Partitioning hybrid algorithm to identify optimal qubit clusters.
- Adaptive to backend architecture (e.g., IBM Fez, Eagle).
- Spatial separation enforced during packing to reduce coherent noise from RF interference.
Our method demonstrates:
- 📦 Efficient QPU utilization (up to 9x packing on 127 qubits).
- 🎯 Fidelity loss < 5% across multiple circuit copies.
- ⏱️ 5x–9x reduction in total runtime.
notebook.ipynb
: Main implementation and experiment notebook.packing_algorithm.py
: Core logic for zone partitioning and layout.results/
: Benchmark results, fidelity plots, and comparisons.ibm_fez.jpg
: Reference chart for hardware-aware error trends.
- 🧱 Qiskit for circuit definition and transpilation.
- 🔍
networkx
for backend graph analysis. - 📦 IBM Q backend APIs (via
qiskit-ibm-runtime
) for live deployment. - 📊 Matplotlib for visualization and fidelity analysis.
QPU Circuit Packing: A Fidelity-Aware Multi-Copy Execution Strategy.
🏆 Winner – Q-SITE Hackathon 2024
Authors: Hemish Ahuja, Mukul, Maral, Negar
August 31, 2024 — on IBM Fez
Huge thanks to Haiqu, IBM Quantum, and the Q-SITE Hackathon organizers for hosting this cutting-edge quantum challenge.
Feel free to reach out or connect on LinkedIn if you want to collaborate or learn more!