Skip to main content

I-QMapper

Interactive, noise-aware qubit layout selection for IBM Quantum hardware — see your device, understand its errors, and place your circuit where it will actually run well.

tests Python 3.10+ License: Apache 2.0 arXiv

I-QMapper is presented in the paper I-QMapper: Error-Aware Layout Optimization and Device Diagnostics for NISQ Hardware (Bazayeva & Merz, arXiv:2606.27508). The repository tracks development beyond the arXiv version.

I-QMapper — auto-placed LUCJ layout with role legend on an IBM Heron device

Contents: Why · Features · Requirements · Installation · Set up your IBM Quantum account · Quickstart · Tutorial · How it works · Extending to other vendors · Project layout · Limitations · License & Citing


Why

On NISQ hardware, where you place a circuit matters as much as what you run: gate errors, readout errors, and coherence times vary across the chip and drift over time. Today you either eyeball calibration tables by hand or trust an automated layout pipeline you can't see into. I-QMapper closes that gap: an interactive Jupyter tool where the device, its calibration data, its history, and your layout live in one view — so every placement decision is visible, inspectable, and reproducible.

Features

  • 🗺️ Live error heatmaps on the real device topology — readout, CZ error, coherence, and more, straight from current calibration data.
  • 🕰️ Time travel — intraday snapshots, multi-day history, and delta views that show what drifted since yesterday (or since any reference you pick).
  • 📈 Stability Check — don't just pick the best qubits today; see which qubits stay good across a 7/14/30-day window.
  • 🎯 Two operating modes — a general-purpose mode for arbitrary circuits, and a dedicated mode for the LUCJ ansatz (quantum chemistry), with one-click auto-placement on heavy-hex topologies.
  • 🏆 Layout scoring & ranking (LQS) — an error-aware quality score to compare candidate layouts before spending QPU time.
  • 📦 Import & export — import layouts from JSON / .npy / QPY; export publication-ready PNGs, time-lapse GIF/MP4 of calibration history, full session save/restore, and generated Qiskit code for your chosen layout.
  • 🔒 Local-first — your IBM Quantum credentials never leave your machine; the tool talks to IBM through your own locally saved QiskitRuntimeService account.

Requirements

Installation

# core
pip install -e .

# core + PNG export (adds kaleido)
pip install -e ".[png]"

# core + PNG + time-lapse GIF/MP4 (adds imageio, imageio-ffmpeg)
pip install -e ".[png,timelapse]"

# development (test suite)
pip install -e ".[dev]"

Set up your IBM Quantum account

I-QMapper uses the credentials you save locally with qiskit-ibm-runtime — it never asks for, stores, or transmits your token itself. One-time setup:

from qiskit_ibm_runtime import QiskitRuntimeService

QiskitRuntimeService.save_account(
    channel='ibm_quantum_platform',
    token='YOUR_TOKEN',
    instance='YOUR_CRN',
    set_as_default=True,    # make this your default credential
    overwrite=True,
)

Find your token and instance CRN on the IBM Quantum Platform dashboard.

Multiple accounts / instances. You can save one credential as your default and give the others a name= — for example a premium instance as the default, and another instance (e.g. a local QPU) you switch to on demand:

# premium instance — saved as the default (used when no name is selected)
QiskitRuntimeService.save_account(
    channel='ibm_quantum_platform',
    token='YOUR_TOKEN',
    instance='PREMIUM_CRN',
    set_as_default=True,
    overwrite=True,
)

# another instance (e.g. a local QPU) — saved under a name, picked explicitly
QiskitRuntimeService.save_account(
    channel='ibm_quantum_platform',
    token='YOUR_TOKEN',
    instance='OTHER_CRN',
    name='my_backend',
    overwrite=True,
)

In I-QMapper's account selector, the default credential is used unless you pick a named one — switch between them anytime without re-entering anything.

Quickstart

In a notebook cell:

from iqmapper import run
run()

This opens the sidebar UI. Pick IBM Quantum, choose your saved account, pick a backend, select the ansatz mode, and click Connect & Launch. From there you can place qubits by hand, auto-place a LUCJ layout, compare candidates by score, inspect calibration history, and export everything you see.

New here? Follow the step-by-step Tutorial.

Live error heatmap Delta view — calibration drift
Live error heatmap Delta view: what drifted since the reference
Stability check The app
Stability check over a 14-day window The full editor: layout, scoring, controls

How it works

Architecture in one paragraph — click to expand

The Python kernel is the auth and data layer: calibration data is fetched through your locally saved IBM account, cached per-user on disk, and rendered with Plotly inside ipywidgets panels. Every analysis (scoring, stability, delta) runs on the cached snapshots — so browsing history and comparing layouts costs no QPU time and no extra API calls. For a module-by-module tour, see CODE_OVERVIEW.md.

Where your data lives:

What Where
Calibration cache macOS ~/Library/Caches/iqmapper · Linux ~/.cache/iqmapper (or $XDG_CACHE_HOME/iqmapper) · Windows %LOCALAPPDATA%\iqmapper\Cache
Cache override Set the IQMAPPER_CACHE_DIR environment variable to relocate it
Sessions & style presets .iqmapper_sessions/ inside the directory your notebook runs from

The cache is safe to delete at any time — the tool recreates it and refetches on demand. Your IBM credentials are not stored by I-QMapper at all; they live in your own qiskit-ibm-runtime account store.

Extending to other vendors

How the vendor dispatch works — click to expand

Backend loading goes through an explicit dispatch table (_VENDOR_LOADERS in iqmapper/connection.py). Adding a provider means implementing one loader with the same signature and registering it — the UI, scoring, and visualization layers are vendor-agnostic. IBM Quantum is the provider shipped today.

Project layout

Repository structure — click to expand
iqmapper/
├── connection.py     # account loading, vendor dispatch, backend selection
├── data.py           # calibration fetch + per-user cache
├── plot.py           # device graph & heatmap rendering
├── auto_lucj.py      # LUCJ auto-placement + layout error scoring
├── stability.py      # multi-day stability analysis
├── state.py          # session state, undo/redo, (de)serialization
├── export/           # scoring (LQS), layout I/O, codegen, PNG/analysis export
└── ui/               # ipywidgets panels (builder, time, history, analysis, …)
tests/                # 183 tests, offline, no QPU required

For a guided tour of the modules and data flow, see CODE_OVERVIEW.md.

Limitations & caveats

What this tool is not — click to expand
  • Calibration data is as fresh as IBM's calibration cycle; the tool shows you reported device quality, which is a strong prior — not a guarantee — of run quality.
  • The LQS score is a first-order heuristic for relative layout comparison, not an absolute fidelity prediction.
  • Heavy-hex auto-placement currently targets IBM Heron/Nighthawk-class devices.

License, Credits & Citing

I-QMapper is released under the Apache License 2.0 (see also NOTICE).

Parts of this project build on IBM open-source work: the auto-LUCJ layout scorer was adapted from IBM code now incorporated in ffsim (Sung et al., arXiv:2605.03123), and the layout-quality estimator implements a cost function in the style of mapomatic (Nation & Treinish, PRX Quantum 4, 010327, 2023). The LUCJ ansatz is due to Motta et al., Chem. Sci. 14, 11213–11227 (2023), doi:10.1039/D3SC02516K.

If you use I-QMapper in your research, please cite the I-QMapper paper (arXiv:2606.27508) — see CITATION.cff.

Metadata

Release files for i-qmapper 0.0.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for i-qmapper 0.0.5
File Size Uploaded
i_qmapper-0.0.5.tar.gz 238.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for i-qmapper 0.0.5
File Interpreter ABI Platform
i_qmapper-0.0.5-py3-none-any.whl Python 3 none any Details

Total release size: 460.2 kB

Release files / i_qmapper-0.0.5.tar.gz

Download URL i_qmapper-0.0.5.tar.gz
Size 238.0 kB
Tags Source
SHA-256 checksum
How to use checksums
ea37d8ff3143a4dacca75f548ae4997db0989b98507a56fde50b8634d2499ca2
BLAKE2b-256 checksum
How to use checksums
68eae776930fd613efeeff885c2632f2b49aab8fd08c6b1ab8a191ecec53f198
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.0

Release files / i_qmapper-0.0.5-py3-none-any.whl

Download URL i_qmapper-0.0.5-py3-none-any.whl
Size 222.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c3b02076e8c9e55b4cd9f0d2bf9728f5bd588cb0f0fdad503627a59d70e95289
BLAKE2b-256 checksum
How to use checksums
8e9498f1c686ccb219a8536ed2946c3abdde505ebb175e23978cd32d532ff98f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.0

Release history Release notifications | RSS feed

This release

0.0.5 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page