Projects

Smart Pass Manager

A noise-aware transpiler pass for Qiskit that maps circuits onto the least noisy qubits of an IBM quantum device.

FinishedJune 2025

Quantum computing fascinates me, so I worked through IBM’s learning platform to learn more. While looking at transpilation for noisy intermediate-scale quantum (NISQ) devices, I noticed that Qiskit’s default workflow optimises depth and SWAP count but ignores how much the error rates differ between qubits and couplers. To fill that gap I wrote a noise-aware pass manager and documented it in a short paper. As a newcomer to the field, I used ChatGPT for guidance and code review, and checked every suggestion myself.

How it works

From the backend’s live calibration data, every physical qubit and qubit pair gets its error figures: the two-qubit gate error ϵ2\epsilon_2 and duration t2t_2, the single-qubit error ϵ1\epsilon_1, the readout error rr and the relaxation time T1T_1. Each directed edge i→ji \to j of the coupling graph then receives a composite cost

w(i→j)=ϵ2(i→j)+α[ϵ1(i)+ϵ1(j)]+β[r(i)+r(j)]+δ t2(i→j)T‾1+γ+Prev(j→i),\begin{aligned} w(i \to j) ={}& \epsilon_2(i \to j) + \alpha \bigl[\epsilon_1(i) + \epsilon_1(j)\bigr] + \beta \bigl[r(i) + r(j)\bigr] \\ &+ \delta \, \frac{t_2(i \to j)}{\overline{T}_1} + \gamma + P_{\mathrm{rev}}(j \to i), \end{aligned}

where PrevP_{\mathrm{rev}} penalises non-native gate directions. The hyperparameters scale themselves from the backend’s statistics unless you set them by hand: α=ϵ2‾/ϵ1‾\alpha = \overline{\epsilon_2} / \overline{\epsilon_1}, β=α/2\beta = \alpha / 2, γ=ϵ2‾/k\gamma = \overline{\epsilon_2} / k as a compactness bias for a circuit with kk qubits, and a fixed decoherence weight δ=0.01\delta = 0.01.

For kk logical qubits the pass needs a connected patch of kk physical qubits with minimal total weight. It uses a multi-start greedy search: pick a few random seed edges, grow each patch by repeatedly adding the cheapest neighbouring qubit, and keep the best patch. That patch becomes the initial layout, a single iteration of SabreLayout refines it, and the standard Qiskit pipeline does the routing and optimisation.

Using it

It works as a drop-in replacement for transpile, or as a pass inside your own PassManager:

# drop-in replacement for qiskit.transpile
tqc = smart_transpile(qc, backend, optimization_level=2, seed=42)

# or as a layout pass in your own PassManager
layout = SmartLayoutPass(backend, hyper_params=None, seed=42)

Status

A handful of exploratory runs on IBM’s fake backends suggest a modest fidelity gain once a circuit has more than eight qubits and non-trivial depth. A proper benchmark is still outstanding: simulating a single noisy 20-qubit circuit beyond depth 20 can already take hours, so a full grid over qubit counts and depths needs serious compute time.

The approach builds on ideas from Murali et al., Noise-Adaptive Compiler Mappings for NISQ Computers (ASPLOS 2019).