IQM Qubit Selector
Picks the best set of qubits on an IQM QPU to run a given circuit on.
Gate and readout fidelities vary from qubit to qubit and from coupler to coupler, so where a circuit runs matters. IQM Qubit Selector enumerates the placements the QPU's couplings allow and ranks them with the latest calibration metrics, without transpiling the circuit for any candidate.
Quick start
from math import pi
from iqm.iqm_client import IQMClient
from iqm.pulse import Circuit
from iqm.pulse.circuit_operations import CircuitOperationList
from iqm.qubit_selector.core import select_layout
client = IQMClient.from_url("https://resonance.iqm.tech/", quantum_computer="garnet")
# A three-qubit GHZ circuit on placeholder qubits QB1..QB3
builder = CircuitOperationList(num_qubits=3)
builder.prx(pi / 2, 0.0, 0)
for i in range(1, 3):
builder.prx(pi / 2, 0.0, i)
builder.cz(i - 1, i)
circuit = Circuit(name="ghz", instructions=tuple(builder))
# The architecture and its calibration metrics are fetched from the client
for layout, error in select_layout(circuit, client=client, num_layouts=3):
print(layout, f"{error:.2%}")
Set the IQM_TOKEN environment variable to your API token before connecting.
To place several circuits, fetch the architecture and metrics once and pass
them instead of the client, as select_layout(circuit, arch, metrics). This
also works without a client, e.g. with metrics measured offline.
Features
- SDK-agnostic. The core,
iqm.qubit_selector.core, works on aniqm.pulse.Circuit, so circuits from IQM Pulse, Qiskit, Cirq and Qrisp are all placed with the same call. - Calibration-aware. Layouts are ranked by an error budget built from
two-qubit, single-qubit and, optionally, readout fidelities.
score_layoutsreturns the breakdown for every candidate. - Crystal and Star QPUs. On Star QPUs the resonator is handled automatically; no extra arguments are needed.
- Extensible. The coupling graph, enumerators and cost model can be used on their own, or replaced with your own.
Version 2.0 replaces the Qiskit-based iqm.qubit_selector.qubit_selector and
iqm.qubit_selector.qiskit_utils modules with iqm.qubit_selector.core. The
old modules are removed and there is no compatibility layer; see the changelog
for how to port existing code.
Documentation
The user guide, API reference and example notebooks are at docs.iqm.tech/iqm-qubit-selector.
Installation
Note: uv is highly recommended for practical Python environment and package management. The supported Python versions are
=3.11, <3.15.
uv pip install iqm-qubit-selector
Optional extras
The following optional extras are available:
notebook: Qiskit, Cirq and Qrisp support, and Jupyter for the notebooks
All extras are inter-compatible and each adds more dependencies on top of the base install. To install all of them:
uv pip install "iqm-qubit-selector[notebook]"
Reproducible installations
For reproducible installations, pinned dependency extras are available:
pin-iqm: pins inter-IQM package dependencies to exact co-released versions.pin-all: likepin-iqm, but additionally pins all transitive third-party dependencies.
These can be combined with other extras. The following combined extras are available:
notebook-pin-iqmnotebook-pin-all
For example:
uv pip install "iqm-qubit-selector[notebook-pin-all]"
All extras are inter-compatible, so you can combine multiple extras with pinning as needed.
Note: This package was tested at release time for clean installation with
uv 0.13.6andpip 25.1.1. Other versions are likely to work but are not verified per release.
Metadata
Release files for iqm-qubit-selector 2.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| iqm_qubit_selector-2.0.0.tar.gz | 35.4 kB | Without provenance | Details for iqm_qubit_selector-2.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| iqm_qubit_selector-2.0.0-py3-none-any.whl | Python 3 | none | any | Details for iqm_qubit_selector-2.0.0-py3-none-any.whl |
Total release size: 72.0 kB
Release files / iqm_qubit_selector-2.0.0.tar.gz
| Download URL | iqm_qubit_selector-2.0.0.tar.gz |
|---|---|
| Size | 35.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6e3d6c908be8458defdb34016323b7a11d82ec0ba1da69d8d4c772fd24453384
|
|
BLAKE2b-256 checksum How to use checksums |
9ce24904b96fffd8f319b86e4dc185bdc56c0c24a2353919c74be1eb8a1b1365
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.3
|
Release files / iqm_qubit_selector-2.0.0-py3-none-any.whl
| Download URL | iqm_qubit_selector-2.0.0-py3-none-any.whl |
|---|---|
| Size | 36.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f9efdcf75490065304a14602a195cd901c92503b02f39eb758b573e2a0d53af0
|
|
BLAKE2b-256 checksum How to use checksums |
f1421182e849fa42b521bb12611346013b66495fe1dad139b228592ec0431693
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.3
|
Security for iqm-qubit-selector 2.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.