iqm-benchmarks 2.8__tar.gz → 2.9__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of iqm-benchmarks might be problematic. Click here for more details.

Files changed (94) hide show
  1. iqm_benchmarks-2.9/.github/workflows/main.yml +75 -0
  2. {iqm_benchmarks-2.8 → iqm_benchmarks-2.9}/.github/workflows/publish.yml +34 -18
  3. {iqm_benchmarks-2.8 → iqm_benchmarks-2.9}/CHANGELOG.rst +6 -3
  4. iqm_benchmarks-2.9/MANIFEST.in +1 -0
  5. {iqm_benchmarks-2.8/src/iqm_benchmarks.egg-info → iqm_benchmarks-2.9}/PKG-INFO +42 -27
  6. {iqm_benchmarks-2.8 → iqm_benchmarks-2.9}/README.md +37 -23
  7. iqm_benchmarks-2.9/docbuild +1 -0
  8. {iqm_benchmarks-2.8 → iqm_benchmarks-2.9}/docs/index.rst +1 -1
  9. iqm_benchmarks-2.9/format +2 -0
  10. {iqm_benchmarks-2.8 → iqm_benchmarks-2.9}/pyproject.toml +9 -3
  11. iqm_benchmarks-2.9/requirements.txt +2466 -0
  12. {iqm_benchmarks-2.8 → iqm_benchmarks-2.9}/src/iqm/benchmarks/compressive_gst/gst_analysis.py +12 -12
  13. {iqm_benchmarks-2.8 → iqm_benchmarks-2.9}/src/iqm/benchmarks/quantum_volume/quantum_volume.py +3 -3
  14. {iqm_benchmarks-2.8 → iqm_benchmarks-2.9}/src/iqm/benchmarks/randomized_benchmarking/mirror_rb/mirror_rb.py +2 -1
  15. {iqm_benchmarks-2.8 → iqm_benchmarks-2.9/src/iqm_benchmarks.egg-info}/PKG-INFO +42 -27
  16. {iqm_benchmarks-2.8 → iqm_benchmarks-2.9}/src/iqm_benchmarks.egg-info/SOURCES.txt +6 -1
  17. {iqm_benchmarks-2.8 → iqm_benchmarks-2.9}/src/iqm_benchmarks.egg-info/requires.txt +3 -2
  18. iqm_benchmarks-2.9/test +5 -0
  19. iqm_benchmarks-2.9/update-requirements.py +36 -0
  20. iqm_benchmarks-2.8/.github/workflows/main.yml +0 -62
  21. iqm_benchmarks-2.8/tox.ini +0 -92
  22. {iqm_benchmarks-2.8 → iqm_benchmarks-2.9}/.github/workflows/tag_and_release.yml +0 -0
  23. {iqm_benchmarks-2.8 → iqm_benchmarks-2.9}/.gitignore +0 -0
  24. {iqm_benchmarks-2.8 → iqm_benchmarks-2.9}/LICENSE +0 -0
  25. {iqm_benchmarks-2.8 → iqm_benchmarks-2.9}/benchmark_runner.py +0 -0
  26. {iqm_benchmarks-2.8 → iqm_benchmarks-2.9}/docs/API.rst +0 -0
  27. {iqm_benchmarks-2.8 → iqm_benchmarks-2.9}/docs/Makefile +0 -0
  28. {iqm_benchmarks-2.8 → iqm_benchmarks-2.9}/docs/_static/images/favicon.ico +0 -0
  29. {iqm_benchmarks-2.8 → iqm_benchmarks-2.9}/docs/_static/images/logo.png +0 -0
  30. {iqm_benchmarks-2.8 → iqm_benchmarks-2.9}/docs/_templates/autosummary-class-template.rst +0 -0
  31. {iqm_benchmarks-2.8 → iqm_benchmarks-2.9}/docs/_templates/autosummary-module-template.rst +0 -0
  32. {iqm_benchmarks-2.8 → iqm_benchmarks-2.9}/docs/changelog.rst +0 -0
  33. {iqm_benchmarks-2.8 → iqm_benchmarks-2.9}/docs/conf.py +0 -0
  34. {iqm_benchmarks-2.8 → iqm_benchmarks-2.9}/docs/example_clifford_rb.ipynb +0 -0
  35. {iqm_benchmarks-2.8 → iqm_benchmarks-2.9}/docs/examples.rst +0 -0
  36. {iqm_benchmarks-2.8 → iqm_benchmarks-2.9}/docs/license.rst +0 -0
  37. {iqm_benchmarks-2.8 → iqm_benchmarks-2.9}/docs/readme.md +0 -0
  38. {iqm_benchmarks-2.8 → iqm_benchmarks-2.9}/examples/example_clops.ipynb +0 -0
  39. {iqm_benchmarks-2.8 → iqm_benchmarks-2.9}/examples/example_experiment_all.ipynb +0 -0
  40. {iqm_benchmarks-2.8 → iqm_benchmarks-2.9}/examples/example_ghz.ipynb +0 -0
  41. {iqm_benchmarks-2.8 → iqm_benchmarks-2.9}/examples/example_gst.ipynb +0 -0
  42. {iqm_benchmarks-2.8 → iqm_benchmarks-2.9}/examples/example_interleaved_rb.ipynb +0 -0
  43. {iqm_benchmarks-2.8 → iqm_benchmarks-2.9}/examples/example_mirror_rb.ipynb +0 -0
  44. {iqm_benchmarks-2.8 → iqm_benchmarks-2.9}/examples/example_qscore.ipynb +0 -0
  45. {iqm_benchmarks-2.8 → iqm_benchmarks-2.9}/examples/example_quantum_volume.ipynb +0 -0
  46. {iqm_benchmarks-2.8 → iqm_benchmarks-2.9}/examples/generate_2qubit_cliffords.ipynb +0 -0
  47. {iqm_benchmarks-2.8 → iqm_benchmarks-2.9}/examples/how_to_make_your_own_benchmark.ipynb +0 -0
  48. {iqm_benchmarks-2.8 → iqm_benchmarks-2.9}/scheduled_experiments/adonis/__init__.py +0 -0
  49. {iqm_benchmarks-2.8 → iqm_benchmarks-2.9}/scheduled_experiments/adonis/weekly.py +0 -0
  50. {iqm_benchmarks-2.8 → iqm_benchmarks-2.9}/setup.cfg +0 -0
  51. {iqm_benchmarks-2.8 → iqm_benchmarks-2.9}/src/iqm/benchmarks/__init__.py +0 -0
  52. {iqm_benchmarks-2.8 → iqm_benchmarks-2.9}/src/iqm/benchmarks/benchmark.py +0 -0
  53. {iqm_benchmarks-2.8 → iqm_benchmarks-2.9}/src/iqm/benchmarks/benchmark_definition.py +0 -0
  54. {iqm_benchmarks-2.8 → iqm_benchmarks-2.9}/src/iqm/benchmarks/circuit_containers.py +0 -0
  55. {iqm_benchmarks-2.8 → iqm_benchmarks-2.9}/src/iqm/benchmarks/compressive_gst/__init__.py +0 -0
  56. {iqm_benchmarks-2.8 → iqm_benchmarks-2.9}/src/iqm/benchmarks/compressive_gst/compressive_gst.py +0 -0
  57. {iqm_benchmarks-2.8 → iqm_benchmarks-2.9}/src/iqm/benchmarks/entanglement/__init__.py +0 -0
  58. {iqm_benchmarks-2.8 → iqm_benchmarks-2.9}/src/iqm/benchmarks/entanglement/ghz.py +0 -0
  59. {iqm_benchmarks-2.8 → iqm_benchmarks-2.9}/src/iqm/benchmarks/logging_config.py +0 -0
  60. {iqm_benchmarks-2.8 → iqm_benchmarks-2.9}/src/iqm/benchmarks/optimization/__init__.py +0 -0
  61. {iqm_benchmarks-2.8 → iqm_benchmarks-2.9}/src/iqm/benchmarks/optimization/qscore.py +0 -0
  62. {iqm_benchmarks-2.8 → iqm_benchmarks-2.9}/src/iqm/benchmarks/quantum_volume/__init__.py +0 -0
  63. {iqm_benchmarks-2.8 → iqm_benchmarks-2.9}/src/iqm/benchmarks/quantum_volume/clops.py +0 -0
  64. {iqm_benchmarks-2.8 → iqm_benchmarks-2.9}/src/iqm/benchmarks/randomized_benchmarking/__init__.py +0 -0
  65. {iqm_benchmarks-2.8 → iqm_benchmarks-2.9}/src/iqm/benchmarks/randomized_benchmarking/clifford_1q.pkl +0 -0
  66. {iqm_benchmarks-2.8 → iqm_benchmarks-2.9}/src/iqm/benchmarks/randomized_benchmarking/clifford_2q.pkl +0 -0
  67. {iqm_benchmarks-2.8 → iqm_benchmarks-2.9}/src/iqm/benchmarks/randomized_benchmarking/clifford_rb/__init__.py +0 -0
  68. {iqm_benchmarks-2.8 → iqm_benchmarks-2.9}/src/iqm/benchmarks/randomized_benchmarking/clifford_rb/clifford_rb.py +0 -0
  69. {iqm_benchmarks-2.8 → iqm_benchmarks-2.9}/src/iqm/benchmarks/randomized_benchmarking/interleaved_rb/__init__.py +0 -0
  70. {iqm_benchmarks-2.8 → iqm_benchmarks-2.9}/src/iqm/benchmarks/randomized_benchmarking/interleaved_rb/interleaved_rb.py +0 -0
  71. {iqm_benchmarks-2.8 → iqm_benchmarks-2.9}/src/iqm/benchmarks/randomized_benchmarking/mirror_rb/__init__.py +0 -0
  72. {iqm_benchmarks-2.8 → iqm_benchmarks-2.9}/src/iqm/benchmarks/randomized_benchmarking/multi_lmfit.py +0 -0
  73. {iqm_benchmarks-2.8 → iqm_benchmarks-2.9}/src/iqm/benchmarks/randomized_benchmarking/randomized_benchmarking_common.py +0 -0
  74. {iqm_benchmarks-2.8 → iqm_benchmarks-2.9}/src/iqm/benchmarks/readout_mitigation.py +0 -0
  75. {iqm_benchmarks-2.8 → iqm_benchmarks-2.9}/src/iqm/benchmarks/utils.py +0 -0
  76. {iqm_benchmarks-2.8 → iqm_benchmarks-2.9}/src/iqm_benchmarks.egg-info/dependency_links.txt +0 -0
  77. {iqm_benchmarks-2.8 → iqm_benchmarks-2.9}/src/iqm_benchmarks.egg-info/top_level.txt +0 -0
  78. {iqm_benchmarks-2.8 → iqm_benchmarks-2.9}/src/mGST/LICENSE +0 -0
  79. {iqm_benchmarks-2.8 → iqm_benchmarks-2.9}/src/mGST/README.md +0 -0
  80. {iqm_benchmarks-2.8 → iqm_benchmarks-2.9}/src/mGST/additional_fns.py +0 -0
  81. {iqm_benchmarks-2.8 → iqm_benchmarks-2.9}/src/mGST/algorithm.py +0 -0
  82. {iqm_benchmarks-2.8 → iqm_benchmarks-2.9}/src/mGST/compatibility.py +0 -0
  83. {iqm_benchmarks-2.8 → iqm_benchmarks-2.9}/src/mGST/low_level_jit.py +0 -0
  84. {iqm_benchmarks-2.8 → iqm_benchmarks-2.9}/src/mGST/optimization.py +0 -0
  85. {iqm_benchmarks-2.8 → iqm_benchmarks-2.9}/src/mGST/qiskit_interface.py +0 -0
  86. {iqm_benchmarks-2.8 → iqm_benchmarks-2.9}/src/mGST/reporting/figure_gen.py +0 -0
  87. {iqm_benchmarks-2.8 → iqm_benchmarks-2.9}/src/mGST/reporting/reporting.py +0 -0
  88. {iqm_benchmarks-2.8 → iqm_benchmarks-2.9}/tag-from-pipeline.sh +0 -0
  89. {iqm_benchmarks-2.8 → iqm_benchmarks-2.9}/tests/test_ghz.py +0 -0
  90. {iqm_benchmarks-2.8 → iqm_benchmarks-2.9}/tests/test_gst.py +0 -0
  91. {iqm_benchmarks-2.8 → iqm_benchmarks-2.9}/tests/test_qscore.py +0 -0
  92. {iqm_benchmarks-2.8 → iqm_benchmarks-2.9}/tests/test_qv.py +0 -0
  93. {iqm_benchmarks-2.8 → iqm_benchmarks-2.9}/tests/test_rb.py +0 -0
  94. {iqm_benchmarks-2.8 → iqm_benchmarks-2.9}/tests/unit/test_benchmark_circuit.py +0 -0
@@ -0,0 +1,75 @@
1
+ name: Continuous Integration
2
+
3
+ on:
4
+ pull_request:
5
+ branches:
6
+ - main
7
+ workflow_dispatch:
8
+ schedule:
9
+ - cron: '0 0 * * *'
10
+
11
+ jobs:
12
+ run_tests:
13
+ runs-on: ubuntu-latest
14
+ steps:
15
+ - uses: actions/checkout@v4
16
+ - name: Install uv and set the python version
17
+ uses: astral-sh/setup-uv@v5
18
+ with:
19
+ python-version: 3.11
20
+ - name: Install dependencies
21
+ run: uv pip install --constraint requirements.txt --editable .[test,mgst]
22
+ - name: Run tests
23
+ run: ./test
24
+
25
+ test_docs:
26
+ runs-on: ubuntu-latest
27
+ steps:
28
+ - uses: actions/checkout@v4
29
+ - name: Install uv and set the python version
30
+ uses: astral-sh/setup-uv@v5
31
+ with:
32
+ python-version: 3.11
33
+ - name: Install dependencies
34
+ run: |
35
+ uv pip install --constraint requirements.txt --editable .[docs,mgst]
36
+ sudo apt-get install graphviz
37
+ - name: Test if docs can be built
38
+ run: ./docbuild
39
+
40
+ test_requirements_lock:
41
+ runs-on: ubuntu-latest
42
+ steps:
43
+ - uses: actions/checkout@v4
44
+ - name: Install uv and set the python version
45
+ uses: astral-sh/setup-uv@v5
46
+ with:
47
+ python-version: 3.11
48
+ - name: Install dependencies
49
+ run: uv pip install --constraint requirements.txt --editable .[cicd]
50
+ - name: Regenerate requirements.txt
51
+ run: python update-requirements.py
52
+ - name: Check lockfile is up-to-date
53
+ run: git diff --exit-code HEAD requirements.txt
54
+
55
+ run_benchmark:
56
+ runs-on: ubuntu-latest
57
+ if: github.event_name == 'workflow_dispatch' || github.event_name == 'schedule'
58
+ steps:
59
+ - uses: actions/checkout@v4
60
+ - name: Set up Python
61
+ uses: actions/setup-python@v2
62
+ with:
63
+ python-version: 3.11
64
+ - name: Install dependencies
65
+ run: uv pip install --constraint requirements.txt --editable .
66
+ - name: Run benchmark
67
+ run: python benchmark_runner.py --backend=${BACKEND}
68
+ env:
69
+ BACKEND: ${{ github.event.inputs.backend || 'iqmfakeadonis' }}
70
+ - name: Upload benchmark results
71
+ uses: actions/upload-artifact@v2
72
+ with:
73
+ name: benchmark-results
74
+ path: Outputs
75
+
@@ -1,4 +1,4 @@
1
- name: Upload package to PyPI
1
+ name: Upload package to PyPI and publish documentation
2
2
 
3
3
  on:
4
4
  release:
@@ -9,21 +9,18 @@ on:
9
9
  jobs:
10
10
  build:
11
11
  runs-on: ubuntu-latest
12
-
13
12
  steps:
14
13
  - uses: actions/checkout@v4
15
14
  - name: Fetch all history for all tags and branches
16
15
  run: git fetch --prune --unshallow
17
- - name: Setup Python
18
- uses: actions/setup-python@v5
16
+ - name: Install uv and set the python version
17
+ uses: astral-sh/setup-uv@v5
19
18
  with:
20
- python-version: '3.11'
19
+ python-version: 3.11
21
20
  - name: Install dependencies
22
- run: |
23
- python -m pip install --upgrade pip
24
- python -m pip install build==1.0.3
21
+ run: uv pip install --constraint requirements.txt --editable .[cicd]
25
22
  - name: Build distribution
26
- run: python -m build
23
+ run: uv build
27
24
  - name: Store distribution packages
28
25
  uses: actions/upload-artifact@v4
29
26
  with:
@@ -39,7 +36,6 @@ jobs:
39
36
  url: https://pypi.org/p/iqm-benchmarks
40
37
  permissions:
41
38
  id-token: write
42
-
43
39
  steps:
44
40
  - name: Download distribution packages
45
41
  uses: actions/download-artifact@v4
@@ -50,26 +46,24 @@ jobs:
50
46
 
51
47
  publish_docs:
52
48
  runs-on: ubuntu-latest
53
-
54
49
  steps:
55
50
  - uses: actions/checkout@v4
56
51
  with:
57
52
  fetch-depth: 0
58
- - name: Setup Python
59
- uses: actions/setup-python@v5
53
+ - name: Install uv and set the python version
54
+ uses: astral-sh/setup-uv@v5
60
55
  with:
61
- python-version: '3.11'
56
+ python-version: 3.11
62
57
  - name: Checkout latest tagged commit
63
58
  run: |
64
59
  git checkout $(git describe --tags --abbrev=0)
65
60
  - name: Install dependencies
66
61
  run: |
67
- python -m pip install --upgrade pip
68
- pip install -e ".[develop]"
62
+ uv pip install --constraint requirements.txt --editable .[cicd,docs]
69
63
  sudo apt-get install graphviz
70
64
  - name: Build docs
71
65
  run: |
72
- tox -e docs
66
+ ./docbuild
73
67
  touch build/sphinx/html/.nojekyll # allow underscores in URL path
74
68
  # remove unnecessary build files
75
69
  sudo rm -rf build/sphinx/html/.doctrees
@@ -78,4 +72,26 @@ jobs:
78
72
  with:
79
73
  branch: gh-pages
80
74
  folder: build/sphinx/html
81
- force: false
75
+ force: false
76
+
77
+ gen_licenses_info:
78
+ runs-on: ubuntu-latest
79
+ steps:
80
+ - uses: actions/checkout@v4
81
+ with:
82
+ fetch-depth: 0
83
+ - name: Install uv and set the python version
84
+ uses: astral-sh/setup-uv@v5
85
+ with:
86
+ python-version: 3.11
87
+ - name: Install dependencies
88
+ run: uv pip install --constraint requirements.txt --editable . --requirement pyproject.toml --all-extras
89
+ - name: Generate license information for dependencies
90
+ run: |
91
+ pip-licenses --format=confluence --with-urls > licenses.txt
92
+ cat -n licenses.txt | sort -uk2 | sort -n | cut -f2- > tmp && mv tmp licenses.txt # remove duplicate lines
93
+ - name: Upload license information artifact
94
+ uses: actions/upload-artifact@v4
95
+ with:
96
+ name: dependencies-licenses
97
+ path: licenses.txt
@@ -2,6 +2,9 @@
2
2
  Changelog
3
3
  =========
4
4
 
5
+ Version 2.9
6
+ ===========
7
+ * Add optional security-scanned lockfile.
5
8
 
6
9
  Version 2.8
7
10
  ===========
@@ -45,15 +48,15 @@ Version 2.0
45
48
  * Updates the usage of `qiskit.QuantumCircuit` to `iqm.qiskit_iqm.IQMCircuit` in many places.
46
49
 
47
50
  Version 1.12
48
- ===========
51
+ ============
49
52
  * Miscellaneous small bugs fixed.
50
53
 
51
54
  Version 1.11
52
- ===========
55
+ ============
53
56
  * Relaxes dependencies to allow for ranges.
54
57
 
55
58
  Version 1.10
56
- ===========
59
+ ============
57
60
  * Added API docs building and publishing.
58
61
 
59
62
  Version 1.9
@@ -0,0 +1 @@
1
+ include requirements.txt
@@ -1,8 +1,8 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: iqm-benchmarks
3
- Version: 2.8
3
+ Version: 2.9
4
4
  Summary: A package for implementation of Quantum Characterization, Verification and Validation (QCVV) techniques on IQM's hardware at gate level abstraction
5
- Author-email: IQM Finland Oy <developers@meetiqm.com>, Aniket Rath <aniket.rath@meetiqm.com>, Jami Rönkkö <jami@meetiqm.com>, Pedro Figueroa Romero <pedro.romero@meetiqm.com>, Vicente Pina Canelles <vicente.pina@meetiqm.com>, Raphael Brieger <raphael.brieger@meetiqm.com>, Stefan Seegerer <stefan.seegerer@meetiqm.com>
5
+ Author-email: IQM Finland Oy <developers@meetiqm.com>, Aniket Rath <aniket.rath@meetiqm.com>, Jami Rönkkö <jami@meetiqm.com>, Pedro Figueroa Romero <pedro.romero@meetiqm.com>, Vicente Pina Canelles <vicente.pina@meetiqm.com>, Raphael Brieger <raphael.brieger@meetiqm.com>, Stefan Seegerer <stefan.seegerer@meetiqm.com>, Miikka Koistinen <miikka@meetiqm.com>
6
6
  Project-URL: Homepage, https://github.com/iqm-finland/iqm-benchmarks
7
7
  Classifier: Development Status :: 4 - Beta
8
8
  Classifier: Programming Language :: Python :: 3 :: Only
@@ -26,8 +26,9 @@ Requires-Dist: pycurl<8.0,>=7.45.3
26
26
  Requires-Dist: xarray<2025.0.0,>=2024.6.0
27
27
  Requires-Dist: types-pycurl
28
28
  Requires-Dist: myst-nb==1.1.0
29
- Provides-Extra: develop
30
- Requires-Dist: tox==4.16.0; extra == "develop"
29
+ Provides-Extra: cicd
30
+ Requires-Dist: build==1.0.3; extra == "cicd"
31
+ Requires-Dist: pip-licenses==5.0.0; extra == "cicd"
31
32
  Provides-Extra: examples
32
33
  Requires-Dist: notebook==7.2.1; extra == "examples"
33
34
  Provides-Extra: mgst
@@ -73,57 +74,71 @@ The project is split into different benchmarks, all sharing the `Benchmark` clas
73
74
 
74
75
  ## Installation _(latest release)_
75
76
 
76
- Usually it makes sense to use a new Conda environment (e.g. ``iqm-benchmarks``) to isolate your setup from the global Python installation. That way, you can play around without messing the rest of your system.
77
+ [uv](https://docs.astral.sh/uv/) is highly recommended for practical Python environment and package management.
78
+ With uv installed in your system, start a terminal in your machine and create a new Python environment
77
79
 
78
- Start a terminal in your machine, and type
79
-
80
- ```
81
- conda create -n iqm-benchmarks python=3.11.2
82
- conda activate iqm-benchmarks
80
+ ```sh
81
+ uv venv --python=3.11
83
82
  ```
84
83
 
84
+ > Note: refer to uv's documentation if there are problems setting up a Python environment.
85
+
86
+ After the command has run, read the output and make sure to use the prompt to activate the environment.
85
87
  Then, you can install the latest release of the IQM Benchmarks by running:
86
- ```bash
87
- $ pip install iqm-benchmarks
88
+
89
+ ```sh
90
+ uv pip install iqm-benchmarks
88
91
  ```
89
92
 
90
- If you have already installed `iqm-benchmarks` and want to get the latest release you can add the --upgrade flag:
93
+ Supplied within the Python package there is an additional `requirements.txt` file containing locked, security scanned
94
+ dependencies. The file can be used to constrain installed dependencies either directly from the repo or by
95
+ extracting it from the PyPI package.
91
96
 
92
- ```bash
93
- pip install iqm-benchmarks --upgrade
97
+ ```sh
98
+ uv pip install --constraint requirements.txt iqm-benchmarks
94
99
  ```
95
100
 
96
101
  ## Optional dependencies
97
102
 
98
103
  Optional dependencies like compressive gate set tomography and jupyter notebooks can be installed as follows:
99
- ```bash
100
- pip install "iqm-benchmarks[mgst, examples]"
104
+ ```sh
105
+ uv pip install "iqm-benchmarks[mgst,examples]"
101
106
  ```
102
107
  Current optional dependencies are:
103
108
  * `examples`: Jupyter notebooks
104
109
  * `mgst`: Compressive gate set tomography
105
- * `develop`: Development tools
106
110
  * `test`: Code testing and Linting
107
- * `docs`: Documentation building
111
+ * `docs`: Documentation building
112
+ * `cicd`: CICD tools
108
113
 
109
- ## Development mode _(latest changes: recommended)_
114
+ ## Development installation _(latest changes)_
110
115
 
111
- To install in development mode with all required dependencies, you can instead clone the [repository](https://www.github.com/iqm-finland/iqm-benchmarks) and from the project directory run
116
+ To install in development mode with all required dependencies, you can instead clone the
117
+ [repository](https://www.github.com/iqm-finland/iqm-benchmarks) and from the project directory run
112
118
 
113
- ```bash
114
- python -m pip install -e ".[develop,test]" --upgrade --upgrade-strategy=eager
119
+ ```sh
120
+ uv pip install --constraint requirements.txt iqm-benchmarks
115
121
  ```
116
122
 
117
123
  To run the tests, you can use the following command:
118
124
 
119
- ```bash
120
- tox -e test
125
+ ```sh
126
+ ./test
121
127
  ```
122
128
 
123
129
  To build the API documentation as HTML:
124
130
 
125
- ```bash
126
- tox -e docs
131
+ ```sh
132
+ ./docbuild
133
+ ```
134
+
135
+ Update the requirements. This is necessary when you add a new dependency or update an existing one in `pyproject.toml`.
136
+ After this, any changes in the lockfile `requirements.txt` have to be committed.
137
+ The script upgrades locked dependencies defined in `pyproject.toml` within the given version ranges. However, transitive
138
+ dependencies are deliberately not upgraded automatically.
139
+
140
+ ```sh
141
+ python update-requirements.py
127
142
  ```
128
143
 
129
144
  ## Characterize Physical Hardware
@@ -22,57 +22,71 @@ The project is split into different benchmarks, all sharing the `Benchmark` clas
22
22
 
23
23
  ## Installation _(latest release)_
24
24
 
25
- Usually it makes sense to use a new Conda environment (e.g. ``iqm-benchmarks``) to isolate your setup from the global Python installation. That way, you can play around without messing the rest of your system.
25
+ [uv](https://docs.astral.sh/uv/) is highly recommended for practical Python environment and package management.
26
+ With uv installed in your system, start a terminal in your machine and create a new Python environment
26
27
 
27
- Start a terminal in your machine, and type
28
-
29
- ```
30
- conda create -n iqm-benchmarks python=3.11.2
31
- conda activate iqm-benchmarks
28
+ ```sh
29
+ uv venv --python=3.11
32
30
  ```
33
31
 
32
+ > Note: refer to uv's documentation if there are problems setting up a Python environment.
33
+
34
+ After the command has run, read the output and make sure to use the prompt to activate the environment.
34
35
  Then, you can install the latest release of the IQM Benchmarks by running:
35
- ```bash
36
- $ pip install iqm-benchmarks
36
+
37
+ ```sh
38
+ uv pip install iqm-benchmarks
37
39
  ```
38
40
 
39
- If you have already installed `iqm-benchmarks` and want to get the latest release you can add the --upgrade flag:
41
+ Supplied within the Python package there is an additional `requirements.txt` file containing locked, security scanned
42
+ dependencies. The file can be used to constrain installed dependencies either directly from the repo or by
43
+ extracting it from the PyPI package.
40
44
 
41
- ```bash
42
- pip install iqm-benchmarks --upgrade
45
+ ```sh
46
+ uv pip install --constraint requirements.txt iqm-benchmarks
43
47
  ```
44
48
 
45
49
  ## Optional dependencies
46
50
 
47
51
  Optional dependencies like compressive gate set tomography and jupyter notebooks can be installed as follows:
48
- ```bash
49
- pip install "iqm-benchmarks[mgst, examples]"
52
+ ```sh
53
+ uv pip install "iqm-benchmarks[mgst,examples]"
50
54
  ```
51
55
  Current optional dependencies are:
52
56
  * `examples`: Jupyter notebooks
53
57
  * `mgst`: Compressive gate set tomography
54
- * `develop`: Development tools
55
58
  * `test`: Code testing and Linting
56
- * `docs`: Documentation building
59
+ * `docs`: Documentation building
60
+ * `cicd`: CICD tools
57
61
 
58
- ## Development mode _(latest changes: recommended)_
62
+ ## Development installation _(latest changes)_
59
63
 
60
- To install in development mode with all required dependencies, you can instead clone the [repository](https://www.github.com/iqm-finland/iqm-benchmarks) and from the project directory run
64
+ To install in development mode with all required dependencies, you can instead clone the
65
+ [repository](https://www.github.com/iqm-finland/iqm-benchmarks) and from the project directory run
61
66
 
62
- ```bash
63
- python -m pip install -e ".[develop,test]" --upgrade --upgrade-strategy=eager
67
+ ```sh
68
+ uv pip install --constraint requirements.txt iqm-benchmarks
64
69
  ```
65
70
 
66
71
  To run the tests, you can use the following command:
67
72
 
68
- ```bash
69
- tox -e test
73
+ ```sh
74
+ ./test
70
75
  ```
71
76
 
72
77
  To build the API documentation as HTML:
73
78
 
74
- ```bash
75
- tox -e docs
79
+ ```sh
80
+ ./docbuild
81
+ ```
82
+
83
+ Update the requirements. This is necessary when you add a new dependency or update an existing one in `pyproject.toml`.
84
+ After this, any changes in the lockfile `requirements.txt` have to be committed.
85
+ The script upgrades locked dependencies defined in `pyproject.toml` within the given version ranges. However, transitive
86
+ dependencies are deliberately not upgraded automatically.
87
+
88
+ ```sh
89
+ python update-requirements.py
76
90
  ```
77
91
 
78
92
  ## Characterize Physical Hardware
@@ -0,0 +1 @@
1
+ sphinx-build -b html docs/ build/sphinx/html -W
@@ -1,5 +1,5 @@
1
1
  IQM Benchmarks
2
- ##########
2
+ ##############
3
3
 
4
4
  :Release: |release|
5
5
  :Date: |today|
@@ -0,0 +1,2 @@
1
+ python -m isort src tests
2
+ python -m black src tests
@@ -1,5 +1,9 @@
1
1
  [build-system]
2
2
  requires = [
3
+ # NOTE: including build deps in the lockfile not yet directly by uv. Working around this by duplicating build deps
4
+ # in project dependencies doesn't work either since using them via the lockfile requires
5
+ # `--no-build-isolation` while installing, which itself requires setuptools.
6
+ # See https://github.com/astral-sh/uv/issues/5190.
3
7
  "setuptools>=70.0.0",
4
8
  "setuptools_scm[toml]>=8.1.0",
5
9
  ]
@@ -16,7 +20,8 @@ authors = [
16
20
  {name="Pedro Figueroa Romero", email="pedro.romero@meetiqm.com"},
17
21
  {name="Vicente Pina Canelles", email="vicente.pina@meetiqm.com"},
18
22
  {name="Raphael Brieger", email="raphael.brieger@meetiqm.com"},
19
- {name="Stefan Seegerer", email="stefan.seegerer@meetiqm.com"}
23
+ {name="Stefan Seegerer", email="stefan.seegerer@meetiqm.com"},
24
+ {name="Miikka Koistinen", email="miikka@meetiqm.com"},
20
25
  ]
21
26
  readme = "README.md"
22
27
  classifiers = [
@@ -48,8 +53,9 @@ dependencies = [
48
53
  "Homepage" = "https://github.com/iqm-finland/iqm-benchmarks"
49
54
 
50
55
  [project.optional-dependencies]
51
- develop = [
52
- "tox == 4.16.0",
56
+ cicd = [
57
+ "build == 1.0.3",
58
+ "pip-licenses == 5.0.0",
53
59
  ]
54
60
 
55
61
  examples = [