iqm-benchmarks 2.49__tar.gz → 2.51__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.
Files changed (112) hide show
  1. {iqm_benchmarks-2.49 → iqm_benchmarks-2.51}/CHANGELOG.rst +8 -0
  2. {iqm_benchmarks-2.49/src/iqm_benchmarks.egg-info → iqm_benchmarks-2.51}/PKG-INFO +3 -3
  3. {iqm_benchmarks-2.49 → iqm_benchmarks-2.51}/pyproject.toml +2 -2
  4. {iqm_benchmarks-2.49 → iqm_benchmarks-2.51}/requirements.txt +107 -18
  5. {iqm_benchmarks-2.49 → iqm_benchmarks-2.51}/src/iqm/benchmarks/optimization/qscore.py +247 -44
  6. {iqm_benchmarks-2.49 → iqm_benchmarks-2.51/src/iqm_benchmarks.egg-info}/PKG-INFO +3 -3
  7. {iqm_benchmarks-2.49 → iqm_benchmarks-2.51}/src/iqm_benchmarks.egg-info/requires.txt +2 -2
  8. {iqm_benchmarks-2.49 → iqm_benchmarks-2.51}/tests/test_qscore.py +5 -4
  9. {iqm_benchmarks-2.49 → iqm_benchmarks-2.51}/.github/workflows/main.yml +0 -0
  10. {iqm_benchmarks-2.49 → iqm_benchmarks-2.51}/.github/workflows/publish.yml +0 -0
  11. {iqm_benchmarks-2.49 → iqm_benchmarks-2.51}/.github/workflows/tag_and_release.yml +0 -0
  12. {iqm_benchmarks-2.49 → iqm_benchmarks-2.51}/.gitignore +0 -0
  13. {iqm_benchmarks-2.49 → iqm_benchmarks-2.51}/LICENSE +0 -0
  14. {iqm_benchmarks-2.49 → iqm_benchmarks-2.51}/MANIFEST.in +0 -0
  15. {iqm_benchmarks-2.49 → iqm_benchmarks-2.51}/README.md +0 -0
  16. {iqm_benchmarks-2.49 → iqm_benchmarks-2.51}/benchmark_runner.py +0 -0
  17. {iqm_benchmarks-2.49 → iqm_benchmarks-2.51}/docbuild +0 -0
  18. {iqm_benchmarks-2.49 → iqm_benchmarks-2.51}/docs/API.rst +0 -0
  19. {iqm_benchmarks-2.49 → iqm_benchmarks-2.51}/docs/Makefile +0 -0
  20. {iqm_benchmarks-2.49 → iqm_benchmarks-2.51}/docs/_static/images/favicon.ico +0 -0
  21. {iqm_benchmarks-2.49 → iqm_benchmarks-2.51}/docs/_static/images/logo.png +0 -0
  22. {iqm_benchmarks-2.49 → iqm_benchmarks-2.51}/docs/_templates/autosummary-class-template.rst +0 -0
  23. {iqm_benchmarks-2.49 → iqm_benchmarks-2.51}/docs/_templates/autosummary-module-template.rst +0 -0
  24. {iqm_benchmarks-2.49 → iqm_benchmarks-2.51}/docs/changelog.rst +0 -0
  25. {iqm_benchmarks-2.49 → iqm_benchmarks-2.51}/docs/conf.py +0 -0
  26. {iqm_benchmarks-2.49 → iqm_benchmarks-2.51}/docs/development/development.rst +0 -0
  27. {iqm_benchmarks-2.49 → iqm_benchmarks-2.51}/docs/development/generate_2qubit_cliffords.ipynb +0 -0
  28. {iqm_benchmarks-2.49 → iqm_benchmarks-2.51}/docs/development/how_to_make_your_own_benchmark.ipynb +0 -0
  29. {iqm_benchmarks-2.49 → iqm_benchmarks-2.51}/docs/devices/devices.rst +0 -0
  30. {iqm_benchmarks-2.49 → iqm_benchmarks-2.51}/docs/devices/spark.ipynb +0 -0
  31. {iqm_benchmarks-2.49 → iqm_benchmarks-2.51}/docs/devices/star.ipynb +0 -0
  32. {iqm_benchmarks-2.49 → iqm_benchmarks-2.51}/docs/examples/example_clifford_rb.ipynb +0 -0
  33. {iqm_benchmarks-2.49 → iqm_benchmarks-2.51}/docs/examples/example_clops.ipynb +0 -0
  34. {iqm_benchmarks-2.49 → iqm_benchmarks-2.51}/docs/examples/example_coherence.ipynb +0 -0
  35. {iqm_benchmarks-2.49 → iqm_benchmarks-2.51}/docs/examples/example_eplg.ipynb +0 -0
  36. {iqm_benchmarks-2.49 → iqm_benchmarks-2.51}/docs/examples/example_experiment_all.ipynb +0 -0
  37. {iqm_benchmarks-2.49 → iqm_benchmarks-2.51}/docs/examples/example_ghz.ipynb +0 -0
  38. {iqm_benchmarks-2.49 → iqm_benchmarks-2.51}/docs/examples/example_graphstate.ipynb +0 -0
  39. {iqm_benchmarks-2.49 → iqm_benchmarks-2.51}/docs/examples/example_gst.ipynb +0 -0
  40. {iqm_benchmarks-2.49 → iqm_benchmarks-2.51}/docs/examples/example_interleaved_rb.ipynb +0 -0
  41. {iqm_benchmarks-2.49 → iqm_benchmarks-2.51}/docs/examples/example_mirror_rb.ipynb +0 -0
  42. {iqm_benchmarks-2.49 → iqm_benchmarks-2.51}/docs/examples/example_qscore.ipynb +0 -0
  43. {iqm_benchmarks-2.49 → iqm_benchmarks-2.51}/docs/examples/example_quantum_volume.ipynb +0 -0
  44. {iqm_benchmarks-2.49 → iqm_benchmarks-2.51}/docs/examples/examples.rst +0 -0
  45. {iqm_benchmarks-2.49 → iqm_benchmarks-2.51}/docs/index.rst +0 -0
  46. {iqm_benchmarks-2.49 → iqm_benchmarks-2.51}/docs/license.rst +0 -0
  47. {iqm_benchmarks-2.49 → iqm_benchmarks-2.51}/docs/readme.md +0 -0
  48. {iqm_benchmarks-2.49 → iqm_benchmarks-2.51}/format +0 -0
  49. {iqm_benchmarks-2.49 → iqm_benchmarks-2.51}/scheduled_experiments/adonis/__init__.py +0 -0
  50. {iqm_benchmarks-2.49 → iqm_benchmarks-2.51}/scheduled_experiments/adonis/weekly.py +0 -0
  51. {iqm_benchmarks-2.49 → iqm_benchmarks-2.51}/setup.cfg +0 -0
  52. {iqm_benchmarks-2.49 → iqm_benchmarks-2.51}/src/iqm/benchmarks/__init__.py +0 -0
  53. {iqm_benchmarks-2.49 → iqm_benchmarks-2.51}/src/iqm/benchmarks/benchmark.py +0 -0
  54. {iqm_benchmarks-2.49 → iqm_benchmarks-2.51}/src/iqm/benchmarks/benchmark_definition.py +0 -0
  55. {iqm_benchmarks-2.49 → iqm_benchmarks-2.51}/src/iqm/benchmarks/circuit_containers.py +0 -0
  56. {iqm_benchmarks-2.49 → iqm_benchmarks-2.51}/src/iqm/benchmarks/coherence/__init__.py +0 -0
  57. {iqm_benchmarks-2.49 → iqm_benchmarks-2.51}/src/iqm/benchmarks/coherence/coherence.py +0 -0
  58. {iqm_benchmarks-2.49 → iqm_benchmarks-2.51}/src/iqm/benchmarks/compressive_gst/__init__.py +0 -0
  59. {iqm_benchmarks-2.49 → iqm_benchmarks-2.51}/src/iqm/benchmarks/compressive_gst/compressive_gst.py +0 -0
  60. {iqm_benchmarks-2.49 → iqm_benchmarks-2.51}/src/iqm/benchmarks/compressive_gst/gst_analysis.py +0 -0
  61. {iqm_benchmarks-2.49 → iqm_benchmarks-2.51}/src/iqm/benchmarks/entanglement/__init__.py +0 -0
  62. {iqm_benchmarks-2.49 → iqm_benchmarks-2.51}/src/iqm/benchmarks/entanglement/ghz.py +0 -0
  63. {iqm_benchmarks-2.49 → iqm_benchmarks-2.51}/src/iqm/benchmarks/entanglement/graph_states.py +0 -0
  64. {iqm_benchmarks-2.49 → iqm_benchmarks-2.51}/src/iqm/benchmarks/logging_config.py +0 -0
  65. {iqm_benchmarks-2.49 → iqm_benchmarks-2.51}/src/iqm/benchmarks/optimization/__init__.py +0 -0
  66. {iqm_benchmarks-2.49 → iqm_benchmarks-2.51}/src/iqm/benchmarks/quantum_volume/__init__.py +0 -0
  67. {iqm_benchmarks-2.49 → iqm_benchmarks-2.51}/src/iqm/benchmarks/quantum_volume/clops.py +0 -0
  68. {iqm_benchmarks-2.49 → iqm_benchmarks-2.51}/src/iqm/benchmarks/quantum_volume/quantum_volume.py +0 -0
  69. {iqm_benchmarks-2.49 → iqm_benchmarks-2.51}/src/iqm/benchmarks/randomized_benchmarking/__init__.py +0 -0
  70. {iqm_benchmarks-2.49 → iqm_benchmarks-2.51}/src/iqm/benchmarks/randomized_benchmarking/clifford_1q.pkl +0 -0
  71. {iqm_benchmarks-2.49 → iqm_benchmarks-2.51}/src/iqm/benchmarks/randomized_benchmarking/clifford_2q.pkl +0 -0
  72. {iqm_benchmarks-2.49 → iqm_benchmarks-2.51}/src/iqm/benchmarks/randomized_benchmarking/clifford_rb/__init__.py +0 -0
  73. {iqm_benchmarks-2.49 → iqm_benchmarks-2.51}/src/iqm/benchmarks/randomized_benchmarking/clifford_rb/clifford_rb.py +0 -0
  74. {iqm_benchmarks-2.49 → iqm_benchmarks-2.51}/src/iqm/benchmarks/randomized_benchmarking/direct_rb/__init__.py +0 -0
  75. {iqm_benchmarks-2.49 → iqm_benchmarks-2.51}/src/iqm/benchmarks/randomized_benchmarking/direct_rb/direct_rb.py +0 -0
  76. {iqm_benchmarks-2.49 → iqm_benchmarks-2.51}/src/iqm/benchmarks/randomized_benchmarking/eplg/__init__.py +0 -0
  77. {iqm_benchmarks-2.49 → iqm_benchmarks-2.51}/src/iqm/benchmarks/randomized_benchmarking/eplg/eplg.py +0 -0
  78. {iqm_benchmarks-2.49 → iqm_benchmarks-2.51}/src/iqm/benchmarks/randomized_benchmarking/interleaved_rb/__init__.py +0 -0
  79. {iqm_benchmarks-2.49 → iqm_benchmarks-2.51}/src/iqm/benchmarks/randomized_benchmarking/interleaved_rb/interleaved_rb.py +0 -0
  80. {iqm_benchmarks-2.49 → iqm_benchmarks-2.51}/src/iqm/benchmarks/randomized_benchmarking/mirror_rb/__init__.py +0 -0
  81. {iqm_benchmarks-2.49 → iqm_benchmarks-2.51}/src/iqm/benchmarks/randomized_benchmarking/mirror_rb/mirror_rb.py +0 -0
  82. {iqm_benchmarks-2.49 → iqm_benchmarks-2.51}/src/iqm/benchmarks/randomized_benchmarking/multi_lmfit.py +0 -0
  83. {iqm_benchmarks-2.49 → iqm_benchmarks-2.51}/src/iqm/benchmarks/randomized_benchmarking/randomized_benchmarking_common.py +0 -0
  84. {iqm_benchmarks-2.49 → iqm_benchmarks-2.51}/src/iqm/benchmarks/readout_mitigation.py +0 -0
  85. {iqm_benchmarks-2.49 → iqm_benchmarks-2.51}/src/iqm/benchmarks/utils.py +0 -0
  86. {iqm_benchmarks-2.49 → iqm_benchmarks-2.51}/src/iqm/benchmarks/utils_plots.py +0 -0
  87. {iqm_benchmarks-2.49 → iqm_benchmarks-2.51}/src/iqm/benchmarks/utils_shadows.py +0 -0
  88. {iqm_benchmarks-2.49 → iqm_benchmarks-2.51}/src/iqm_benchmarks.egg-info/SOURCES.txt +0 -0
  89. {iqm_benchmarks-2.49 → iqm_benchmarks-2.51}/src/iqm_benchmarks.egg-info/dependency_links.txt +0 -0
  90. {iqm_benchmarks-2.49 → iqm_benchmarks-2.51}/src/iqm_benchmarks.egg-info/top_level.txt +0 -0
  91. {iqm_benchmarks-2.49 → iqm_benchmarks-2.51}/src/mGST/LICENSE +0 -0
  92. {iqm_benchmarks-2.49 → iqm_benchmarks-2.51}/src/mGST/README.md +0 -0
  93. {iqm_benchmarks-2.49 → iqm_benchmarks-2.51}/src/mGST/additional_fns.py +0 -0
  94. {iqm_benchmarks-2.49 → iqm_benchmarks-2.51}/src/mGST/algorithm.py +0 -0
  95. {iqm_benchmarks-2.49 → iqm_benchmarks-2.51}/src/mGST/compatibility.py +0 -0
  96. {iqm_benchmarks-2.49 → iqm_benchmarks-2.51}/src/mGST/low_level_jit.py +0 -0
  97. {iqm_benchmarks-2.49 → iqm_benchmarks-2.51}/src/mGST/optimization.py +0 -0
  98. {iqm_benchmarks-2.49 → iqm_benchmarks-2.51}/src/mGST/qiskit_interface.py +0 -0
  99. {iqm_benchmarks-2.49 → iqm_benchmarks-2.51}/src/mGST/reporting/figure_gen.py +0 -0
  100. {iqm_benchmarks-2.49 → iqm_benchmarks-2.51}/src/mGST/reporting/reporting.py +0 -0
  101. {iqm_benchmarks-2.49 → iqm_benchmarks-2.51}/tag-from-pipeline.sh +0 -0
  102. {iqm_benchmarks-2.49 → iqm_benchmarks-2.51}/test +0 -0
  103. {iqm_benchmarks-2.49 → iqm_benchmarks-2.51}/tests/test_coherence.py +0 -0
  104. {iqm_benchmarks-2.49 → iqm_benchmarks-2.51}/tests/test_ghz.py +0 -0
  105. {iqm_benchmarks-2.49 → iqm_benchmarks-2.51}/tests/test_graph_states.py +0 -0
  106. {iqm_benchmarks-2.49 → iqm_benchmarks-2.51}/tests/test_gst.py +0 -0
  107. {iqm_benchmarks-2.49 → iqm_benchmarks-2.51}/tests/test_qv.py +0 -0
  108. {iqm_benchmarks-2.49 → iqm_benchmarks-2.51}/tests/test_rb.py +0 -0
  109. {iqm_benchmarks-2.49 → iqm_benchmarks-2.51}/tests/unit/test_backend_transpilation.py +0 -0
  110. {iqm_benchmarks-2.49 → iqm_benchmarks-2.51}/tests/unit/test_benchmark_circuit.py +0 -0
  111. {iqm_benchmarks-2.49 → iqm_benchmarks-2.51}/tests/unit/test_submit_execute.py +0 -0
  112. {iqm_benchmarks-2.49 → iqm_benchmarks-2.51}/update-requirements.py +0 -0
@@ -2,6 +2,14 @@
2
2
  Changelog
3
3
  =========
4
4
 
5
+ Version 2.51
6
+ ============
7
+ * Circuit transpilation improvements for Q-score implemented.
8
+
9
+ Version 2.50
10
+ ============
11
+ * Update iqm-client and iqm-station-control-client dependency versions as part of IQM OS 4.3 release.
12
+
5
13
  Version 2.49
6
14
  ============
7
15
  * Added logging of execution time to all benchmarks.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: iqm-benchmarks
3
- Version: 2.49
3
+ Version: 2.51
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
@@ -19,8 +19,8 @@ Requires-Dist: networkx<4.0,>=3.3
19
19
  Requires-Dist: rustworkx>=0.16.0
20
20
  Requires-Dist: numpy<2.0,>=1.25.2
21
21
  Requires-Dist: qiskit<=1.4.2,>=1.2.4
22
- Requires-Dist: iqm-client[qiskit]<31.0,>=30.1.0
23
- Requires-Dist: iqm-station-control-client>=9.3.0
22
+ Requires-Dist: iqm-client[qiskit]<33.0,>=32.1.1
23
+ Requires-Dist: iqm-station-control-client<12.0,>=11.3.1
24
24
  Requires-Dist: requests<3.0,>=2.32.3
25
25
  Requires-Dist: scikit-optimize<0.11.0,>=0.10.2
26
26
  Requires-Dist: tabulate<1.0.0,>=0.9.0
@@ -44,8 +44,8 @@ dependencies = [
44
44
  "rustworkx>=0.16.0",
45
45
  "numpy >= 1.25.2, < 2.0",
46
46
  "qiskit >= 1.2.4, <= 1.4.2",
47
- "iqm-client[qiskit] >=30.1.0, <31.0",
48
- "iqm-station-control-client >= 9.3.0",
47
+ "iqm-client[qiskit] >=32.1.1, <33.0",
48
+ "iqm-station-control-client >= 11.3.1, <12.0",
49
49
  "requests>=2.32.3, < 3.0",
50
50
  "scikit-optimize >= 0.10.2, < 0.11.0",
51
51
  "tabulate >= 0.9.0, <1.0.0",
@@ -824,18 +824,21 @@ ipykernel==6.29.5 \
824
824
  ipython==8.31.0 \
825
825
  --hash=sha256:46ec58f8d3d076a61d128fe517a51eb730e3aaf0c184ea8c17d16e366660c6a6 \
826
826
  --hash=sha256:b6a2274606bec6166405ff05e54932ed6e5cfecaca1fc05f2cacde7bb074d70b
827
- iqm-client==30.2.0 \
828
- --hash=sha256:1bad4c4284fff640b4476e60a87bbf50ed34a41f23da129c4e207ecdf13148ed \
829
- --hash=sha256:2b34186ee140accace743bbc489ce0a1b65de836328ab9492e735b45e5389759
830
- iqm-data-definitions==2.13 \
831
- --hash=sha256:0de52e2a1ffdc63375b13825b28170d0868b12cda011e782b9348bb143083a0e \
832
- --hash=sha256:be6a71ab2e5b04c6e6c4d53094c89c088cc4b6e8e293f412f9fa937cf8dc980c
833
- iqm-exa-common==26.24.0 \
834
- --hash=sha256:92e880913589015b78baf8e0267f82cadc8a52cb090c8e7b5226d1d9a8ddbd26 \
835
- --hash=sha256:fc3edd89b501961b3ad034f4c37983bb879735626df4f342ea0edcab3bce8182
836
- iqm-station-control-client==9.18.0 \
837
- --hash=sha256:280aa5d150f034753428cfbcae6be57ecf44cded2af2c05b180b52b18a8b4693 \
838
- --hash=sha256:6425fbd787a3f28eac3529c7212cb795c1db3939edfb8473019f132021b9b11d
827
+ iqm-client==32.1.1 \
828
+ --hash=sha256:556f8bd5c19fa030c7f1795dcc5a15c93983baf5997a715785a332002846719d \
829
+ --hash=sha256:e0b52425822b05df4517b9194c3c1195c964627ab3c0e1ee90793e4ea1c40ce6
830
+ iqm-data-definitions==2.19 \
831
+ --hash=sha256:021699403ada0a326b69f705ea9f326d4caa69ca0e8ed84e186d9b3fd62f3edf \
832
+ --hash=sha256:248022127322a9c786143f8226716061b90231895274add8e6a5adc1f85d2409
833
+ iqm-exa-common==27.3.1 \
834
+ --hash=sha256:0bf0f3a47111b5feaa98694ea6b576ed56e3d7a29ee0b4987fb2068992205ae4 \
835
+ --hash=sha256:2cc552e318a0161e8151c50ba896c452c295bb60860dc6032044931226057cb2
836
+ iqm-pulse==12.6.1 \
837
+ --hash=sha256:1b909c6fff268df100e120c3d889acfaabd40d7b8e7444211a9beb984822db78 \
838
+ --hash=sha256:c61f7b58354682092cd985182c409c9fd7fa58cc4a39cfa0f871698b1502bf83
839
+ iqm-station-control-client==11.3.1 \
840
+ --hash=sha256:56b409da8f5107ae6a2687d33746400650b53965a21f3bd905ca06aa3bf97d39 \
841
+ --hash=sha256:69640fd95585b749ba1223b0fce817bec9474f0e05aef6fc90a3cec225565d1e
839
842
  isoduration==20.11.0 \
840
843
  --hash=sha256:ac2f9015137935279eac671f94f89eb00584f940f5dc49462a0c4ee692ba1bd9 \
841
844
  --hash=sha256:b2904c2a4228c3d44f409c8ae8e2370eb21a26f7ac2ec5446df141dde3452042
@@ -845,9 +848,9 @@ isort==5.13.2 \
845
848
  jedi==0.19.2 \
846
849
  --hash=sha256:4770dc3de41bde3966b02eb84fbcf557fb33cce26ad23da12c742fb50ecb11f0 \
847
850
  --hash=sha256:a8ef22bde8490f57fe5c7681a3c83cb58874daf72b4784de3cce5b6ef6edb5b9
848
- jinja2==3.1.5 \
849
- --hash=sha256:8fefff8dc3034e27bb80d67c671eb8a9bc424c0ef4c0826edbff304cceff43bb \
850
- --hash=sha256:aba0f4dc9ed8013c424088f68a5c226f7d6097ed89b246d7749c2ec4175c6adb
851
+ jinja2==3.0.3 \
852
+ --hash=sha256:077ce6014f7b40d03b47d1f1ca4b0fc8328a692bd284016f806ed0eaca390ad8 \
853
+ --hash=sha256:611bb273cd68f3b993fabdc4064fc858c5b47a973cb5aa7999ec1ba405c87cd7
851
854
  joblib==1.4.2 \
852
855
  --hash=sha256:06d478d5674cbc267e7496a410ee875abd68e4340feff4490bcb7afb88060ae6 \
853
856
  --hash=sha256:2382c5816b2636fbd20a09e0f4e9dad4736765fdfb7dca582943b9c1366b3f0e
@@ -1290,6 +1293,9 @@ numpy==1.26.4 \
1290
1293
  --hash=sha256:edd8b5fe47dab091176d21bb6de568acdd906d1887a4584a15a9a96a1dca06ef \
1291
1294
  --hash=sha256:f870204a840a60da0b12273ef34f7051e98c3b5961b61b0c2c1be6dfd64fbcd3 \
1292
1295
  --hash=sha256:ffa75af20b44f8dba823498024771d5ac50620e6915abac414251bd971b4529f
1296
+ numpy-typing-compat==20250818.1.25 \
1297
+ --hash=sha256:4f91427369583074b236c804dd27559134f08ec4243485034c8e7d258cbd9cd3 \
1298
+ --hash=sha256:8ff461725af0b436e9b0445d07712f1e6e3a97540a3542810f65f936dcc587a5
1293
1299
  opentelemetry-api==1.25.0 \
1294
1300
  --hash=sha256:757fa1aa020a0f8fa139f8959e53dec2051cc26b832e76fa839a6d76ecefd737 \
1295
1301
  --hash=sha256:77c4985f62f2614e42ce77ee4c9da5fa5f0bc1e1821085e9a47533a9323ae869
@@ -1314,6 +1320,9 @@ opentelemetry-sdk==1.25.0 \
1314
1320
  opentelemetry-semantic-conventions==0.46b0 \
1315
1321
  --hash=sha256:6daef4ef9fa51d51855d9f8e0ccd3a1bd59e0e545abe99ac6203804e36ab3e07 \
1316
1322
  --hash=sha256:fbc982ecbb6a6e90869b15c1673be90bd18c8a56ff1cffc0864e38e2edffaefa
1323
+ optype==0.14.0 \
1324
+ --hash=sha256:50d02edafd04edf2e5e27d6249760a51b2198adb9f6ffd778030b3d2806b026b \
1325
+ --hash=sha256:925cf060b7d1337647f880401f6094321e7d8e837533b8e159b9a92afa3157c6
1317
1326
  orjson==3.10.14 \
1318
1327
  --hash=sha256:0293a88815e9bb5c90af4045f81ed364d982f955d12052d989d844d6c4e50945 \
1319
1328
  --hash=sha256:03f61ca3674555adcb1aa717b9fc87ae936aa7a63f6aba90a474a88701278780 \
@@ -1838,6 +1847,80 @@ python-dotenv==0.21.1 \
1838
1847
  python-json-logger==3.2.1 \
1839
1848
  --hash=sha256:8eb0554ea17cb75b05d2848bc14fb02fbdbd9d6972120781b974380bfa162008 \
1840
1849
  --hash=sha256:cdc17047eb5374bd311e748b42f99d71223f3b0e186f4206cc5d52aefe85b090
1850
+ python-rapidjson==1.20 \
1851
+ --hash=sha256:00183c4938cd491b98b1a43626bc5a381842ceba87644cb91b25555f3fc3c0bf \
1852
+ --hash=sha256:026077b663acf93a3f2b1adb87282e611a30214b8ae8001b7e4863a3b978e646 \
1853
+ --hash=sha256:05e28c3dbb4a0d74ec13af9668ef2b9f302edf83cf7ce1d8316a95364720eec0 \
1854
+ --hash=sha256:06ee7bcf660ebbdf1953aa7bf74214b722d934928c7b9f2a23b12e0713b61fa4 \
1855
+ --hash=sha256:083df379c769b30f9bc40041c91fd9d8f7bb8ca2b3c7170258842aced2098e05 \
1856
+ --hash=sha256:0c3f7085c52259c56af72462df7620c3b8bb95575fd9b8c3a073728855e93269 \
1857
+ --hash=sha256:115f08c86d2df7543c02605e77c84727cdabc4b08310d2f097e953efeaaa73eb \
1858
+ --hash=sha256:1446e902b6c781f271bf8556da636c1375cbb208e25f92e1af4cc2d92cf0cf15 \
1859
+ --hash=sha256:1c0303bd445312a78485a9adba06dfdb84561c5157a9cda7999fefb36df4c6cc \
1860
+ --hash=sha256:1fc3bba6632ecffeb1897fdf98858dc50a677237f4241853444c70a041158a90 \
1861
+ --hash=sha256:225bd4cbabfe7910261cbcebb8b811d4ff98e90cdd17c233b916c6aa71a9553f \
1862
+ --hash=sha256:303b079ef268a996242be51ae80c8b563ee2d73489ab4f16199fef2216e80765 \
1863
+ --hash=sha256:328095d6d558090c29d24d889482b10dcc3ade3b77c93a61ea86794623046628 \
1864
+ --hash=sha256:368ecdf4031abbde9c94aac40981d9a1238e6bcfef9fbfee441047b4757d6033 \
1865
+ --hash=sha256:3a6620eed0b04196f37fab7048c1d672d03391bb29d7f09ee8fee8dea33f11f4 \
1866
+ --hash=sha256:3e963e78fff6ab5ab2ae847b65683774c48b9b192307380f2175540d6423fd73 \
1867
+ --hash=sha256:403e4986484f01f79fdce00b48c12a1b39d16e822cd37c60843ab26455ab0680 \
1868
+ --hash=sha256:4099cb9eae8a0ce19c09e02729eb6d69d5180424f13a2641a6c407d053e47a82 \
1869
+ --hash=sha256:425c2bb8e778a04497953482c251944b2736f61012d897f17b73da3eca060c27 \
1870
+ --hash=sha256:4355bcfc8629d15f6246011b40e84cc368d842518a91adb15c5eba211305ee5b \
1871
+ --hash=sha256:488d0c6155004b5177225eaf331bb1838616da05ae966dd24a7d442751c1d193 \
1872
+ --hash=sha256:4c680cd2b4de760ff6875de71fe6a87bd610aa116593d62e4f81a563be86ae18 \
1873
+ --hash=sha256:4f7cbbff9696ea01dd8a29502cb314471c9a5d4239f2f3b7e35b6adbde2cc620 \
1874
+ --hash=sha256:599ab208ccf6172d6cfac1abe048c837e62612f91f97d198e32773c45346a0b4 \
1875
+ --hash=sha256:5adcef7a27abafbb2b3d0b02c822dfd9b4b329769cb97810b7f9733e1fda0498 \
1876
+ --hash=sha256:5d3be149ce5475f9605f01240487541057792abad94d3fd0cd56af363cf5a4dc \
1877
+ --hash=sha256:5f55531c8197cb7a21a5ef0ffa46f2b8fc8c5fe7c6fd08bdbd2063ae65d2ff65 \
1878
+ --hash=sha256:6056fcc8caeb9b04775bf655568bba362c7670ab792c1b438671bb056db954cd \
1879
+ --hash=sha256:632acb2dfa29883723e24bb2ce47c726edd5f672341553a5184db68f78d3bd09 \
1880
+ --hash=sha256:6355cb690bf64629767206524d4d00da909970d46d8fc0b367f339975e4eb419 \
1881
+ --hash=sha256:69e702fe74fe8c44c6253bb91364a270dc49f704920c90e01040155bd600a5fd \
1882
+ --hash=sha256:6c9f813a37d1f708a221f1f7d8c97c437d10597261810c1d3b52cf8f248d66c0 \
1883
+ --hash=sha256:6cb3ad353ec083a6dcf0552f1fce3c490f92e2fccf9a81eac42835297a8431a1 \
1884
+ --hash=sha256:7444bc7e6a04c03d6ed748b5dab0798fa2b3f2b303be8c38d3af405b2cac6d63 \
1885
+ --hash=sha256:7d36aab758bfb1b59e0a849cd20e971eda951a04d3586bb5f6cb460bfc7c103d \
1886
+ --hash=sha256:7dd9c5e661d17eafa44b2875f6ce55178cc87388575ce3cd3c606d5a33772b49 \
1887
+ --hash=sha256:7f7b6574887d8828f34eb3384092d6e6c290e8fbb12703c409dbdde814612657 \
1888
+ --hash=sha256:83a48f96d0abb8349a4d42f029259b755d8c6fd347f5de2d640e164c3f45e63b \
1889
+ --hash=sha256:871f2eeb0907f3d7ab09efe04c5b5e2886c275ea568f7867c97468ae14cdd52f \
1890
+ --hash=sha256:87aa0b01b8c20984844f1440b8ff6bdb32de911a1750fed344b9daed33b4b52b \
1891
+ --hash=sha256:884e1dd4c0770ed424737941af4d5dc9014995f9c33595f151af13f83ce282c3 \
1892
+ --hash=sha256:8fc52405435ce875aa000afa2637ea267eb0d4ab9622f9b97c92d92cb1a9c440 \
1893
+ --hash=sha256:924f9ea302494d4a4d540d3509f8f1f15622ea7d614c6f29df3188d52c6cb546 \
1894
+ --hash=sha256:9831430f17101a6a249e07db9c42d26c3263e6009450722cce0c14726421f434 \
1895
+ --hash=sha256:9df543521fa4b69589c42772b2f32a6c334b3b5fc612cd6dc3705136d0788da3 \
1896
+ --hash=sha256:9e431a7afc77aa874fed537c9f6bf5fcecaef124ebeae2a2379d3b9e9adce74b \
1897
+ --hash=sha256:a2b624b3613fb7b8dfef4adc709bf39489be8c655cd9d24dc4e2cc16fc5def83 \
1898
+ --hash=sha256:a5fb413414b92763a54d53b732df3c9de1b114012c8881a3d1215a19b9fca494 \
1899
+ --hash=sha256:b0d07d4f0ebbb2228d5140463f11ac519147b9d791f7e40b3edf518a806be3cc \
1900
+ --hash=sha256:b733978ecd84fc5df9a778ce821dc1f3113f7bfc2493cac0bb17efb4ae0bb8fa \
1901
+ --hash=sha256:b7c0408e7f52f32cf4bdd5aa305f005914b0143cac69d42575e2d40e8678cd72 \
1902
+ --hash=sha256:b9399ad75a2e3377f9e6208caabe73eb9354cd01b732407475ccadcd42c577df \
1903
+ --hash=sha256:b9496b1e9d6247e8802ac559b7eebb5f3cae426d1c1dbde4049c63dff0941370 \
1904
+ --hash=sha256:bc79d7f00f7538e027960ca6bcd1e03ed99fcf660d4d882d1c22f641155d0db0 \
1905
+ --hash=sha256:bd978c7669cc844f669a48d2a6019fb9134a2385536f806fe265a1e374c3573a \
1906
+ --hash=sha256:bef1eca712fb9fd5d2edd724dd1dd8a608215d6afcaee4f351b3e99e3f73f720 \
1907
+ --hash=sha256:bf3c0e2a5b97b0d07311f15f0dce4434e43dec865c3794ad1b10d968460fd665 \
1908
+ --hash=sha256:c05c8602c019cc0db19601fdc4927755a9d33f21d01beb3d5767313d7a81360d \
1909
+ --hash=sha256:c2f85da53286e67778d4061ef32ff44ca9b5f945030463716e046ee8985319f8 \
1910
+ --hash=sha256:c60121d155562dc694c05ed7df4e39e42ee1d3adff2a060c64a004498e6451f7 \
1911
+ --hash=sha256:ce4cee141c924300cbedba1e5bea05b13484598d1e550afc5b50209ba73c62f2 \
1912
+ --hash=sha256:d87041448cec00e2db5d858625a76dc1b59eef6691a039acff6d92ad8581cfc1 \
1913
+ --hash=sha256:daee815b4c20ca6e4dbc6bde373dd3f65b53813d775f1c94b765b33b402513a7 \
1914
+ --hash=sha256:ddb63eff401ce7cf20cdd5e21942fc23fbe0e1dc1d96d7ae838645fb1f74fb47 \
1915
+ --hash=sha256:e3f89a58d7709d5879586e9dbfd11be76a799e8fbdbb5eddaffaeba9b572fba3 \
1916
+ --hash=sha256:e5774c905034362298312116f9b58c181e91a09800e4e5cede7b3d460a6a9fde \
1917
+ --hash=sha256:e8064b8edb57ddd9e3ffa539cf2ec2f03515751fb0698b40ba5cb66a2123af19 \
1918
+ --hash=sha256:ec17a18df700e1f956fc5a0c41cbb3cc746c44c0fef38988efba9b2cb607ecfa \
1919
+ --hash=sha256:eeaa8487fdd8db409bd2e0c41c59cee3b9f1d08401fc75520f7d35c7a22d8789 \
1920
+ --hash=sha256:f510ffe32fec319699f0c1ea9cee5bde47c33202b034b85c5d1b9ace682aa96a \
1921
+ --hash=sha256:f974c4e11be833221062fc4c3129bed172082792b33ef9fc1b8104f49c514f1d \
1922
+ --hash=sha256:fbff5caf127c5bed4d6620f95a039dd9e293784d844af50782aaf278a743acb4 \
1923
+ --hash=sha256:fc7a095f77eb3bb6acff94acf868a100faaf06028c4b513428f161cd55030476
1841
1924
  pytz==2024.2 \
1842
1925
  --hash=sha256:2aa355083c50a0f93fa581709deac0c9ad65cca8a9e9beac660adcbd493c798a \
1843
1926
  --hash=sha256:31c7c1817eb7fae7ca4b8c7ee50c72f93aa2dd863de768e1ef4245d426aa0725
@@ -2382,6 +2465,9 @@ scipy==1.15.1 \
2382
2465
  --hash=sha256:ce3a000cd28b4430426db2ca44d96636f701ed12e2b3ca1f2b1dd7abdd84b39a \
2383
2466
  --hash=sha256:f735bc41bd1c792c96bc426dece66c8723283695f02df61dcc4d0a707a42fc54 \
2384
2467
  --hash=sha256:f82fcf4e5b377f819542fbc8541f7b5fbcf1c0017d0df0bc22c781bf60abc4d8
2468
+ scipy-stubs==1.16.3.0 \
2469
+ --hash=sha256:90e5d82ced2183ef3c5c0a28a77df8cc227458624364fa0ff975ad24fa89d6ad \
2470
+ --hash=sha256:d6943c085e47a1ed431309f9ca582b6a206a9db808a036132a0bf01ebc34b506
2385
2471
  scs==3.2.7.post2 \
2386
2472
  --hash=sha256:0427a5bf9aa43eb2a22083e1a43412db5054a88d695fdaa6018cd6fb3a9f0203 \
2387
2473
  --hash=sha256:05da761821a14b8ebe54427510cbe10722b3433db4e953acd7a067893e955781 \
@@ -2429,9 +2515,9 @@ send2trash==1.8.3 \
2429
2515
  setuptools==75.8.0 \
2430
2516
  --hash=sha256:c5afc8f407c626b8313a86e10311dd3f661c6cd9c09d4bf8c15c0e11f9f2b0e6 \
2431
2517
  --hash=sha256:e3982f444617239225d675215d51f6ba05f845d4eec313da4418fdbb56fb27e3
2432
- six==1.17.0 \
2433
- --hash=sha256:4721f391ed90541fddacab5acf947aa0d3dc7d27b2e1e8eda2be8970586c3274 \
2434
- --hash=sha256:ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81
2518
+ six==1.16.0 \
2519
+ --hash=sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926 \
2520
+ --hash=sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254
2435
2521
  sniffio==1.3.1 \
2436
2522
  --hash=sha256:2f6da418d1f1e0fddd844478f41680e794e6051915791a034ff65e5f100525a2 \
2437
2523
  --hash=sha256:f4324edc670a0f49750a81b895f35c3adb843cca46f0530f79fc1babb23789dc
@@ -2653,6 +2739,9 @@ types-python-dateutil==2.9.0.20241206 \
2653
2739
  types-requests==2.32.4.20250913 \
2654
2740
  --hash=sha256:78c9c1fffebbe0fa487a418e0fa5252017e9c60d1a2da394077f1780f655d7e1 \
2655
2741
  --hash=sha256:abd6d4f9ce3a9383f269775a9835a4c24e5cd6b9f647d64f88aa4613c33def5d
2742
+ types-six==1.17.0.20251009 \
2743
+ --hash=sha256:2494f4c2a58ada0edfe01ea84b58468732e43394c572d9cf5b1dd06d86c487a3 \
2744
+ --hash=sha256:efe03064ecd0ffb0f7afe133990a2398d8493d8d1c1cc10ff3dfe476d57ba44f
2656
2745
  types-tqdm==4.67.0.20250516 \
2657
2746
  --hash=sha256:1dd9b2c65273f2342f37e5179bc6982df86b6669b3376efc12aef0a29e35d36d \
2658
2747
  --hash=sha256:230ccab8a332d34f193fc007eb132a6ef54b4512452e718bf21ae0a7caeb5a6b
@@ -1,5 +1,6 @@
1
+ # pylint: disable=too-many-lines
1
2
  """
2
- Qscore benchmark
3
+ This module contains functions and classes for the Qscore benchmarking process.
3
4
  """
4
5
 
5
6
  import itertools
@@ -12,7 +13,8 @@ import matplotlib.pyplot as plt
12
13
  from networkx import Graph
13
14
  import networkx as nx
14
15
  import numpy as np
15
- from qiskit import QuantumCircuit
16
+ from qiskit import ClassicalRegister, QuantumCircuit, QuantumRegister
17
+ from qiskit.circuit.library import RZZGate
16
18
  from scipy.optimize import basinhopping, minimize
17
19
  import xarray as xr
18
20
 
@@ -34,6 +36,8 @@ from iqm.benchmarks.utils import ( # execute_with_dd,
34
36
  submit_execute,
35
37
  xrvariable_to_counts,
36
38
  )
39
+ from iqm.iqm_client.transpile import ExistingMoveHandlingOptions
40
+ from iqm.qiskit_iqm import IQMCircuit, transpile_to_IQM
37
41
  from iqm.qiskit_iqm.iqm_backend import IQMBackendBase
38
42
 
39
43
 
@@ -195,7 +199,7 @@ def get_optimal_angles(num_layers: int) -> List[float]:
195
199
  # "The fixed angle conjecture for QAOA on regular MaxCut graphs."
196
200
  # arXiv preprint arXiv:2107.00677 (2021).
197
201
 
198
- OPTIMAL_INITIAL_ANGLES = {
202
+ OPTIMAL_INITIAL_ANGLES = { # pylint: disable=undefined-variable
199
203
  "1": [-0.616, 0.393 / 2],
200
204
  "2": [-0.488, 0.898 / 2, 0.555 / 2, 0.293 / 2],
201
205
  "3": [-0.422, 0.798 / 2, 0.937 / 2, 0.609 / 2, 0.459 / 2, 0.235 / 2],
@@ -323,6 +327,76 @@ def get_optimal_angles(num_layers: int) -> List[float]:
323
327
  return OPTIMAL_INITIAL_ANGLES[str(num_layers)]
324
328
 
325
329
 
330
+ def group_rzz_gates(circuit: QuantumCircuit):
331
+ """
332
+ Extract and group commuting RZZ gates so that gates sharing a qubit
333
+ are placed next to each other.
334
+
335
+ Args:
336
+ circuit: QuantumCircuit containing RZZ gates.
337
+
338
+ Returns:
339
+ grouped_rzz: list of tuples (instr, [q0_idx, q1_idx])
340
+ in reordered grouping.
341
+ """
342
+ # Collect RZZ gates as (gate_pos, instr, [q0, q1])
343
+ rzz_entries = []
344
+ for pos, (instr, qargs, _) in enumerate(circuit.data):
345
+ if isinstance(instr, RZZGate) or getattr(instr, "name", "") == "rzz":
346
+ qidxs = [circuit.find_bit(q).index for q in qargs]
347
+ rzz_entries.append((pos, instr, qidxs))
348
+
349
+ if not rzz_entries:
350
+ return []
351
+
352
+ # Build bipartite graph: gate nodes <-> qubit nodes
353
+ B = nx.Graph()
354
+ for gate_pos, instr, qidxs in rzz_entries:
355
+ gnode = f"g{gate_pos}"
356
+ B.add_node(gnode, kind="gate", instr=instr, qidxs=qidxs)
357
+ for q in qidxs:
358
+ qnode = f"q{q}"
359
+ B.add_node(qnode, kind="qubit", qidx=q)
360
+ B.add_edge(gnode, qnode)
361
+
362
+ grouped_rzz = []
363
+
364
+ # Repeatedly pick the hub qubit with the most RZZs
365
+ while True:
366
+ qubit_nodes = [n for n, d in B.nodes(data=True) if d["kind"] == "qubit"]
367
+ if not qubit_nodes:
368
+ break
369
+
370
+ # Pick hub: max degree, tie-break by smallest index
371
+ hub = max(qubit_nodes, key=lambda q: (B.degree(q), -int(q[1:])))
372
+ hub_idx = int(hub[1:])
373
+
374
+ # Gates connected to hub
375
+ connected_gates = [nbr for nbr in B.neighbors(hub) if nbr.startswith("g")]
376
+ if not connected_gates:
377
+ B.remove_node(hub)
378
+ continue
379
+
380
+ # Sort gates: prioritize partner qubits with higher degree
381
+ def sort_key(g):
382
+ qidxs = B.nodes[g]["qidxs"]
383
+ other = [q for q in qidxs if q != hub_idx][0]
384
+ return (-B.degree(f"q{other}"), other)
385
+
386
+ connected_gates.sort(key=sort_key)
387
+
388
+ # Append in chosen order
389
+ for g in connected_gates:
390
+ data = B.nodes[g]
391
+ grouped_rzz.append((data["qidxs"]))
392
+ B.remove_node(g)
393
+
394
+ # Remove hub itself
395
+ B.remove_node(hub)
396
+
397
+ return grouped_rzz
398
+
399
+
326
400
  def plot_approximation_ratios(
327
401
  nodes: list[int],
328
402
  beta_ratio: list[float],
@@ -369,7 +443,7 @@ def plot_approximation_ratios(
369
443
  ax.set_ylabel(r"Q-score ratio $\beta(n)$")
370
444
  ax.set_xlabel("Number of nodes $(n)$")
371
445
  plt.xticks(range(min(nodes), max(nodes) + 1))
372
- plt.legend(loc="lower right")
446
+ plt.legend(loc="upper right")
373
447
  plt.grid(True)
374
448
 
375
449
  if use_virtual_node and use_classically_optimized_angles:
@@ -600,6 +674,7 @@ class QScoreBenchmark(Benchmark):
600
674
  self.session_timestamp = strftime("%Y%m%d-%H%M%S")
601
675
  self.execution_timestamp = ""
602
676
  self.seed = configuration.seed
677
+ self.num_trials = configuration.num_trials
603
678
 
604
679
  self.graph_physical: Graph
605
680
  self.virtual_nodes: List[Tuple[int, int]]
@@ -622,10 +697,107 @@ class QScoreBenchmark(Benchmark):
622
697
  list(x) for x in cast(Sequence[Sequence[int]], configuration.custom_qubits_array)
623
698
  ]
624
699
 
700
+ def greedy_vertex_cover_with_mapping(self, G: nx.Graph):
701
+ """
702
+ Approximate a minimum vertex cover for a given graph, providing a mapping of nodes to the edges they cover.
703
+
704
+ Args:
705
+ G (nx.Graph): The input graph for which the vertex cover is to be computed.
706
+
707
+ Returns:
708
+ dict: A dictionary where keys are nodes and values are lists of edges that each node covers.
709
+ """
710
+
711
+ G = G.copy()
712
+ cover_map = {}
713
+
714
+ while G.number_of_edges() > 0:
715
+ # Pick node with max degree
716
+ node = max(G.degree, key=lambda x: x[1])[0]
717
+
718
+ # Collect neighbors (unique)
719
+ neighbors = list(G.neighbors(node))
720
+ cover_map[node] = neighbors
721
+
722
+ # Remove node (and incident edges)
723
+ G.remove_node(node)
724
+
725
+ return cover_map
726
+
727
+ def generate_maxcut_ansatz_star( # pylint: disable=too-many-branches
728
+ self,
729
+ graph,
730
+ theta,
731
+ ):
732
+ """Generate an ansatz circuit for QAOA MaxCut, with measurements at the end.
733
+
734
+ Args:
735
+ graph (networkx graph): the MaxCut problem graph
736
+ theta (list[float]): the variational parameters for QAOA, first gammas then betas
737
+
738
+ Returns:
739
+ QuantumCircuit: the QAOA ansatz quantum circuit.
740
+ """
741
+
742
+ gamma = theta[: self.num_qaoa_layers]
743
+ beta = theta[self.num_qaoa_layers :]
744
+
745
+ if self.graph_physical.number_of_nodes() != graph.number_of_nodes():
746
+ num_qubits = self.graph_physical.number_of_nodes()
747
+ # re-label the nodes to be between 0 and _num_qubits
748
+ self.node_to_qubit = {node: qubit for qubit, node in enumerate(list(self.graph_physical.nodes))}
749
+ self.qubit_to_node = dict(enumerate(list(self.graph_physical.nodes)))
750
+ else:
751
+ num_qubits = graph.number_of_nodes()
752
+ self.node_to_qubit = {node: node for node in list(self.graph_physical.nodes)} # no relabeling
753
+ self.qubit_to_node = self.node_to_qubit
754
+
755
+ covermap = self.greedy_vertex_cover_with_mapping(self.graph_physical)
756
+ new_covermap = {}
757
+ for key, value in covermap.items():
758
+ new_covermap[self.node_to_qubit[key]] = [self.node_to_qubit[i] for i in value]
759
+ covermap = new_covermap
760
+
761
+ compr = QuantumRegister(1, "compr")
762
+ q = QuantumRegister(num_qubits, "q")
763
+ c = ClassicalRegister(num_qubits, "c")
764
+ qaoa_qc = IQMCircuit(compr, q, c) # num_qb+1,num_qb)
765
+ # in case the graph is trivial: return empty circuit
766
+ if num_qubits == 0:
767
+ return QuantumCircuit(1)
768
+ for i in range(1, num_qubits + 1):
769
+ qaoa_qc.h(i)
770
+ for layer in range(self.num_qaoa_layers):
771
+ for move_qubit, edge_qubits in covermap.items():
772
+ qaoa_qc.move(move_qubit + 1, 0)
773
+ for edge_qubit in edge_qubits:
774
+ qaoa_qc.rzz(2 * gamma[layer], 0, edge_qubit + 1)
775
+ qaoa_qc.move(move_qubit + 1, 0)
776
+
777
+ # include edges of the virtual node as rz terms
778
+ for vn in self.virtual_nodes:
779
+ for edge in graph.edges(vn[0]):
780
+ # exclude edges between virtual nodes
781
+ edges_between_virtual_nodes = list(itertools.combinations([i[0] for i in self.virtual_nodes], 2))
782
+ if set(edge) not in list(map(set, edges_between_virtual_nodes)):
783
+ # The value of the fixed node defines the sign of the rz gate
784
+ sign = 1.0
785
+ if vn[1] == 1:
786
+ sign = -1.0
787
+ qaoa_qc.rz(sign * 2.0 * gamma[layer], self.node_to_qubit[edge[1]] + 1)
788
+
789
+ for i in range(1, num_qubits + 1):
790
+ qaoa_qc.rx(2 * beta[layer], i)
791
+ qaoa_qc.barrier()
792
+ qaoa_qc.measure(q, c)
793
+
794
+ return qaoa_qc
795
+
625
796
  def generate_maxcut_ansatz( # pylint: disable=too-many-branches
626
797
  self,
627
798
  graph: Graph,
628
799
  theta: list[float],
800
+ rzz_list=None,
629
801
  ) -> QuantumCircuit:
630
802
  """Generate an ansatz circuit for QAOA MaxCut, with measurements at the end.
631
803
 
@@ -656,10 +828,14 @@ class QScoreBenchmark(Benchmark):
656
828
  for i in range(0, num_qubits):
657
829
  qaoa_qc.h(i)
658
830
  for layer in range(self.num_qaoa_layers):
659
- for edge in self.graph_physical.edges():
660
- i = self.node_to_qubit[edge[0]]
661
- j = self.node_to_qubit[edge[1]]
662
- qaoa_qc.rzz(2 * gamma[layer], i, j)
831
+ if rzz_list is not None and layer == 0:
832
+ for rzzs in rzz_list:
833
+ qaoa_qc.rzz(2 * gamma[layer], rzzs[0], rzzs[1])
834
+ else:
835
+ for edge in self.graph_physical.edges():
836
+ i = self.node_to_qubit[edge[0]]
837
+ j = self.node_to_qubit[edge[1]]
838
+ qaoa_qc.rzz(2 * gamma[layer], i, j)
663
839
 
664
840
  # include edges of the virtual node as rz terms
665
841
  for vn in self.virtual_nodes:
@@ -792,6 +968,33 @@ class QScoreBenchmark(Benchmark):
792
968
  no_edge_instances = []
793
969
  qc_all = [] # all circuits, including those with no edges
794
970
  start_seed = seed
971
+
972
+ # Choose the qubit layout
973
+ if self.choose_qubits_routine.lower() == "naive":
974
+ qubit_set = self.choose_qubits_naive(updated_num_nodes)
975
+ elif self.choose_qubits_routine.lower() == "custom" or self.choose_qubits_routine.lower() == "mapomatic":
976
+ qubit_set = self.choose_qubits_custom(updated_num_nodes)
977
+ else:
978
+ raise ValueError('choose_qubits_routine must either be "naive" or "custom".')
979
+ qubit_set_list.append(qubit_set)
980
+
981
+ qcvv_logger.setLevel(logging.WARNING)
982
+ if self.choose_qubits_routine == "naive":
983
+ active_qubit_set = None
984
+ effective_coupling_map = self.backend.coupling_map
985
+ else:
986
+ active_qubit_set = qubit_set
987
+ effective_coupling_map = self.backend.coupling_map.reduce(active_qubit_set)
988
+
989
+ transpilation_params = {
990
+ "backend": self.backend,
991
+ "qubits": active_qubit_set,
992
+ "coupling_map": effective_coupling_map,
993
+ "qiskit_optim_level": self.qiskit_optim_level,
994
+ "optimize_sqg": self.optimize_sqg,
995
+ "routing_method": self.routing_method,
996
+ }
997
+
795
998
  for instance in range(self.num_instances):
796
999
  qcvv_logger.debug(f"Executing graph {instance} with {num_nodes} nodes.")
797
1000
  graph = nx.generators.erdos_renyi_graph(num_nodes, 0.5, seed=seed)
@@ -820,17 +1023,6 @@ class QScoreBenchmark(Benchmark):
820
1023
  no_edge_instances.append(instance)
821
1024
  qcvv_logger.debug(f"Graph {instance+1}/{self.num_instances} had no edges: cut size = 0.")
822
1025
 
823
- # Choose the qubit layout
824
- if self.choose_qubits_routine.lower() == "naive":
825
- qubit_set = self.choose_qubits_naive(updated_num_nodes)
826
- elif (
827
- self.choose_qubits_routine.lower() == "custom" or self.choose_qubits_routine.lower() == "mapomatic"
828
- ):
829
- qubit_set = self.choose_qubits_custom(updated_num_nodes)
830
- else:
831
- raise ValueError('choose_qubits_routine must either be "naive" or "custom".')
832
- qubit_set_list.append(qubit_set)
833
-
834
1026
  if self.use_classically_optimized_angles:
835
1027
  if graph.number_of_edges() != 0:
836
1028
  theta = calculate_optimal_angles_for_QAOA_p1(graph)
@@ -841,11 +1033,26 @@ class QScoreBenchmark(Benchmark):
841
1033
 
842
1034
  theta_list.append(theta)
843
1035
 
844
- qc = self.generate_maxcut_ansatz(graph, theta)
845
-
846
- if len(qc.count_ops()) != 0:
847
- qc_list.append(qc)
848
- qc_all.append(qc)
1036
+ if self.backend.has_resonators():
1037
+ qc_opt = self.generate_maxcut_ansatz_star(graph, theta)
1038
+ else:
1039
+ qc_list_temp = []
1040
+ cz_count_temp = []
1041
+ for _ in range(self.num_trials):
1042
+ perm = np.random.permutation(num_nodes)
1043
+ mapping = dict(zip(graph.nodes, perm))
1044
+ G1_permuted = nx.relabel_nodes(graph, mapping)
1045
+ theta = calculate_optimal_angles_for_QAOA_p1(G1_permuted)
1046
+ qc_perm = self.generate_maxcut_ansatz(G1_permuted, theta)
1047
+ transpiled_qc_temp, _ = perform_backend_transpilation([qc_perm], **transpilation_params)
1048
+ cz_count_temp.append(transpiled_qc_temp[0].count_ops().get("cz", 0))
1049
+ qc_list_temp.append(qc_perm)
1050
+ min_cz_index = cz_count_temp.index(min(cz_count_temp))
1051
+ qc_opt = qc_list_temp[min_cz_index]
1052
+
1053
+ if len(qc_opt.count_ops()) != 0:
1054
+ qc_list.append(qc_opt)
1055
+ qc_all.append(qc_opt)
849
1056
  qubit_to_node_copy = self.qubit_to_node.copy()
850
1057
  qubit_to_node_list.append(qubit_to_node_copy)
851
1058
  else:
@@ -855,24 +1062,20 @@ class QScoreBenchmark(Benchmark):
855
1062
  seed += 1
856
1063
  qcvv_logger.debug(f"Solved the MaxCut on graph {instance+1}/{self.num_instances}.")
857
1064
 
858
- qcvv_logger.setLevel(logging.WARNING)
859
- if self.choose_qubits_routine == "naive":
860
- active_qubit_set = None
861
- effective_coupling_map = self.backend.coupling_map
1065
+ if self.backend.has_resonators():
1066
+ transpiled_qc = [
1067
+ transpile_to_IQM(
1068
+ qc,
1069
+ self.backend,
1070
+ optimize_single_qubits=self.optimize_sqg,
1071
+ existing_moves_handling=ExistingMoveHandlingOptions.KEEP,
1072
+ perform_move_routing=False,
1073
+ optimization_level=self.qiskit_optim_level,
1074
+ )
1075
+ for qc in qc_list
1076
+ ]
862
1077
  else:
863
- active_qubit_set = qubit_set
864
- effective_coupling_map = self.backend.coupling_map.reduce(active_qubit_set)
865
-
866
- transpilation_params = {
867
- "backend": self.backend,
868
- "qubits": active_qubit_set,
869
- "coupling_map": effective_coupling_map,
870
- "qiskit_optim_level": self.qiskit_optim_level,
871
- "optimize_sqg": self.optimize_sqg,
872
- "routing_method": self.routing_method,
873
- }
874
-
875
- transpiled_qc, _ = perform_backend_transpilation(qc_list, **transpilation_params)
1078
+ transpiled_qc, _ = perform_backend_transpilation(qc_list, **transpilation_params)
876
1079
 
877
1080
  sorted_transpiled_qc_list = {tuple(qubit_set): transpiled_qc}
878
1081
  # Execute on the backend
@@ -892,9 +1095,7 @@ class QScoreBenchmark(Benchmark):
892
1095
  num_instances_with_edges = len(instance_with_edges)
893
1096
  if self.REM:
894
1097
  counts_retrieved, time_retrieve = retrieve_all_counts(jobs)
895
- rem_counts = apply_readout_error_mitigation(
896
- backend, transpiled_qc, counts_retrieved, self.mit_shots
897
- )
1098
+ rem_counts = apply_readout_error_mitigation(backend, transpiled_qc, counts_retrieved, self.mit_shots)
898
1099
  execution_results.extend(
899
1100
  rem_counts[0][instance].nearest_probability_distribution()
900
1101
  for instance in range(num_instances_with_edges)
@@ -960,6 +1161,7 @@ class QScoreConfiguration(BenchmarkConfigurationBase):
960
1161
  * Default is 3.
961
1162
  optimize_sqg (bool): Whether Single Qubit Gate Optimization is performed upon transpilation.
962
1163
  * Default is True.
1164
+ num_trials (Optional[int]): Number of trials to perform when choosing graph permutations to minimize CZ gates.
963
1165
  seed (int): The random seed.
964
1166
  * Default is 1.
965
1167
  REM (bool): Use readout error mitigation.
@@ -980,6 +1182,7 @@ class QScoreConfiguration(BenchmarkConfigurationBase):
980
1182
  custom_qubits_array: Optional[Sequence[Sequence[int]]] = None
981
1183
  qiskit_optim_level: int = 3
982
1184
  optimize_sqg: bool = True
1185
+ num_trials: int = 10
983
1186
  seed: int = 1
984
1187
  REM: bool = False
985
1188
  mit_shots: int = 1000
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: iqm-benchmarks
3
- Version: 2.49
3
+ Version: 2.51
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
@@ -19,8 +19,8 @@ Requires-Dist: networkx<4.0,>=3.3
19
19
  Requires-Dist: rustworkx>=0.16.0
20
20
  Requires-Dist: numpy<2.0,>=1.25.2
21
21
  Requires-Dist: qiskit<=1.4.2,>=1.2.4
22
- Requires-Dist: iqm-client[qiskit]<31.0,>=30.1.0
23
- Requires-Dist: iqm-station-control-client>=9.3.0
22
+ Requires-Dist: iqm-client[qiskit]<33.0,>=32.1.1
23
+ Requires-Dist: iqm-station-control-client<12.0,>=11.3.1
24
24
  Requires-Dist: requests<3.0,>=2.32.3
25
25
  Requires-Dist: scikit-optimize<0.11.0,>=0.10.2
26
26
  Requires-Dist: tabulate<1.0.0,>=0.9.0
@@ -6,8 +6,8 @@ networkx<4.0,>=3.3
6
6
  rustworkx>=0.16.0
7
7
  numpy<2.0,>=1.25.2
8
8
  qiskit<=1.4.2,>=1.2.4
9
- iqm-client[qiskit]<31.0,>=30.1.0
10
- iqm-station-control-client>=9.3.0
9
+ iqm-client[qiskit]<33.0,>=32.1.1
10
+ iqm-station-control-client<12.0,>=11.3.1
11
11
  requests<3.0,>=2.32.3
12
12
  scikit-optimize<0.11.0,>=0.10.2
13
13
  tabulate<1.0.0,>=0.9.0
@@ -7,7 +7,7 @@ from iqm.qiskit_iqm.fake_backends.fake_deneb import IQMFakeDeneb
7
7
 
8
8
  class TestQScore:
9
9
  backend = IQMFakeApollo()
10
- custom_qubits_array = [[0, 1, 3], [0, 1, 2, 3], [0, 1, 2, 3, 4]]
10
+ custom_qubits_array = [[0, 1, 2, 3], [0, 1, 2, 3, 4]]
11
11
 
12
12
  def test_qscore(self):
13
13
  EXAMPLE_QSCORE = QScoreConfiguration(
@@ -15,13 +15,14 @@ class TestQScore:
15
15
  num_qaoa_layers=1,
16
16
  shots=4,
17
17
  calset_id=None, # calibration set ID, default is None
18
- min_num_nodes=3,
18
+ min_num_nodes=4,
19
19
  max_num_nodes=5,
20
20
  use_virtual_node=True,
21
21
  use_classically_optimized_angles=True,
22
22
  choose_qubits_routine="custom",
23
23
  custom_qubits_array=self.custom_qubits_array,
24
- seed=1,
24
+ seed=200,
25
+ num_trials = 2,
25
26
  REM=True,
26
27
  mit_shots=10,
27
28
  )
@@ -32,4 +33,4 @@ class TestQScore:
32
33
 
33
34
  class TestQScoreDeneb(TestQScore):
34
35
  backend = IQMFakeDeneb()
35
- custom_qubits_array = [[1, 2, 3], [1, 2, 3, 4], [1, 2, 3, 4, 5]]
36
+ custom_qubits_array = [[1, 2, 3, 4], [1, 2, 3, 4, 5]]
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes