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
ntimes. - βοΈ 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
Layout2qDistanceto 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.
- π
networkxfor 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!
