iqm-benchmarks 2.23__tar.gz → 2.25__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 (99) hide show
  1. {iqm_benchmarks-2.23 → iqm_benchmarks-2.25}/CHANGELOG.rst +8 -0
  2. {iqm_benchmarks-2.23/src/iqm_benchmarks.egg-info → iqm_benchmarks-2.25}/PKG-INFO +5 -3
  3. {iqm_benchmarks-2.23 → iqm_benchmarks-2.25}/README.md +3 -2
  4. {iqm_benchmarks-2.23 → iqm_benchmarks-2.25}/pyproject.toml +1 -0
  5. {iqm_benchmarks-2.23 → iqm_benchmarks-2.25}/requirements.txt +50 -51
  6. {iqm_benchmarks-2.23 → iqm_benchmarks-2.25}/src/iqm/benchmarks/benchmark.py +5 -1
  7. {iqm_benchmarks-2.23 → iqm_benchmarks-2.25}/src/iqm/benchmarks/compressive_gst/compressive_gst.py +2 -0
  8. {iqm_benchmarks-2.23 → iqm_benchmarks-2.25}/src/iqm/benchmarks/entanglement/ghz.py +1 -0
  9. {iqm_benchmarks-2.23 → iqm_benchmarks-2.25}/src/iqm/benchmarks/optimization/qscore.py +1 -0
  10. {iqm_benchmarks-2.23 → iqm_benchmarks-2.25}/src/iqm/benchmarks/quantum_volume/clops.py +1 -0
  11. {iqm_benchmarks-2.23 → iqm_benchmarks-2.25}/src/iqm/benchmarks/quantum_volume/quantum_volume.py +3 -2
  12. {iqm_benchmarks-2.23 → iqm_benchmarks-2.25}/src/iqm/benchmarks/randomized_benchmarking/clifford_rb/clifford_rb.py +2 -0
  13. {iqm_benchmarks-2.23 → iqm_benchmarks-2.25}/src/iqm/benchmarks/randomized_benchmarking/interleaved_rb/interleaved_rb.py +4 -0
  14. {iqm_benchmarks-2.23 → iqm_benchmarks-2.25}/src/iqm/benchmarks/randomized_benchmarking/mirror_rb/mirror_rb.py +1 -0
  15. {iqm_benchmarks-2.23 → iqm_benchmarks-2.25}/src/iqm/benchmarks/randomized_benchmarking/randomized_benchmarking_common.py +11 -1
  16. {iqm_benchmarks-2.23 → iqm_benchmarks-2.25}/src/iqm/benchmarks/utils.py +38 -14
  17. {iqm_benchmarks-2.23 → iqm_benchmarks-2.25/src/iqm_benchmarks.egg-info}/PKG-INFO +5 -3
  18. {iqm_benchmarks-2.23 → iqm_benchmarks-2.25}/src/iqm_benchmarks.egg-info/SOURCES.txt +2 -1
  19. {iqm_benchmarks-2.23 → iqm_benchmarks-2.25}/src/iqm_benchmarks.egg-info/requires.txt +1 -0
  20. iqm_benchmarks-2.25/tests/unit/test_submit_execute.py +172 -0
  21. {iqm_benchmarks-2.23 → iqm_benchmarks-2.25}/.github/workflows/main.yml +0 -0
  22. {iqm_benchmarks-2.23 → iqm_benchmarks-2.25}/.github/workflows/publish.yml +0 -0
  23. {iqm_benchmarks-2.23 → iqm_benchmarks-2.25}/.github/workflows/tag_and_release.yml +0 -0
  24. {iqm_benchmarks-2.23 → iqm_benchmarks-2.25}/.gitignore +0 -0
  25. {iqm_benchmarks-2.23 → iqm_benchmarks-2.25}/LICENSE +0 -0
  26. {iqm_benchmarks-2.23 → iqm_benchmarks-2.25}/MANIFEST.in +0 -0
  27. {iqm_benchmarks-2.23 → iqm_benchmarks-2.25}/benchmark_runner.py +0 -0
  28. {iqm_benchmarks-2.23 → iqm_benchmarks-2.25}/docbuild +0 -0
  29. {iqm_benchmarks-2.23 → iqm_benchmarks-2.25}/docs/API.rst +0 -0
  30. {iqm_benchmarks-2.23 → iqm_benchmarks-2.25}/docs/Makefile +0 -0
  31. {iqm_benchmarks-2.23 → iqm_benchmarks-2.25}/docs/_static/images/favicon.ico +0 -0
  32. {iqm_benchmarks-2.23 → iqm_benchmarks-2.25}/docs/_static/images/logo.png +0 -0
  33. {iqm_benchmarks-2.23 → iqm_benchmarks-2.25}/docs/_templates/autosummary-class-template.rst +0 -0
  34. {iqm_benchmarks-2.23 → iqm_benchmarks-2.25}/docs/_templates/autosummary-module-template.rst +0 -0
  35. {iqm_benchmarks-2.23 → iqm_benchmarks-2.25}/docs/changelog.rst +0 -0
  36. {iqm_benchmarks-2.23 → iqm_benchmarks-2.25}/docs/conf.py +0 -0
  37. {iqm_benchmarks-2.23 → iqm_benchmarks-2.25}/docs/development/development.rst +0 -0
  38. {iqm_benchmarks-2.23 → iqm_benchmarks-2.25}/docs/development/generate_2qubit_cliffords.ipynb +0 -0
  39. {iqm_benchmarks-2.23 → iqm_benchmarks-2.25}/docs/development/how_to_make_your_own_benchmark.ipynb +0 -0
  40. {iqm_benchmarks-2.23 → iqm_benchmarks-2.25}/docs/devices/devices.rst +0 -0
  41. {iqm_benchmarks-2.23 → iqm_benchmarks-2.25}/docs/devices/spark.ipynb +0 -0
  42. {iqm_benchmarks-2.23 → iqm_benchmarks-2.25}/docs/devices/star.ipynb +0 -0
  43. {iqm_benchmarks-2.23 → iqm_benchmarks-2.25}/docs/examples/example_clifford_rb.ipynb +0 -0
  44. {iqm_benchmarks-2.23 → iqm_benchmarks-2.25}/docs/examples/example_clops.ipynb +0 -0
  45. {iqm_benchmarks-2.23 → iqm_benchmarks-2.25}/docs/examples/example_experiment_all.ipynb +0 -0
  46. {iqm_benchmarks-2.23 → iqm_benchmarks-2.25}/docs/examples/example_ghz.ipynb +0 -0
  47. {iqm_benchmarks-2.23 → iqm_benchmarks-2.25}/docs/examples/example_ghz_deneb.ipynb +0 -0
  48. {iqm_benchmarks-2.23 → iqm_benchmarks-2.25}/docs/examples/example_gst.ipynb +0 -0
  49. {iqm_benchmarks-2.23 → iqm_benchmarks-2.25}/docs/examples/example_interleaved_rb.ipynb +0 -0
  50. {iqm_benchmarks-2.23 → iqm_benchmarks-2.25}/docs/examples/example_mirror_rb.ipynb +0 -0
  51. {iqm_benchmarks-2.23 → iqm_benchmarks-2.25}/docs/examples/example_qscore.ipynb +0 -0
  52. {iqm_benchmarks-2.23 → iqm_benchmarks-2.25}/docs/examples/example_quantum_volume.ipynb +0 -0
  53. {iqm_benchmarks-2.23 → iqm_benchmarks-2.25}/docs/examples/example_quantum_volume_deneb.ipynb +0 -0
  54. {iqm_benchmarks-2.23 → iqm_benchmarks-2.25}/docs/examples/examples.rst +0 -0
  55. {iqm_benchmarks-2.23 → iqm_benchmarks-2.25}/docs/index.rst +0 -0
  56. {iqm_benchmarks-2.23 → iqm_benchmarks-2.25}/docs/license.rst +0 -0
  57. {iqm_benchmarks-2.23 → iqm_benchmarks-2.25}/docs/readme.md +0 -0
  58. {iqm_benchmarks-2.23 → iqm_benchmarks-2.25}/format +0 -0
  59. {iqm_benchmarks-2.23 → iqm_benchmarks-2.25}/scheduled_experiments/adonis/__init__.py +0 -0
  60. {iqm_benchmarks-2.23 → iqm_benchmarks-2.25}/scheduled_experiments/adonis/weekly.py +0 -0
  61. {iqm_benchmarks-2.23 → iqm_benchmarks-2.25}/setup.cfg +0 -0
  62. {iqm_benchmarks-2.23 → iqm_benchmarks-2.25}/src/iqm/benchmarks/__init__.py +0 -0
  63. {iqm_benchmarks-2.23 → iqm_benchmarks-2.25}/src/iqm/benchmarks/benchmark_definition.py +0 -0
  64. {iqm_benchmarks-2.23 → iqm_benchmarks-2.25}/src/iqm/benchmarks/circuit_containers.py +0 -0
  65. {iqm_benchmarks-2.23 → iqm_benchmarks-2.25}/src/iqm/benchmarks/compressive_gst/__init__.py +0 -0
  66. {iqm_benchmarks-2.23 → iqm_benchmarks-2.25}/src/iqm/benchmarks/compressive_gst/gst_analysis.py +0 -0
  67. {iqm_benchmarks-2.23 → iqm_benchmarks-2.25}/src/iqm/benchmarks/entanglement/__init__.py +0 -0
  68. {iqm_benchmarks-2.23 → iqm_benchmarks-2.25}/src/iqm/benchmarks/logging_config.py +0 -0
  69. {iqm_benchmarks-2.23 → iqm_benchmarks-2.25}/src/iqm/benchmarks/optimization/__init__.py +0 -0
  70. {iqm_benchmarks-2.23 → iqm_benchmarks-2.25}/src/iqm/benchmarks/quantum_volume/__init__.py +0 -0
  71. {iqm_benchmarks-2.23 → iqm_benchmarks-2.25}/src/iqm/benchmarks/randomized_benchmarking/__init__.py +0 -0
  72. {iqm_benchmarks-2.23 → iqm_benchmarks-2.25}/src/iqm/benchmarks/randomized_benchmarking/clifford_1q.pkl +0 -0
  73. {iqm_benchmarks-2.23 → iqm_benchmarks-2.25}/src/iqm/benchmarks/randomized_benchmarking/clifford_2q.pkl +0 -0
  74. {iqm_benchmarks-2.23 → iqm_benchmarks-2.25}/src/iqm/benchmarks/randomized_benchmarking/clifford_rb/__init__.py +0 -0
  75. {iqm_benchmarks-2.23 → iqm_benchmarks-2.25}/src/iqm/benchmarks/randomized_benchmarking/interleaved_rb/__init__.py +0 -0
  76. {iqm_benchmarks-2.23 → iqm_benchmarks-2.25}/src/iqm/benchmarks/randomized_benchmarking/mirror_rb/__init__.py +0 -0
  77. {iqm_benchmarks-2.23 → iqm_benchmarks-2.25}/src/iqm/benchmarks/randomized_benchmarking/multi_lmfit.py +0 -0
  78. {iqm_benchmarks-2.23 → iqm_benchmarks-2.25}/src/iqm/benchmarks/readout_mitigation.py +0 -0
  79. {iqm_benchmarks-2.23 → iqm_benchmarks-2.25}/src/iqm_benchmarks.egg-info/dependency_links.txt +0 -0
  80. {iqm_benchmarks-2.23 → iqm_benchmarks-2.25}/src/iqm_benchmarks.egg-info/top_level.txt +0 -0
  81. {iqm_benchmarks-2.23 → iqm_benchmarks-2.25}/src/mGST/LICENSE +0 -0
  82. {iqm_benchmarks-2.23 → iqm_benchmarks-2.25}/src/mGST/README.md +0 -0
  83. {iqm_benchmarks-2.23 → iqm_benchmarks-2.25}/src/mGST/additional_fns.py +0 -0
  84. {iqm_benchmarks-2.23 → iqm_benchmarks-2.25}/src/mGST/algorithm.py +0 -0
  85. {iqm_benchmarks-2.23 → iqm_benchmarks-2.25}/src/mGST/compatibility.py +0 -0
  86. {iqm_benchmarks-2.23 → iqm_benchmarks-2.25}/src/mGST/low_level_jit.py +0 -0
  87. {iqm_benchmarks-2.23 → iqm_benchmarks-2.25}/src/mGST/optimization.py +0 -0
  88. {iqm_benchmarks-2.23 → iqm_benchmarks-2.25}/src/mGST/qiskit_interface.py +0 -0
  89. {iqm_benchmarks-2.23 → iqm_benchmarks-2.25}/src/mGST/reporting/figure_gen.py +0 -0
  90. {iqm_benchmarks-2.23 → iqm_benchmarks-2.25}/src/mGST/reporting/reporting.py +0 -0
  91. {iqm_benchmarks-2.23 → iqm_benchmarks-2.25}/tag-from-pipeline.sh +0 -0
  92. {iqm_benchmarks-2.23 → iqm_benchmarks-2.25}/test +0 -0
  93. {iqm_benchmarks-2.23 → iqm_benchmarks-2.25}/tests/test_ghz.py +0 -0
  94. {iqm_benchmarks-2.23 → iqm_benchmarks-2.25}/tests/test_gst.py +0 -0
  95. {iqm_benchmarks-2.23 → iqm_benchmarks-2.25}/tests/test_qscore.py +0 -0
  96. {iqm_benchmarks-2.23 → iqm_benchmarks-2.25}/tests/test_qv.py +0 -0
  97. {iqm_benchmarks-2.23 → iqm_benchmarks-2.25}/tests/test_rb.py +0 -0
  98. {iqm_benchmarks-2.23 → iqm_benchmarks-2.25}/tests/unit/test_benchmark_circuit.py +0 -0
  99. {iqm_benchmarks-2.23 → iqm_benchmarks-2.25}/update-requirements.py +0 -0
@@ -2,6 +2,14 @@
2
2
  Changelog
3
3
  =========
4
4
 
5
+ Version 2.25
6
+ ============
7
+ * Added optional configuration parameter (`max_circuits_per_batch`) to specify the maximum amount of circuits per batch.
8
+
9
+ Version 2.24
10
+ ============
11
+ * Added rustworkx dependency range to fix wrong edge thickness assignment in qubit selection plot.
12
+
5
13
  Version 2.23
6
14
  ============
7
15
  * Added dynamical decoupling parameter option to configurations of all benchmarks.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: iqm-benchmarks
3
- Version: 2.23
3
+ Version: 2.25
4
4
  Summary: A package for implementation of Quantum Characterization, Verification and Validation (QCVV) techniques on IQM's hardware at gate level abstraction
5
5
  Author-email: IQM Finland Oy <developers@meetiqm.com>, Adrian Auer <adrian.auer@meetiqm.com>, Raphael Brieger <raphael.brieger@meetiqm.com>, Alessio Calzona <alessio.calzona@meetiqm.com>, Pedro Figueroa Romero <pedro.romero@meetiqm.com>, Amin Hosseinkhani <amin.hosseinkhani@meetiqm.com>, Miikka Koistinen <miikka@meetiqm.com>, Nadia Milazzo <nadia.milazzo@meetiqm.com>, Vicente Pina Canelles <vicente.pina@meetiqm.com>, Aniket Rath <aniket.rath@meetiqm.com>, Jami Rönkkö <jami@meetiqm.com>, Stefan Seegerer <stefan.seegerer@meetiqm.com>
6
6
  Project-URL: Homepage, https://github.com/iqm-finland/iqm-benchmarks
@@ -16,6 +16,7 @@ Requires-Dist: matplotlib<4,>=3.6.3
16
16
  Requires-Dist: more-itertools<11.0.0,>=10.1.0
17
17
  Requires-Dist: mthree<2.7,>=2.6
18
18
  Requires-Dist: networkx<4.0,>=3.3
19
+ Requires-Dist: rustworkx>=0.15.1
19
20
  Requires-Dist: numpy<2.0,>=1.25.2
20
21
  Requires-Dist: qiskit<2.0,>=1.0
21
22
  Requires-Dist: qiskit-iqm<16.0,>=15.1
@@ -193,7 +194,7 @@ EXAMPLE_MRB = MirrorRBConfiguration(
193
194
  )
194
195
 
195
196
  EXAMPLE_QV = QuantumVolumeConfiguration(
196
- num_circuits=500,
197
+ num_circuits=800,
197
198
  shots=2**8,
198
199
  calset_id=None,
199
200
  num_sigmas=2,
@@ -203,7 +204,8 @@ EXAMPLE_QV = QuantumVolumeConfiguration(
203
204
  optimize_sqg=True,
204
205
  routing_method="sabre",
205
206
  physical_layout="fixed",
206
- max_gates_per_batch=60_000,
207
+ max_circuits_per_batch=500,
208
+ max_gates_per_batch=60_000, # Will be used if it renders a smaller max batch size than max_circuits_per_batch
207
209
  rem=True,
208
210
  mit_shots=1_000,
209
211
  )
@@ -141,7 +141,7 @@ EXAMPLE_MRB = MirrorRBConfiguration(
141
141
  )
142
142
 
143
143
  EXAMPLE_QV = QuantumVolumeConfiguration(
144
- num_circuits=500,
144
+ num_circuits=800,
145
145
  shots=2**8,
146
146
  calset_id=None,
147
147
  num_sigmas=2,
@@ -151,7 +151,8 @@ EXAMPLE_QV = QuantumVolumeConfiguration(
151
151
  optimize_sqg=True,
152
152
  routing_method="sabre",
153
153
  physical_layout="fixed",
154
- max_gates_per_batch=60_000,
154
+ max_circuits_per_batch=500,
155
+ max_gates_per_batch=60_000, # Will be used if it renders a smaller max batch size than max_circuits_per_batch
155
156
  rem=True,
156
157
  mit_shots=1_000,
157
158
  )
@@ -41,6 +41,7 @@ dependencies = [
41
41
  "more-itertools >= 10.1.0, < 11.0.0",
42
42
  "mthree >= 2.6, < 2.7",
43
43
  "networkx>=3.3, < 4.0",
44
+ "rustworkx>=0.15.1",
44
45
  "numpy >= 1.25.2, < 2.0",
45
46
  "qiskit >= 1.0, < 2.0",
46
47
  "qiskit-iqm >= 15.1, < 16.0",
@@ -929,9 +929,9 @@ llvmlite==0.43.0 \
929
929
  --hash=sha256:e0a9a1a39d4bf3517f2af9d23d479b4175ead205c592ceeb8b89af48a327ea57 \
930
930
  --hash=sha256:eccce86bba940bae0d8d48ed925f21dbb813519169246e2ab292b5092aba121f \
931
931
  --hash=sha256:f99b600aa7f65235a5a05d0b9a9f31150c390f31261f2a0ba678e26823ec38f7
932
- lmfit==1.3.2 \
933
- --hash=sha256:2b834f054cd7a5172f3b431345b292e5d95ea387d6f96d60ad35a11b8efee6ac \
934
- --hash=sha256:31beeae1f027c1b8c14dcd7f2e8488a80b75fb389e77fca677549bdc2fe597bb
932
+ lmfit==1.3.3 \
933
+ --hash=sha256:73321e6b881f2f686235721a7dfc02af6bb0f030a25efeb66638f62b1c6053a1 \
934
+ --hash=sha256:a9e9ec7d0d0ec962cc6c078ad1ec6c8311d3ac0e5f0947a00a91f5509dacc2b2
935
935
  markdown-it-py==3.0.0 \
936
936
  --hash=sha256:355216845c60bd96232cd8d8c40e8f9765cc86f46880e43a8fd22dc1a1a8cab1 \
937
937
  --hash=sha256:e3f60a94fa066dc52ec76661e37c851cb232d92f9886b15cb560aaada2df8feb
@@ -1505,38 +1505,38 @@ pyaml==25.1.0 \
1505
1505
  pycparser==2.22 \
1506
1506
  --hash=sha256:491c8be9c040f5390f5bf44a5b07752bd07f56edf992381b05c701439eec10f6 \
1507
1507
  --hash=sha256:c3702b6d3dd8c7abc1afa565d7e63d53a1d0bd86cdc24edd75470f4de499cfcc
1508
- pycurl==7.45.4 \
1509
- --hash=sha256:0470bff6cc24d8c2f63c80931aa239463800871609dafc6bcc9ca10f5a12a04e \
1510
- --hash=sha256:1324a859b50bdb0abdbd5620e42f74240d0b7daf2d5925fa303695d9fc3ece18 \
1511
- --hash=sha256:13c4b18f44637859f34639493efd297a08670f45e4eec34ab2dcba724e3cb5fc \
1512
- --hash=sha256:13eb1643ab0bf4fdc539a2cdf1021029b07095d3196c5cee5a4271af268d3d31 \
1513
- --hash=sha256:236600bfe2cd72efe47333add621286667e8fa027dadf1247349afbf30333e95 \
1514
- --hash=sha256:247b4af8eab7d04137a7f1a98391930e04ea93dc669b64db5625070fe15f80a3 \
1515
- --hash=sha256:2548c3291a33c821f0f80bf9989fc43b5d90fb78b534a7015c8419b83c6f5803 \
1516
- --hash=sha256:26745c6c5ebdccfe8a828ac3fd4e6da6f5d2245696604f04529eb7894a02f4db \
1517
- --hash=sha256:32c8e237069273f4260b6ae13d1e0f99daae938977016021565dc6e11050e803 \
1518
- --hash=sha256:3452459668bd01d646385482362b021834a31c036aa1c02acd88924ddeff7d0d \
1519
- --hash=sha256:4f25d52c97dbca6ebea786f0961b49c1998fa05178abf1964a977c825b3d8ae6 \
1520
- --hash=sha256:561f88697f7540634b1c750146f37bdc0da367b15f6b4ab2bb780871ee6ab005 \
1521
- --hash=sha256:57971d7215fc6fdedcfc092f880a59f04f52fcaf2fd329151b931623d7b59a9c \
1522
- --hash=sha256:587a4891039803b5f48392066f97b7cd5e7e9a166187abb5cb4b4806fdb8fbef \
1523
- --hash=sha256:688d09ba2c6a0d4a749d192c43422839d73c40c85143c50cc65c944258fe0ba8 \
1524
- --hash=sha256:731c46e7c0acffaab19f7c2ecc3d9e7ee337500e87b260b4e0b9fae2d90fa133 \
1525
- --hash=sha256:73df3eb5940a7fbf4cf62f7271e9f23a8e9f80e352c838ee9a8448a70c01d3f5 \
1526
- --hash=sha256:9940e3234c1ca3d30f27a2202d325dbc25291605c98e9585100a351cacd935e8 \
1527
- --hash=sha256:9bd493ce598f1dc76c8e50043c47debec27c583fa313a836b2d3667640f875d5 \
1528
- --hash=sha256:a39f28f031885485325034918386be352036c220ca45625c7e286d3938eb579d \
1529
- --hash=sha256:acf25cfdaf914db21a2a6e9e274b6d95e3fa2b6018c38f2c58c94b5d8ac3d1b7 \
1530
- --hash=sha256:b0e38e3eb83b0c891f391853f798fc6a97cb5a86a4a731df0b6320e539ae54ae \
1531
- --hash=sha256:b485fdaf78553f0b8e1c2803bb7dcbe47a7b47594f846fc7e9d3b94d794cfc89 \
1532
- --hash=sha256:caec8b634763351dd4e1b729a71542b1e2de885d39710ba8e7202817a381b453 \
1533
- --hash=sha256:d14f954ecd21a070038d65ef1c6d1d3ab220f952ff703d48313123222097615c \
1534
- --hash=sha256:d192a48b3cec2e13ad432196b65c22e99620db92feae39c0476635354eff68c6 \
1535
- --hash=sha256:df5f94c051c5a163fa85064559ca94979575e2da26740ff91c078c50c541c465 \
1536
- --hash=sha256:e7ae49b88a5d57485fbabef004534225dfe04dc15716a61fae1a0c7f46f2279e \
1537
- --hash=sha256:f6c0e22052946bbfa25be67f9d1d6639eff10781c89f0cf6f3ff2099273d1bad \
1538
- --hash=sha256:fd167f73d34beb0cb8064334aee76d9bdd13167b30be6d5d36fb07d0c8223b71 \
1539
- --hash=sha256:ffd3262f98b8997ad04940061d5ebd8bab2362169b9440939c397e24a4a135b0
1508
+ pycurl==7.45.6 \
1509
+ --hash=sha256:0cd6b7794268c17f3c660162ed6381769ce0ad260331ef49191418dfc3a2d61a \
1510
+ --hash=sha256:1309fc0f558a80ca444a3a5b0bdb1572a4d72b195233f0e65413b4d4dd78809b \
1511
+ --hash=sha256:26839d43dc7fff6b80e0067f185cc1d0e9be2ae6e2e2361ae8488cead5901c04 \
1512
+ --hash=sha256:2a21e13278d7553a04b421676c458449f6c10509bebf04993f35154b06ee2b20 \
1513
+ --hash=sha256:2b73e66b22719ea48ac08a93fc88e57ef36d46d03cb09d972063c9aa86bb74e6 \
1514
+ --hash=sha256:2d1a49418b8b4c61f52e06d97b9c16142b425077bd997a123a2ba9ef82553203 \
1515
+ --hash=sha256:334721ce1ccd71ff8e405470768b3d221b4393570ccc493fcbdbef4cd62e91ed \
1516
+ --hash=sha256:3441ee77e830267aa6e2bb43b29fd5f8a6bd6122010c76a6f0bf84462e9ea9c7 \
1517
+ --hash=sha256:357ea634395310085b9d5116226ac5ec218a6ceebf367c2451ebc8d63a6e9939 \
1518
+ --hash=sha256:361bf94b2a057c7290f9ab84e935793ca515121fc012f4b6bef6c3b5e4ea4397 \
1519
+ --hash=sha256:3fc0b505c37c7c54d88ced27e1d9e3241130987c24bf1611d9bbd9a3e499e07c \
1520
+ --hash=sha256:56d1197eadd5774582b259cde4364357da71542758d8e917f91cc6ed7ed5b262 \
1521
+ --hash=sha256:56f841b6f2f7a8b2d3051b9ceebd478599dbea3c8d1de8fb9333c895d0c1eea5 \
1522
+ --hash=sha256:6f57ad26d6ab390391ad5030790e3f1a831c1ee54ad3bf969eb378f5957eeb0a \
1523
+ --hash=sha256:7c09b7180799af70fc1d4eed580cfb1b9f34fda9081f73a3e3bc9a0e5a4c0e9b \
1524
+ --hash=sha256:81005c0f681d31d5af694d1d3c18bbf1bed0bc8b2bb10fb7388cb1378ba9bd6a \
1525
+ --hash=sha256:878ae64484db18f8f10ba99bffc83fefb4fe8f5686448754f93ec32fa4e4ee93 \
1526
+ --hash=sha256:8a99e56d2575aa74c48c0cd08852a65d5fc952798f76a34236256d5589bf5aa0 \
1527
+ --hash=sha256:942b352b69184cb26920db48e0c5cb95af39874b57dbe27318e60f1e68564e37 \
1528
+ --hash=sha256:9f721e3394e5bd7079802ec1819b19c5be4842012268cc45afcb3884efb31cf0 \
1529
+ --hash=sha256:a554a2813d415a7bb9a996a6298f3829f57e987635dcab9f1197b2dccd0ab3b2 \
1530
+ --hash=sha256:a721c2696a71b1aa5ecf82e6d0ade64bc7211b7317f1c9c66e82f82e2264d8b4 \
1531
+ --hash=sha256:abe1b204a2f96f2eebeaf93411f03505b46d151ef6d9d89326e6dece7b3a008a \
1532
+ --hash=sha256:ae893144b82d72d95c932ebdeb81fc7e9fde758e5ecd5dd10ad5b67f34a8b8ee \
1533
+ --hash=sha256:bb9eff0c7794af972da769a887c87729f1bcd8869297b1c01a2732febbb75876 \
1534
+ --hash=sha256:c04230b9e9cfdca9cf3eb09a0bec6cf2f084640f1f1ca1929cca51411af85de2 \
1535
+ --hash=sha256:c31b390f1e2cd4525828f1bb78c1f825c0aab5d1588228ed71b22c4784bdb593 \
1536
+ --hash=sha256:c6fd295f03c928da33a00f56c91765195155d2ac6f12878f6e467830b5dce5f5 \
1537
+ --hash=sha256:c872d4074360964697c39c1544fe8c91bfecbff27c1cdda1fee5498e5fdadcda \
1538
+ --hash=sha256:d0b5501d527901369aba307354530050f56cd102410f2a3bacd192dc12c645e3 \
1539
+ --hash=sha256:f0198ebcda8686b3a0c66d490a687fa5fd466f8ecc2f20a0ed0931579538ae3d
1540
1540
  pydantic==2.9.2 \
1541
1541
  --hash=sha256:d155cef71265d1e9807ed1c32b4c8deec042a44a50a4188b25ac67ecd81a9c0f \
1542
1542
  --hash=sha256:f048cec7b26778210e28a0459867920654d48e5e62db0958433636cde4254f12
@@ -2075,19 +2075,18 @@ rpds-py==0.22.3 \
2075
2075
  --hash=sha256:fb6116dfb8d1925cbdb52595560584db42a7f664617a1f7d7f6e32f138cdf37d \
2076
2076
  --hash=sha256:fda7cb070f442bf80b642cd56483b5548e43d366fe3f39b98e67cce780cded00 \
2077
2077
  --hash=sha256:feea821ee2a9273771bae61194004ee2fc33f8ec7db08117ef9147d4bbcbca8e
2078
- rustworkx==0.15.1 \
2079
- --hash=sha256:0e0cc86599f979285b2ab9c357276f3272f3fcb3b2df5651a6bf9704c570d4c1 \
2080
- --hash=sha256:241c502532e348ba89200823326dba30de4df4b886cb2fd5a140b359ff124bb3 \
2081
- --hash=sha256:308bc76a01bcae9af4602d8b9ed58021df37dd0bb5a7b2e3831ae53c5e234ff0 \
2082
- --hash=sha256:6ac68ae2515ece22ba3ef56f3d16ad6bf707955f650d623190b2e7d706c6dc92 \
2083
- --hash=sha256:6cd4496d3298cd3205c03545e48cc37d21e0455d57752af801d3fb250452d590 \
2084
- --hash=sha256:7834ab34748db6214ec3b3836b996b23882dc83184234e6d346d6bb85fd58ae5 \
2085
- --hash=sha256:7e5f4156f46fa03177c9b0580450eab87786063495d48b457762a5bdd20c55e2 \
2086
- --hash=sha256:89077382633e918d2392772f53b9d6d30eee51eb536f8d38ee195c212b2f0427 \
2087
- --hash=sha256:8b903edec1d803704b499959f9d6f6119cdda63b9b64194a4b4307e506b112f0 \
2088
- --hash=sha256:a2c97a56ff8a0f6c273a83e26e627c72207442b4252aa550acad0bff42caac40 \
2089
- --hash=sha256:cb518f5649e62d753e29ca1e57290c8f58adbebcd154dc3159f4a36ebfa1e2b7 \
2090
- --hash=sha256:ce53f173fed16e1d51d9df9f23475a16c981b03bf1a412d991c75a70db6b1dc1
2078
+ rustworkx==0.16.0 \
2079
+ --hash=sha256:040c4368729cf502f756a3b0ff5f1c6915fc389f74dcc6afc6c3833688c97c01 \
2080
+ --hash=sha256:0db3a73bf68b3e66c08322a2fc95d3aa663d037d9b4e49c3509da4898d3529cc \
2081
+ --hash=sha256:293180b83509ee9bff4c3af7ccc1024f6528d61b65d0cb7320bd31924f10cb71 \
2082
+ --hash=sha256:476a6c67b0142acd941691943750cc6737a48372304489969c2b62d30aaf4c27 \
2083
+ --hash=sha256:4f12a13d7486234fa2a84746d5e41f436bf9df43548043e7a232f48804ff8c61 \
2084
+ --hash=sha256:89efd5c3a4653ddacc55ca39f28b261d43deec7d678f8f8fc6b76b5087f1dfea \
2085
+ --hash=sha256:905df608843c32fa45ac023687769fe13056edf7584474c801d5c50705d76e9b \
2086
+ --hash=sha256:9f0dcb83f38d5ca2c3a683eb9b6951c8aec3262fbfe5141946a7ee5ba37e0bb6 \
2087
+ --hash=sha256:bef2ef42870f806af93979b457e240f6dfa4f867ca33965c620f3a804409ed3a \
2088
+ --hash=sha256:d650e39fc1a1534335f7517358ebfc3478bb235428463cfcd7c5750d50377b33 \
2089
+ --hash=sha256:ec0c12aac8c54910ace20ac6ada4b890cd39f95f69100514715f8ad7af9041e4
2091
2090
  scikit-learn==1.6.1 \
2092
2091
  --hash=sha256:0650e730afb87402baa88afbf31c07b84c98272622aaba002559b614600ca691 \
2093
2092
  --hash=sha256:0c8d036eb937dbb568c6242fa598d551d88fb4399c0344d95c001980ec1c7d36 \
@@ -2428,9 +2427,9 @@ traitlets==5.14.3 \
2428
2427
  types-python-dateutil==2.9.0.20241206 \
2429
2428
  --hash=sha256:18f493414c26ffba692a72369fea7a154c502646301ebfe3d56a04b3767284cb \
2430
2429
  --hash=sha256:e248a4bc70a486d3e3ec84d0dc30eec3a5f979d6e7ee4123ae043eedbb987f53
2431
- types-requests==2.32.0.20250301 \
2432
- --hash=sha256:0003e0124e2cbefefb88222ff822b48616af40c74df83350f599a650c8de483b \
2433
- --hash=sha256:3d909dc4eaab159c0d964ebe8bfa326a7afb4578d8706408d417e17d61b0c500
2430
+ types-requests==2.32.0.20250306 \
2431
+ --hash=sha256:0962352694ec5b2f95fda877ee60a159abdf84a0fc6fdace599f20acb41a03d1 \
2432
+ --hash=sha256:25f2cbb5c8710b2022f8bbee7b2b66f319ef14aeea2f35d80f18c9dbf3b60a0b
2434
2433
  typing-extensions==4.12.2 \
2435
2434
  --hash=sha256:04e5ca0351e0f3f85c6853954072df659d0d13fac324d0072316b67d7794700d \
2436
2435
  --hash=sha256:1a7ead55c7e559dd4dee8856e3a88b41225abfe1ce8df57b7c13915fe121ffb8
@@ -51,6 +51,7 @@ class BenchmarkBase(ABC):
51
51
  self.shots = self.configuration.shots
52
52
  self.calset_id = self.configuration.calset_id
53
53
  self.max_gates_per_batch = self.configuration.max_gates_per_batch
54
+ self.max_circuits_per_batch = self.configuration.max_circuits_per_batch
54
55
 
55
56
  self.routing_method = self.configuration.routing_method
56
57
  self.physical_layout = self.configuration.physical_layout
@@ -92,6 +93,8 @@ class BenchmarkConfigurationBase(BaseModel):
92
93
  * Default for all benchmarks is 2**8.
93
94
  max_gates_per_batch (Optional[int]): the maximum number of gates per circuit batch.
94
95
  * Default for all benchmarks is None.
96
+ max_circuits_per_batch (Optional[int]): the maximum number of circuits per batch.
97
+ * Default for all benchmarks is None.
95
98
  calset_id (Optional[str]): the calibration ID to use in circuit execution.
96
99
  * Default for all benchmarks is None (uses last available calibration ID).
97
100
  routing_method (Literal["basic", "lookahead", "stochastic", "sabre", "none"]): the Qiskit routing method to use in transpilation.
@@ -100,13 +103,14 @@ class BenchmarkConfigurationBase(BaseModel):
100
103
  - "fixed": physical layout is constrained during transpilation to the selected initial physical qubits.
101
104
  - "batching": physical layout is allowed to use any other physical qubits, and circuits are batched according to final measured qubits.
102
105
  * Default for all benchmarks is "fixed".
103
- use_DD (bool): Boolean flag determining if dynamical decoupling is enabled during circuit execution
106
+ use_dd (bool): Boolean flag determining whether to enable dynamical decoupling during circuit execution.
104
107
  * Default: False
105
108
  """
106
109
 
107
110
  benchmark: Type[BenchmarkBase]
108
111
  shots: int = 2**8
109
112
  max_gates_per_batch: Optional[int] = None
113
+ max_circuits_per_batch: Optional[int] = None
110
114
  calset_id: Optional[str] = None
111
115
  routing_method: Literal["basic", "lookahead", "stochastic", "sabre", "none"] = "sabre"
112
116
  physical_layout: Literal["fixed", "batching"] = "fixed"
@@ -239,6 +239,7 @@ class CompressiveGST(Benchmark):
239
239
  self.configuration.shots,
240
240
  self.calset_id,
241
241
  max_gates_per_batch=self.configuration.max_gates_per_batch,
242
+ max_circuits_per_batch=self.configuration.max_circuits_per_batch,
242
243
  circuit_compilation_options=self.circuit_compilation_options,
243
244
  )
244
245
  # Retrieve
@@ -255,6 +256,7 @@ class CompressiveGST(Benchmark):
255
256
  self.configuration.shots,
256
257
  self.calset_id,
257
258
  max_gates_per_batch=self.configuration.max_gates_per_batch,
259
+ max_circuits_per_batch=self.configuration.max_circuits_per_batch,
258
260
  )
259
261
  # Retrieve all
260
262
  qcvv_logger.info(f"Now executing the corresponding circuit batch")
@@ -851,6 +851,7 @@ class GHZBenchmark(Benchmark):
851
851
  self.shots,
852
852
  self.calset_id,
853
853
  max_gates_per_batch=self.max_gates_per_batch,
854
+ max_circuits_per_batch=self.configuration.max_circuits_per_batch,
854
855
  circuit_compilation_options=self.circuit_compilation_options,
855
856
  )
856
857
 
@@ -881,6 +881,7 @@ class QScoreBenchmark(Benchmark):
881
881
  self.shots,
882
882
  self.calset_id,
883
883
  max_gates_per_batch=self.max_gates_per_batch,
884
+ max_circuits_per_batch=self.configuration.max_circuits_per_batch,
884
885
  circuit_compilation_options=self.circuit_compilation_options,
885
886
  )
886
887
  qc_transpiled_list.append(transpiled_qc)
@@ -565,6 +565,7 @@ class CLOPSBenchmark(Benchmark):
565
565
  self.num_shots,
566
566
  self.calset_id,
567
567
  max_gates_per_batch=self.max_gates_per_batch,
568
+ max_circuits_per_batch=self.configuration.max_circuits_per_batch,
568
569
  circuit_compilation_options=self.circuit_compilation_options,
569
570
  )
570
571
 
@@ -26,7 +26,7 @@ from mthree.classes import QuasiCollection
26
26
  from mthree.utils import expval
27
27
  import numpy as np
28
28
  from qiskit.circuit.library import QuantumVolume
29
- from qiskit_aer import Aer
29
+ from qiskit_aer import StatevectorSimulator
30
30
  import xarray as xr
31
31
 
32
32
  from iqm.benchmarks.benchmark import BenchmarkConfigurationBase
@@ -119,7 +119,7 @@ def get_ideal_heavy_outputs(
119
119
  """
120
120
  simulable_circuits = deepcopy(qc_list)
121
121
  ideal_heavy_outputs: List[Dict[str, float]] = []
122
- ideal_simulator = Aer.get_backend("statevector_simulator")
122
+ ideal_simulator = StatevectorSimulator()
123
123
 
124
124
  # Separate according to sorted indices
125
125
  circuit_batches = {
@@ -698,6 +698,7 @@ class QuantumVolumeBenchmark(Benchmark):
698
698
  self.shots,
699
699
  self.calset_id,
700
700
  max_gates_per_batch=self.max_gates_per_batch,
701
+ max_circuits_per_batch=self.configuration.max_circuits_per_batch,
701
702
  circuit_compilation_options=self.circuit_compilation_options,
702
703
  )
703
704
  # qcvv_logger.info(
@@ -294,6 +294,7 @@ class CliffordRandomizedBenchmarking(Benchmark):
294
294
  self.shots,
295
295
  self.calset_id,
296
296
  self.max_gates_per_batch,
297
+ self.configuration.max_circuits_per_batch,
297
298
  )
298
299
  )
299
300
  qcvv_logger.info(f"Job for sequence length {seq_length} submitted successfully!")
@@ -353,6 +354,7 @@ class CliffordRandomizedBenchmarking(Benchmark):
353
354
  self.backend,
354
355
  self.calset_id,
355
356
  max_gates_per_batch=self.max_gates_per_batch,
357
+ max_circuits_per_batch=self.configuration.max_circuits_per_batch,
356
358
  circuit_compilation_options=self.circuit_compilation_options,
357
359
  )
358
360
  )
@@ -407,6 +407,7 @@ class InterleavedRandomizedBenchmarking(Benchmark):
407
407
  self.shots,
408
408
  self.calset_id,
409
409
  self.max_gates_per_batch,
410
+ self.configuration.max_circuits_per_batch,
410
411
  )
411
412
  )
412
413
  all_rb_jobs["interleaved"].append(
@@ -418,6 +419,7 @@ class InterleavedRandomizedBenchmarking(Benchmark):
418
419
  self.shots,
419
420
  self.calset_id,
420
421
  self.max_gates_per_batch,
422
+ self.configuration.max_circuits_per_batch,
421
423
  )
422
424
  )
423
425
  qcvv_logger.info(f"Both jobs for sequence length {seq_length} submitted successfully!")
@@ -513,6 +515,7 @@ class InterleavedRandomizedBenchmarking(Benchmark):
513
515
  backend,
514
516
  self.calset_id,
515
517
  max_gates_per_batch=self.max_gates_per_batch,
518
+ max_circuits_per_batch=self.configuration.max_circuits_per_batch,
516
519
  circuit_compilation_options=self.circuit_compilation_options,
517
520
  )
518
521
  )
@@ -524,6 +527,7 @@ class InterleavedRandomizedBenchmarking(Benchmark):
524
527
  backend,
525
528
  self.calset_id,
526
529
  max_gates_per_batch=self.max_gates_per_batch,
530
+ max_circuits_per_batch=self.configuration.max_circuits_per_batch,
527
531
  circuit_compilation_options=self.circuit_compilation_options,
528
532
  )
529
533
  )
@@ -662,6 +662,7 @@ class MirrorRandomizedBenchmarking(Benchmark):
662
662
  self.shots,
663
663
  self.calset_id,
664
664
  max_gates_per_batch=self.max_gates_per_batch,
665
+ max_circuits_per_batch=self.configuration.max_circuits_per_batch,
665
666
  circuit_compilation_options=self.circuit_compilation_options,
666
667
  )
667
668
  mrb_submit_results = {
@@ -439,6 +439,7 @@ def submit_parallel_rb_job(
439
439
  shots: int,
440
440
  calset_id: Optional[str],
441
441
  max_gates_per_batch: Optional[str],
442
+ max_circuits_per_batch: Optional[int],
442
443
  ) -> Dict[str, Any]:
443
444
  """Submit fixed-depth parallel MRB jobs for execution in the specified IQMBackend
444
445
  Args:
@@ -449,6 +450,7 @@ def submit_parallel_rb_job(
449
450
  shots (int): the number of shots to submit the job
450
451
  calset_id (Optional[str]): the calibration identifier
451
452
  max_gates_per_batch (Optional[str]): the maximum number of gates per batch to submit the job
453
+ max_circuits_per_batch (Optional[int]): the maximum number of circuits per batch to submit the job.
452
454
  Returns:
453
455
  Dict with qubit layout, submitted job objects, type (vanilla/DD) and submission time
454
456
  """
@@ -456,7 +458,12 @@ def submit_parallel_rb_job(
456
458
  # Send to execute on backend
457
459
  # pylint: disable=unbalanced-tuple-unpacking
458
460
  execution_jobs, time_submit = submit_execute(
459
- sorted_transpiled_circuit_dicts, backend_arg, shots, calset_id, max_gates_per_batch=max_gates_per_batch
461
+ sorted_transpiled_circuit_dicts,
462
+ backend_arg,
463
+ shots,
464
+ calset_id,
465
+ max_gates_per_batch=max_gates_per_batch,
466
+ max_circuits_per_batch=max_circuits_per_batch,
460
467
  )
461
468
  rb_submit_results = {
462
469
  "qubits": qubits_array,
@@ -474,6 +481,7 @@ def submit_sequential_rb_jobs(
474
481
  backend_arg: str | IQMBackendBase,
475
482
  calset_id: Optional[str] = None,
476
483
  max_gates_per_batch: Optional[int] = None,
484
+ max_circuits_per_batch: Optional[int] = None,
477
485
  circuit_compilation_options: Optional[CircuitCompilationOptions] = None,
478
486
  ) -> List[Dict[str, Any]]:
479
487
  """Submit sequential RB jobs for execution in the specified IQMBackend
@@ -484,6 +492,7 @@ def submit_sequential_rb_jobs(
484
492
  backend_arg (IQMBackendBase): the IQM backend to submit the job
485
493
  calset_id (Optional[str]): the calibration identifier
486
494
  max_gates_per_batch (Optional[int]): the maximum number of gates per batch
495
+ max_circuits_per_batch (Optional[int]): the maximum number of circuits per batch
487
496
  circuit_compilation_options (Optional[CircuitCompilationOptions]): Compilation options passed to submit_execute
488
497
  Returns:
489
498
  Dict with qubit layout, submitted job objects, type (vanilla/DD) and submission time
@@ -504,6 +513,7 @@ def submit_sequential_rb_jobs(
504
513
  shots,
505
514
  calset_id,
506
515
  max_gates_per_batch,
516
+ max_circuits_per_batch=max_circuits_per_batch,
507
517
  circuit_compilation_options=circuit_compilation_options,
508
518
  )
509
519
  rb_submit_results[depth] = {
@@ -503,6 +503,7 @@ def submit_execute(
503
503
  shots: int,
504
504
  calset_id: Optional[str] = None,
505
505
  max_gates_per_batch: Optional[int] = None,
506
+ max_circuits_per_batch: Optional[int] = None,
506
507
  circuit_compilation_options: Optional[CircuitCompilationOptions] = None,
507
508
  ) -> List[IQMJob]:
508
509
  """Submit for execute a list of quantum circuits on the specified Backend.
@@ -511,10 +512,15 @@ def submit_execute(
511
512
  sorted_transpiled_qc_list (Dict[Tuple, List[QuantumCircuit]]): the list of quantum circuits to be executed.
512
513
  backend (IQMBackendBase): the backend to execute the circuits on.
513
514
  shots (int): the number of shots per circuit.
514
- calset_id (Optional[str]): the calibration set ID, uses the latest one if None.
515
- max_gates_per_batch (int): the maximum number of gates per batch sent to the backend, used to make manageable batches.
515
+ calset_id (Optional[str]): the calibration set ID.
516
+ * Default is None: uses the latest calibration ID.
517
+ max_gates_per_batch (Optional[int]): the maximum number of gates per batch sent to the backend, used to make manageable batches.
518
+ * Default is None.
519
+ max_circuits_per_batch (Optional[int]): the maximum number of circuits per batch sent to the backend, used to make manageable batches.
520
+ * Default is None.
516
521
  circuit_compilation_options (CircuitCompilationOptions): Ability to pass a compilation options object,
517
522
  enabling execution with dynamical decoupling, among other options - see qiskit-iqm documentation.
523
+ * Default is None.
518
524
  Returns:
519
525
  List[IQMJob]: the IQMJob objects of the executed circuits.
520
526
 
@@ -530,23 +536,41 @@ def submit_execute(
530
536
  f"Submitting batch with {len(sorted_transpiled_qc_list[k])} circuits corresponding to qubits {list(k)}"
531
537
  )
532
538
  # Divide into batches according to maximum gate count per batch
533
- if max_gates_per_batch is None:
539
+ if max_gates_per_batch is None and max_circuits_per_batch is None:
534
540
  jobs = backend.run(sorted_transpiled_qc_list[k], shots=shots, calibration_set_id=calset_id)
535
541
  final_jobs.append(jobs)
542
+
536
543
  else:
537
- # Calculate average gate count per quantum circuit
538
- avg_gates_per_qc = sum(sum(qc.count_ops().values()) for qc in sorted_transpiled_qc_list[k]) / len(
539
- sorted_transpiled_qc_list[k]
540
- )
541
- final_batch_jobs = []
542
- for index, qc_batch in enumerate(
543
- chunked(
544
- sorted_transpiled_qc_list[k],
545
- max(1, floor(max_gates_per_batch / avg_gates_per_qc)),
544
+ if max_gates_per_batch is None and max_circuits_per_batch is not None:
545
+ restriction = "max_circuits_per_batch"
546
+ batching_size = max_circuits_per_batch
547
+
548
+ elif max_circuits_per_batch is None and max_gates_per_batch is not None:
549
+ restriction = "max_gates_per_batch"
550
+ # Calculate average gate count per quantum circuit
551
+ avg_gates_per_qc = sum(sum(qc.count_ops().values()) for qc in sorted_transpiled_qc_list[k]) / len(
552
+ sorted_transpiled_qc_list[k]
553
+ )
554
+ batching_size = max(1, floor(max_gates_per_batch / avg_gates_per_qc))
555
+
556
+ else: # Both are not None - select the one rendering the smallest batches.
557
+ # Calculate average gate count per quantum circuit
558
+ avg_gates_per_qc = sum(sum(qc.count_ops().values()) for qc in sorted_transpiled_qc_list[k]) / len(
559
+ sorted_transpiled_qc_list[k]
560
+ )
561
+ qcvv_logger.warning(
562
+ "Both max_gates_per_batch and max_circuits_per_batch are not None. Selecting the one giving the smallest batches."
546
563
  )
547
- ):
564
+ batching_size = min(max_circuits_per_batch, max(1, floor(max_gates_per_batch / avg_gates_per_qc)))
565
+ if batching_size == max_circuits_per_batch:
566
+ restriction = "max_circuits_per_batch"
567
+ else:
568
+ restriction = "max_gates_per_batch"
569
+
570
+ final_batch_jobs = []
571
+ for index, qc_batch in enumerate(chunked(sorted_transpiled_qc_list[k], batching_size)):
548
572
  qcvv_logger.info(
549
- f"max_gates_per_batch restriction: submitting subbatch #{index+1} with {len(qc_batch)} circuits corresponding to qubits {list(k)}"
573
+ f"{restriction} restriction: submitting subbatch #{index + 1} with {len(qc_batch)} circuits corresponding to qubits {list(k)}"
550
574
  )
551
575
  batch_jobs = backend.run(
552
576
  qc_batch,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: iqm-benchmarks
3
- Version: 2.23
3
+ Version: 2.25
4
4
  Summary: A package for implementation of Quantum Characterization, Verification and Validation (QCVV) techniques on IQM's hardware at gate level abstraction
5
5
  Author-email: IQM Finland Oy <developers@meetiqm.com>, Adrian Auer <adrian.auer@meetiqm.com>, Raphael Brieger <raphael.brieger@meetiqm.com>, Alessio Calzona <alessio.calzona@meetiqm.com>, Pedro Figueroa Romero <pedro.romero@meetiqm.com>, Amin Hosseinkhani <amin.hosseinkhani@meetiqm.com>, Miikka Koistinen <miikka@meetiqm.com>, Nadia Milazzo <nadia.milazzo@meetiqm.com>, Vicente Pina Canelles <vicente.pina@meetiqm.com>, Aniket Rath <aniket.rath@meetiqm.com>, Jami Rönkkö <jami@meetiqm.com>, Stefan Seegerer <stefan.seegerer@meetiqm.com>
6
6
  Project-URL: Homepage, https://github.com/iqm-finland/iqm-benchmarks
@@ -16,6 +16,7 @@ Requires-Dist: matplotlib<4,>=3.6.3
16
16
  Requires-Dist: more-itertools<11.0.0,>=10.1.0
17
17
  Requires-Dist: mthree<2.7,>=2.6
18
18
  Requires-Dist: networkx<4.0,>=3.3
19
+ Requires-Dist: rustworkx>=0.15.1
19
20
  Requires-Dist: numpy<2.0,>=1.25.2
20
21
  Requires-Dist: qiskit<2.0,>=1.0
21
22
  Requires-Dist: qiskit-iqm<16.0,>=15.1
@@ -193,7 +194,7 @@ EXAMPLE_MRB = MirrorRBConfiguration(
193
194
  )
194
195
 
195
196
  EXAMPLE_QV = QuantumVolumeConfiguration(
196
- num_circuits=500,
197
+ num_circuits=800,
197
198
  shots=2**8,
198
199
  calset_id=None,
199
200
  num_sigmas=2,
@@ -203,7 +204,8 @@ EXAMPLE_QV = QuantumVolumeConfiguration(
203
204
  optimize_sqg=True,
204
205
  routing_method="sabre",
205
206
  physical_layout="fixed",
206
- max_gates_per_batch=60_000,
207
+ max_circuits_per_batch=500,
208
+ max_gates_per_batch=60_000, # Will be used if it renders a smaller max batch size than max_circuits_per_batch
207
209
  rem=True,
208
210
  mit_shots=1_000,
209
211
  )
@@ -93,4 +93,5 @@ tests/test_gst.py
93
93
  tests/test_qscore.py
94
94
  tests/test_qv.py
95
95
  tests/test_rb.py
96
- tests/unit/test_benchmark_circuit.py
96
+ tests/unit/test_benchmark_circuit.py
97
+ tests/unit/test_submit_execute.py
@@ -3,6 +3,7 @@ matplotlib<4,>=3.6.3
3
3
  more-itertools<11.0.0,>=10.1.0
4
4
  mthree<2.7,>=2.6
5
5
  networkx<4.0,>=3.3
6
+ rustworkx>=0.15.1
6
7
  numpy<2.0,>=1.25.2
7
8
  qiskit<2.0,>=1.0
8
9
  qiskit-iqm<16.0,>=15.1
@@ -0,0 +1,172 @@
1
+ import unittest
2
+ from unittest.mock import Mock, patch, call
3
+
4
+ from iqm.qiskit_iqm import IQMCircuit as QuantumCircuit
5
+ from iqm.qiskit_iqm.iqm_backend import IQMBackendBase
6
+ from iqm.qiskit_iqm.iqm_job import IQMJob
7
+ from iqm.iqm_client.models import CircuitCompilationOptions
8
+ from iqm.benchmarks.utils import submit_execute
9
+
10
+
11
+
12
+ class TestSubmitExecute(unittest.TestCase):
13
+ def setUp(self):
14
+ # Create mock backend
15
+ self.mock_backend = Mock(spec=IQMBackendBase)
16
+ self.mock_run_result = Mock(spec=IQMJob)
17
+ self.mock_backend.run.return_value = self.mock_run_result
18
+
19
+ # Create test circuits with varying gate counts
20
+ self.create_test_circuits()
21
+
22
+ # Create a dict mapping tuple keys to lists of circuits
23
+ self.sorted_circuits = {
24
+ (0, 1): self.qc_list_small, # 10 circuits with 5 operations each
25
+ (2, 3): self.qc_list_large, # 5 circuits with 12 operations each
26
+ }
27
+
28
+ def create_test_circuits(self):
29
+ # Small circuits (5 operations each)
30
+ self.qc_list_small = []
31
+ for _ in range(10):
32
+ qc = QuantumCircuit(2, 2)
33
+ qc.r(0.1, 0.2, 0)
34
+ qc.r(0.3, 0.4, 1)
35
+ qc.cz(0, 1)
36
+ qc.measure_all()
37
+ # Mock the count_ops method to return a fixed gate count
38
+ qc.count_ops = Mock(return_value={'r': 2, 'cz': 1, 'measure': 2})
39
+ self.qc_list_small.append(qc)
40
+
41
+ # Large circuits (12 operations each)
42
+ self.qc_list_large = []
43
+ for _ in range(5):
44
+ qc = QuantumCircuit(2, 2)
45
+ for _ in range(5):
46
+ qc.r(0.1, 0.2, 0)
47
+ qc.r(0.3, 0.4, 1)
48
+ qc.measure_all()
49
+ # Mock the count_ops method to return a fixed gate count
50
+ qc.count_ops = Mock(return_value={'r': 10, 'measure': 2})
51
+ self.qc_list_large.append(qc)
52
+
53
+ @patch('iqm.benchmarks.utils.qcvv_logger')
54
+ def test_submit_execute_no_restrictions(self, mock_logger):
55
+ """Test with no batch size restrictions."""
56
+ jobs,_ = submit_execute(self.sorted_circuits, self.mock_backend, shots=1000)
57
+
58
+ # Should return after first batch
59
+ self.assertEqual(len(jobs), 2)
60
+
61
+ # Check that backend.run was called with each circuit list
62
+ expected_calls = []
63
+ for key in self.sorted_circuits.keys():
64
+ expected_calls.append(call(
65
+ self.sorted_circuits[key], shots=1000, calibration_set_id=None
66
+ ))
67
+ self.mock_backend.run.assert_has_calls(expected_calls, any_order=True)
68
+
69
+ @patch('iqm.benchmarks.utils.qcvv_logger')
70
+ def test_submit_execute_max_circuits(self, mock_logger):
71
+ """Test with max_circuits_per_batch restriction."""
72
+
73
+ jobs, _ = submit_execute(
74
+ self.sorted_circuits,
75
+ self.mock_backend,
76
+ shots=1000,
77
+ max_circuits_per_batch=2
78
+ )
79
+
80
+ # Check that backend.run was called with correct batches
81
+ expected_calls = [
82
+ # First key (2,3) - 5 circuits in batches of 2
83
+ call(self.qc_list_large[0:2], shots=1000, calibration_set_id=None, circuit_compilation_options=None),
84
+ call(self.qc_list_large[2:4], shots=1000, calibration_set_id=None, circuit_compilation_options=None),
85
+ call([self.qc_list_large[4]], shots=1000, calibration_set_id=None, circuit_compilation_options=None),
86
+ # Second key (0,1) - 10 circuits in batches of 2
87
+ call(self.qc_list_small[0:2], shots=1000, calibration_set_id=None, circuit_compilation_options=None),
88
+ call(self.qc_list_small[2:4], shots=1000, calibration_set_id=None, circuit_compilation_options=None),
89
+ call(self.qc_list_small[4:6], shots=1000, calibration_set_id=None, circuit_compilation_options=None),
90
+ call(self.qc_list_small[6:8], shots=1000, calibration_set_id=None, circuit_compilation_options=None),
91
+ call(self.qc_list_small[8:10], shots=1000, calibration_set_id=None, circuit_compilation_options=None),
92
+ ]
93
+
94
+ # Verify all calls were made and all circuits were used
95
+ self.mock_backend.run.assert_has_calls(expected_calls, any_order=True)
96
+ self.assertEqual(self.mock_backend.run.call_count, 8)
97
+
98
+ @patch('iqm.benchmarks.utils.qcvv_logger')
99
+ def test_submit_execute_max_gates(self, mock_logger):
100
+ """Test with max_gates_per_batch restriction."""
101
+
102
+ # Each small circuit has 5 operations, each large has 10
103
+ # Set max_gates_per_batch to a value that will test different batch sizes
104
+ jobs,_ = submit_execute(
105
+ self.sorted_circuits,
106
+ self.mock_backend,
107
+ shots=1000,
108
+ max_gates_per_batch=15
109
+ )
110
+
111
+ # For large circuits (12 operations each), batches should have 1 circuit per batch
112
+ # For small circuits (5 operations each), batches should have 3 circuits per batch
113
+
114
+ expected_batch_sizes_large = [1, 1, 1, 1, 1] # 5 batches of 1 circuit
115
+ expected_batch_sizes_small = [3, 3, 3, 1] # 3 batches of 3 circuits and one batch of one circuit
116
+
117
+ actual_batch_sizes = [len(args[0]) for args, _ in self.mock_backend.run.call_args_list]
118
+
119
+ # Verify we have the right number of batches
120
+ self.assertEqual(len(actual_batch_sizes),
121
+ len(expected_batch_sizes_large) + len(expected_batch_sizes_small))
122
+
123
+ # Verify batch sizes match our expectations
124
+ self.assertEqual(actual_batch_sizes[4:], expected_batch_sizes_large)
125
+ self.assertEqual(actual_batch_sizes[:4], expected_batch_sizes_small)
126
+
127
+ # Check that all circuits were included
128
+ total_circuits = sum(actual_batch_sizes)
129
+ self.assertEqual(total_circuits, len(self.qc_list_large) + len(self.qc_list_small))
130
+
131
+ @patch('iqm.benchmarks.utils.qcvv_logger')
132
+ def test_submit_execute_both_restrictions(self, mock_logger):
133
+ """Test with both max_gates_per_batch and max_circuits_per_batch restrictions."""
134
+
135
+ jobs,_ = submit_execute(
136
+ self.sorted_circuits,
137
+ self.mock_backend,
138
+ shots=1000,
139
+ max_gates_per_batch=15,
140
+ max_circuits_per_batch=2
141
+ )
142
+
143
+ # For large circuits:
144
+ # - max_gates_per_batch=15 would allow 1 circuit per batch (12 operations each)
145
+ # - max_circuits_per_batch=2 would allow 2 circuits per batch
146
+ # Should use the more restrictive: 1 circuit per batch
147
+
148
+ # For small circuits:
149
+ # - max_gates_per_batch=15 would allow 3 circuits per batch (5 operations each)
150
+ # - max_circuits_per_batch=2 would allow 2 circuits per batch
151
+ # Should use the more restrictive: 2 circuits per batch
152
+
153
+ expected_batch_sizes_large = [1, 1, 1, 1, 1] # 5 batches of 1 circuit
154
+ expected_batch_sizes_small = [2, 2, 2, 2, 2] # 5 batches of 2 circuits
155
+
156
+ actual_batch_sizes = [len(args[0]) for args, _ in self.mock_backend.run.call_args_list]
157
+
158
+ # Verify batch sizes match our expectations
159
+ self.assertEqual(actual_batch_sizes[5:], expected_batch_sizes_large)
160
+ self.assertEqual(actual_batch_sizes[:5], expected_batch_sizes_small)
161
+
162
+ # Check that all circuits were included
163
+ total_circuits = sum(actual_batch_sizes)
164
+ self.assertEqual(total_circuits, len(self.qc_list_large) + len(self.qc_list_small))
165
+
166
+ # Verify batch sizes are within maximum limits
167
+ for batch_size in actual_batch_sizes:
168
+ # Circuits per batch should not exceed max_circuits_per_batch
169
+ self.assertLessEqual(batch_size, 2)
170
+
171
+ if __name__ == '__main__':
172
+ unittest.main()
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes