Skip to main content

IQM Benchmarks

IQM Benchmarks is a suite of Quantum Characterization, Verification, and Validation (QCVV) tools for quantum computing. It is designed to be a comprehensive tool for benchmarking quantum hardware. The suite is designed to be modular, allowing users to easily add new benchmarks and customize existing ones. The suite is designed to be easy to use, with a simple API that allows users to run benchmarks with a single command.

Below is a list of the benchmarks currently available in the suite:

The project is split into different benchmarks, all inheriting from the Benchmark parent class. Each individual benchmark takes as an argument their own BenchmarkConfigurationBase class.

Characterize Physical Hardware

The IQM Benchmarks suite is designed to be used with real quantum hardware. To use the suite, you will need to have access to a quantum computer. The suite is designed to work with both IQM Resonance (IQM's quantum cloud service) and on-prem devices, but can be easily adapted to work with other quantum computing platforms.

To use the suite with IQM Resonance, you will need to set up an account and obtain an API token. You can then set the IQM_TOKEN environment variable to your API token. The suite will automatically use this token to authenticate with IQM Resonance.

import os
os.environ["IQM_TOKEN"] = "your_token"

Using a Jupyter notebook or Python script

You can easily set up one or more benchmarks by defining a configuration for them. For example, for Randomized, Interleaved and Mirror Benchmarking, or Quantum Volume:

from iqm.benchmarks.randomized_benchmarking.interleaved_rb.interleaved_rb \
    import InterleavedRBConfiguration
from iqm.benchmarks.randomized_benchmarking.mirror_rb.mirror_rb \
    import MirrorRBConfiguration
from iqm.benchmarks.quantum_volume.quantum_volume \
    import QuantumVolumeConfiguration

EXAMPLE_IRB = InterleavedRBConfiguration(
    qubits_array=[[3,4],[8,9]],
    sequence_lengths=[2**(m+1)-1 for m in range(7)],
    num_circuit_samples=30,
    shots=2**10,
    parallel_execution=True,
    interleaved_gate = "iSwapGate",
    interleaved_gate_params = None,
    simultaneous_fit = ["amplitude", "offset"],
)

EXAMPLE_MRB = MirrorRBConfiguration(
    qubits_array=[[0,1],
                  [0,1,3,4],
                  [0,1,3,4,8,9],
                  [0,1,3,4,8,9,13,14],
                  [0,1,3,4,8,9,13,14,17,18]],
    depths_array=[[2**m for m in range(9)],
                  [2**m for m in range(8)],
                  [2**m for m in range(7)],
                  [2**m for m in range(6)],
                  [2**m for m in range(5)]],
    num_circuit_samples=10,
    num_pauli_samples=5,
    shots=2**8,
    two_qubit_gate_ensemble={"CZGate": 0.7, "iSwapGate": 0.3},
    density_2q_gates=0.25,
)

EXAMPLE_QV = QuantumVolumeConfiguration(
    num_circuits=800,
    shots=2**8,
    num_sigmas=2,
    choose_qubits_routine="custom",
    custom_qubits_array=[[0,1,2,3], [0,1,3,4]],
    max_circuits_per_batch=100,
    rem=True,
    mit_shots=1_000,
)

In order to execute them, you must specify a backend:

  • First you need to specify the quantum computer name, i.e. "garnet"
  • Then you need to specify the base URL of the quantum computer.

Also, you need to reference the benchmark configuration you want to run:

from iqm.benchmarks.randomized_benchmarking.mirror_rb.mirror_rb import *
from iqm.qiskit_iqm import IQMProvider

quantum_computer = "" # the quantum computer name. i.e. "emerald", "garnet", "sirius"
iqm_server_url = "https://resonance.iqm.tech/" # base url

provider = IQMProvider(iqm_server_url, quantum_computer=quantum_computer)
backend = provider.get_backend()

EXAMPLE_EXPERIMENT = MirrorRandomizedBenchmarking(backend, EXAMPLE_MRB)
EXAMPLE_EXPERIMENT.run()

Full examples on how to run benchmarks and analyze the results can be found in the docs/examples folder.

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-benchmarks

Optional extras

The following optional extras are available:

  • examples: Example Jupyter notebooks and related dependencies

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-benchmarks[examples]"

Reproducible installations

For reproducible installations, pinned dependency extras are available:

  • pin-iqm: pins inter-IQM package dependencies to exact co-released versions.
  • pin-all: like pin-iqm, but additionally pins all transitive third-party dependencies.

These can be combined with other extras. The following combined extras are available:

  • examples-pin-iqm
  • examples-pin-all

For example:

uv pip install "iqm-benchmarks[examples-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.11.20 and pip 25.1.1. Other versions are likely to work but are not verified per release.

Metadata

Release files for iqm-benchmarks 3.0.0

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

Source distribution (sdist)

Source distribution for iqm-benchmarks 3.0.0
File Size Uploaded
iqm_benchmarks-3.0.0.tar.gz 224.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for iqm-benchmarks 3.0.0
File Interpreter ABI Platform
iqm_benchmarks-3.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 471.5 kB

Release files / iqm_benchmarks-3.0.0.tar.gz

Download URL iqm_benchmarks-3.0.0.tar.gz
Size 224.9 kB
Tags Source
SHA-256 checksum
How to use checksums
5d571123efbb7086ccdd545c3e64c1ed0d0c99c598b2271e457a0cba8c009dff
BLAKE2b-256 checksum
How to use checksums
d187bb23c54fccd586e2175674f226ed64bab95ff645f842e21f80c116796ecf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.3

Release files / iqm_benchmarks-3.0.0-py3-none-any.whl

Download URL iqm_benchmarks-3.0.0-py3-none-any.whl
Size 246.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2db5a43347837e9e66beb4dbc000e42e33ae442c8c34858bcf1c2954970c374b
BLAKE2b-256 checksum
How to use checksums
0dee55f811713ea45067d1c18f5518007e56c3ff30acc0ab49cc0841f067888b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.3

Release history Release notifications | RSS feed

This release

3.0.0 This release

2 release files

2.60.2

2 release files

2.60.1

2 release files

2.60.0

2 release files

2.59.4

2 release files

2.59.2

2 release files

2.58

2 release files

2.57

2 release files

2.56

2 release files

2.55

2 release files

2.54

2 release files

2.53

3 release files

2.52

2 release files

2.51

2 release files

2.50

2 release files

2.49

2 release files

2.48

2 release files

2.47

2 release files

2.46

2 release files

2.45

2 release files

2.44

2 release files

2.43

2 release files

2.42

2 release files

2.41

2 release files

2.40

2 release files

2.39

2 release files

2.38

2 release files

2.37

2 release files

2.36

2 release files

2.35

2 release files

2.34

2 release files

2.33

2 release files

2.32

2 release files

2.31

2 release files

2.30

2 release files

2.29

2 release files

2.28

2 release files

2.27

2 release files

2.26

2 release files

2.25

2 release files

2.24

2 release files

2.23

2 release files

2.22

2 release files

2.21

2 release files

2.20

2 release files

2.19

2 release files

2.18

2 release files

2.17

2 release files

2.16

2 release files

2.14

2 release files

2.13

2 release files

2.12

2 release files

2.11

2 release files

2.10

2 release files

2.9

2 release files

2.8

2 release files

2.7

2 release files

2.6

2 release files

2.5

2 release files

2.4

2 release files

2.3

2 release files

2.2

2 release files

2.1

2 release files

2.0

2 release files

1.12

2 release files

1.11

2 release files

1.10

2 release files

1.9

2 release files

1.8

2 release files

1.7

2 release files

1.6

2 release files

1.5

2 release files

1.4

2 release files

1.3

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