# iqm-finland/iqm-benchmarks architecture

> Architecture diagram of the GitHub repository iqm-finland/iqm-benchmarks, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-08). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/iqm-finland/iqm-benchmarks
- Repository: https://github.com/iqm-finland/iqm-benchmarks

## Overview

IQM Benchmarks is a modular quantum-hardware characterization suite. A user configures a benchmark, selects a hardware backend, executes circuits, and uses benchmark results and plots to assess device performance. The README identifies a shared Benchmark/BenchmarkBase API and a legacy BenchmarkExperiment that coordinates dependencies and result storage. Benchmark families and mGST are represented as distinct domain branches. The README and sampled references establish the high-level workflow; most benchmark implementations were not sampled, so their internal execution links are not inferred.

Main entry points: [`scheduled_experiments/adonis/weekly.py`](https://github.com/iqm-finland/iqm-benchmarks/blob/main/scheduled_experiments/adonis/weekly.py) (Weekly configurations), [`src/mGST/algorithm.py`](https://github.com/iqm-finland/iqm-benchmarks/blob/main/src/mGST/algorithm.py) (GST reconstruction), [`benchmark_runner.py`](https://github.com/iqm-finland/iqm-benchmarks/blob/main/benchmark_runner.py) (Benchmark runner), [`src/mGST/reporting/reporting.py`](https://github.com/iqm-finland/iqm-benchmarks/blob/main/src/mGST/reporting/reporting.py) (GST reporting)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_execution["Execution"]
  node_runner["Benchmark runner"]
  node_weekly["Weekly configurations<br/>[weekly.py]"]
  node_api["Benchmark API<br/>[benchmark.py]"]
  node_config["Benchmark configurations"]
  node_containers["Circuit containers"]
  node_experiment["Experiment coordination<br/>[benchmark.py]"]
end

subgraph group_gate["Gate characterization"]
  node_clifford["Clifford RB<br/>[clifford_rb.py]"]
  node_interleaved["Interleaved RB<br/>[interleaved_rb.py]"]
  node_mirror["Mirror RB<br/>[mirror_rb.py]"]
  node_eplg["Error per layer<br/>[eplg.py]"]
end

subgraph group_holistic["Holistic benchmarks"]
  node_qv["Quantum Volume<br/>[quantum_volume.py]"]
  node_clops["CLOPS<br/>[clops.py]"]
end

subgraph group_entangle["Entanglement and optimization"]
  node_ghz["GHZ fidelity<br/>[ghz.py]"]
  node_graphstates["Graph states<br/>[graph_states.py]"]
  node_qscore["Q-Score<br/>[qscore.py]"]
end

subgraph group_mgst["Compressive GST"]
  node_gst["Compressive GST<br/>[compressive_gst.py]"]
  node_gst_analysis["GST analysis<br/>[gst_analysis.py]"]
  node_mgst_algorithm["GST reconstruction<br/>[algorithm.py]"]
  node_mgst_opt["Manifold optimization<br/>[optimization.py]"]
  node_mgst_kernels["Numerical kernels<br/>[low_level_jit.py]"]
  node_mgst_utils["GST utilities<br/>[additional_fns.py]"]
  node_mgst_qiskit["Qiskit bridge"]
  node_mgst_compat["pyGSTi bridge<br/>[compatibility.py]"]
  node_mgst_reporting["GST reporting<br/>[reporting.py]"]
  node_mgst_figures["GST figures<br/>[figure_gen.py]"]
end

node_user(("Benchmark user"))
node_backend{{"Quantum backend"}}

node_user -->|"sets options"| node_config
node_user -->|"selects backend"| node_backend
node_runner -->|"loads configurations"| node_weekly
node_runner -->|"runs"| node_interleaved
node_runner -->|"runs"| node_qv
node_runner -->|"runs"| node_ghz
node_weekly -->|"configures"| node_clifford
node_weekly -->|"configures"| node_interleaved
node_weekly -->|"configures"| node_mirror
node_weekly -->|"configures"| node_clops
node_weekly -->|"configures"| node_qv
node_weekly -->|"configures"| node_ghz
node_api -.->|"executes on"| node_backend
node_experiment -->|"coordinates"| node_api
node_gst -.->|"reconstructs with"| node_mgst_algorithm
node_mgst_algorithm -->|"optimizes via"| node_mgst_opt
node_mgst_algorithm -->|"calls kernels"| node_mgst_kernels
node_mgst_algorithm -->|"uses utilities"| node_mgst_utils
node_mgst_algorithm -->|"generates figures"| node_mgst_figures
node_mgst_utils -->|"calls kernels"| node_mgst_kernels
node_mgst_opt -->|"calls kernels"| node_mgst_kernels
node_mgst_qiskit -.->|"builds circuits for"| node_backend
node_mgst_reporting -->|"runs reconstruction"| node_mgst_algorithm
node_mgst_reporting -->|"converts models"| node_mgst_compat
node_mgst_reporting -->|"samples data"| node_mgst_utils
node_mgst_figures -->|"uses report data"| node_mgst_reporting

click node_runner "https://github.com/iqm-finland/iqm-benchmarks/blob/main/benchmark_runner.py"
click node_weekly "https://github.com/iqm-finland/iqm-benchmarks/blob/main/scheduled_experiments/adonis/weekly.py"
click node_api "https://github.com/iqm-finland/iqm-benchmarks/blob/main/src/iqm/benchmarks/benchmark.py"
click node_config "https://github.com/iqm-finland/iqm-benchmarks/blob/main/src/iqm/benchmarks/benchmark_definition.py"
click node_containers "https://github.com/iqm-finland/iqm-benchmarks/blob/main/src/iqm/benchmarks/circuit_containers.py"
click node_experiment "https://github.com/iqm-finland/iqm-benchmarks/blob/main/src/iqm/benchmarks/benchmark.py"
click node_clifford "https://github.com/iqm-finland/iqm-benchmarks/blob/main/src/iqm/benchmarks/randomized_benchmarking/clifford_rb/clifford_rb.py"
click node_interleaved "https://github.com/iqm-finland/iqm-benchmarks/blob/main/src/iqm/benchmarks/randomized_benchmarking/interleaved_rb/interleaved_rb.py"
click node_mirror "https://github.com/iqm-finland/iqm-benchmarks/blob/main/src/iqm/benchmarks/randomized_benchmarking/mirror_rb/mirror_rb.py"
click node_eplg "https://github.com/iqm-finland/iqm-benchmarks/blob/main/src/iqm/benchmarks/randomized_benchmarking/eplg/eplg.py"
click node_gst "https://github.com/iqm-finland/iqm-benchmarks/blob/main/src/iqm/benchmarks/compressive_gst/compressive_gst.py"
click node_gst_analysis "https://github.com/iqm-finland/iqm-benchmarks/blob/main/src/iqm/benchmarks/compressive_gst/gst_analysis.py"
click node_mgst_algorithm "https://github.com/iqm-finland/iqm-benchmarks/blob/main/src/mGST/algorithm.py"
click node_mgst_opt "https://github.com/iqm-finland/iqm-benchmarks/blob/main/src/mGST/optimization.py"
click node_mgst_kernels "https://github.com/iqm-finland/iqm-benchmarks/blob/main/src/mGST/low_level_jit.py"
click node_mgst_utils "https://github.com/iqm-finland/iqm-benchmarks/blob/main/src/mGST/additional_fns.py"
click node_mgst_qiskit "https://github.com/iqm-finland/iqm-benchmarks/blob/main/src/mGST/qiskit_interface.py"
click node_mgst_compat "https://github.com/iqm-finland/iqm-benchmarks/blob/main/src/mGST/compatibility.py"
click node_mgst_reporting "https://github.com/iqm-finland/iqm-benchmarks/blob/main/src/mGST/reporting/reporting.py"
click node_mgst_figures "https://github.com/iqm-finland/iqm-benchmarks/blob/main/src/mGST/reporting/figure_gen.py"
click node_qv "https://github.com/iqm-finland/iqm-benchmarks/blob/main/src/iqm/benchmarks/quantum_volume/quantum_volume.py"
click node_clops "https://github.com/iqm-finland/iqm-benchmarks/blob/main/src/iqm/benchmarks/quantum_volume/clops.py"
click node_ghz "https://github.com/iqm-finland/iqm-benchmarks/blob/main/src/iqm/benchmarks/entanglement/ghz.py"
click node_graphstates "https://github.com/iqm-finland/iqm-benchmarks/blob/main/src/iqm/benchmarks/entanglement/graph_states.py"
click node_qscore "https://github.com/iqm-finland/iqm-benchmarks/blob/main/src/iqm/benchmarks/optimization/qscore.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_runner,node_weekly,node_api,node_config,node_containers,node_experiment,node_user toneBlue
class node_clifford,node_interleaved,node_mirror,node_eplg toneAmber
class node_qv,node_clops toneMint
class node_ghz,node_graphstates,node_qscore toneRose
class node_gst,node_gst_analysis,node_mgst_algorithm,node_mgst_opt,node_mgst_kernels,node_mgst_utils,node_mgst_qiskit,node_mgst_compat,node_mgst_reporting,node_mgst_figures,node_backend toneIndigo
```

## Components

### Execution

- [Benchmark runner](https://github.com/iqm-finland/iqm-benchmarks/blob/main/benchmark_runner.py): `benchmark_runner.py`
- [Weekly configurations](https://github.com/iqm-finland/iqm-benchmarks/blob/main/scheduled_experiments/adonis/weekly.py): `scheduled_experiments/adonis/weekly.py`
- [Benchmark API](https://github.com/iqm-finland/iqm-benchmarks/blob/main/src/iqm/benchmarks/benchmark.py): `src/iqm/benchmarks/benchmark.py`
- [Benchmark configurations](https://github.com/iqm-finland/iqm-benchmarks/blob/main/src/iqm/benchmarks/benchmark_definition.py): `src/iqm/benchmarks/benchmark_definition.py`
- [Circuit containers](https://github.com/iqm-finland/iqm-benchmarks/blob/main/src/iqm/benchmarks/circuit_containers.py): `src/iqm/benchmarks/circuit_containers.py`
- [Experiment coordination](https://github.com/iqm-finland/iqm-benchmarks/blob/main/src/iqm/benchmarks/benchmark.py): `src/iqm/benchmarks/benchmark.py`

### Gate characterization

- [Clifford RB](https://github.com/iqm-finland/iqm-benchmarks/blob/main/src/iqm/benchmarks/randomized_benchmarking/clifford_rb/clifford_rb.py): `src/iqm/benchmarks/randomized_benchmarking/clifford_rb/clifford_rb.py`
- [Interleaved RB](https://github.com/iqm-finland/iqm-benchmarks/blob/main/src/iqm/benchmarks/randomized_benchmarking/interleaved_rb/interleaved_rb.py): `src/iqm/benchmarks/randomized_benchmarking/interleaved_rb/interleaved_rb.py`
- [Mirror RB](https://github.com/iqm-finland/iqm-benchmarks/blob/main/src/iqm/benchmarks/randomized_benchmarking/mirror_rb/mirror_rb.py): `src/iqm/benchmarks/randomized_benchmarking/mirror_rb/mirror_rb.py`
- [Error per layer](https://github.com/iqm-finland/iqm-benchmarks/blob/main/src/iqm/benchmarks/randomized_benchmarking/eplg/eplg.py): `src/iqm/benchmarks/randomized_benchmarking/eplg/eplg.py`

### Holistic benchmarks

- [Quantum Volume](https://github.com/iqm-finland/iqm-benchmarks/blob/main/src/iqm/benchmarks/quantum_volume/quantum_volume.py): `src/iqm/benchmarks/quantum_volume/quantum_volume.py`
- [CLOPS](https://github.com/iqm-finland/iqm-benchmarks/blob/main/src/iqm/benchmarks/quantum_volume/clops.py): `src/iqm/benchmarks/quantum_volume/clops.py`

### Entanglement and optimization

- [GHZ fidelity](https://github.com/iqm-finland/iqm-benchmarks/blob/main/src/iqm/benchmarks/entanglement/ghz.py): `src/iqm/benchmarks/entanglement/ghz.py`
- [Graph states](https://github.com/iqm-finland/iqm-benchmarks/blob/main/src/iqm/benchmarks/entanglement/graph_states.py): `src/iqm/benchmarks/entanglement/graph_states.py`
- [Q-Score](https://github.com/iqm-finland/iqm-benchmarks/blob/main/src/iqm/benchmarks/optimization/qscore.py): `src/iqm/benchmarks/optimization/qscore.py`

### Compressive GST

- [Compressive GST](https://github.com/iqm-finland/iqm-benchmarks/blob/main/src/iqm/benchmarks/compressive_gst/compressive_gst.py): `src/iqm/benchmarks/compressive_gst/compressive_gst.py`
- [GST analysis](https://github.com/iqm-finland/iqm-benchmarks/blob/main/src/iqm/benchmarks/compressive_gst/gst_analysis.py): `src/iqm/benchmarks/compressive_gst/gst_analysis.py`
- [GST reconstruction](https://github.com/iqm-finland/iqm-benchmarks/blob/main/src/mGST/algorithm.py): `src/mGST/algorithm.py`
- [Manifold optimization](https://github.com/iqm-finland/iqm-benchmarks/blob/main/src/mGST/optimization.py): `src/mGST/optimization.py`
- [Numerical kernels](https://github.com/iqm-finland/iqm-benchmarks/blob/main/src/mGST/low_level_jit.py): `src/mGST/low_level_jit.py`
- [GST utilities](https://github.com/iqm-finland/iqm-benchmarks/blob/main/src/mGST/additional_fns.py): `src/mGST/additional_fns.py`
- [Qiskit bridge](https://github.com/iqm-finland/iqm-benchmarks/blob/main/src/mGST/qiskit_interface.py): `src/mGST/qiskit_interface.py`
- [pyGSTi bridge](https://github.com/iqm-finland/iqm-benchmarks/blob/main/src/mGST/compatibility.py): `src/mGST/compatibility.py`
- [GST reporting](https://github.com/iqm-finland/iqm-benchmarks/blob/main/src/mGST/reporting/reporting.py): `src/mGST/reporting/reporting.py`
- [GST figures](https://github.com/iqm-finland/iqm-benchmarks/blob/main/src/mGST/reporting/figure_gen.py): `src/mGST/reporting/figure_gen.py`

### Other components

- **Benchmark user**
- **Quantum backend**

## Connections

- Benchmark user → Benchmark configurations: sets options (evidence: `README.md`)
- Benchmark user → Quantum backend: selects backend (evidence: `README.md`)
- Benchmark runner → Weekly configurations: loads configurations (evidence: `benchmark_runner.py`)
- Benchmark runner → Interleaved RB: runs (evidence: `benchmark_runner.py`)
- Benchmark runner → Quantum Volume: runs (evidence: `benchmark_runner.py`)
- Benchmark runner → GHZ fidelity: runs (evidence: `benchmark_runner.py`)
- Weekly configurations → Clifford RB: configures (evidence: `scheduled_experiments/adonis/weekly.py`)
- Weekly configurations → Interleaved RB: configures (evidence: `scheduled_experiments/adonis/weekly.py`)
- Weekly configurations → Mirror RB: configures (evidence: `scheduled_experiments/adonis/weekly.py`)
- Weekly configurations → CLOPS: configures (evidence: `scheduled_experiments/adonis/weekly.py`)
- Weekly configurations → Quantum Volume: configures (evidence: `scheduled_experiments/adonis/weekly.py`)
- Weekly configurations → GHZ fidelity: configures (evidence: `scheduled_experiments/adonis/weekly.py`)
- Benchmark API → Quantum backend: executes on
- Experiment coordination → Benchmark API: coordinates (evidence: `README.md`)
- Compressive GST → GST reconstruction: reconstructs with
- GST reconstruction → Manifold optimization: optimizes via (evidence: `src/mGST/algorithm.py`)
- GST reconstruction → Numerical kernels: calls kernels (evidence: `src/mGST/algorithm.py`)
- GST reconstruction → GST utilities: uses utilities (evidence: `src/mGST/algorithm.py`)
- GST reconstruction → GST figures: generates figures (evidence: `src/mGST/algorithm.py`)
- GST utilities → Numerical kernels: calls kernels (evidence: `src/mGST/additional_fns.py`)
- Manifold optimization → Numerical kernels: calls kernels (evidence: `src/mGST/optimization.py`)
- Qiskit bridge → Quantum backend: builds circuits for
- GST reporting → GST reconstruction: runs reconstruction (evidence: `src/mGST/reporting/reporting.py`)
- GST reporting → pyGSTi bridge: converts models (evidence: `src/mGST/reporting/reporting.py`)
- GST reporting → GST utilities: samples data (evidence: `src/mGST/reporting/reporting.py`)
- GST figures → GST reporting: uses report data (evidence: `src/mGST/reporting/figure_gen.py`)
