iqm-benchmarks 2.55__tar.gz → 2.56__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 (113) hide show
  1. {iqm_benchmarks-2.55 → iqm_benchmarks-2.56}/CHANGELOG.rst +5 -0
  2. {iqm_benchmarks-2.55/src/iqm_benchmarks.egg-info → iqm_benchmarks-2.56}/PKG-INFO +1 -1
  3. iqm_benchmarks-2.56/docs/examples/example_ghz.ipynb +242 -0
  4. {iqm_benchmarks-2.55 → iqm_benchmarks-2.56}/docs/examples/example_qscore.ipynb +40 -35
  5. {iqm_benchmarks-2.55 → iqm_benchmarks-2.56}/docs/examples/example_quantum_volume.ipynb +30 -21
  6. {iqm_benchmarks-2.55 → iqm_benchmarks-2.56}/src/iqm/benchmarks/entanglement/ghz.py +2 -2
  7. {iqm_benchmarks-2.55 → iqm_benchmarks-2.56}/src/iqm/benchmarks/randomized_benchmarking/interleaved_rb/interleaved_rb.py +0 -1
  8. {iqm_benchmarks-2.55 → iqm_benchmarks-2.56/src/iqm_benchmarks.egg-info}/PKG-INFO +1 -1
  9. iqm_benchmarks-2.55/docs/examples/example_ghz.ipynb +0 -373
  10. {iqm_benchmarks-2.55 → iqm_benchmarks-2.56}/.github/workflows/main.yml +0 -0
  11. {iqm_benchmarks-2.55 → iqm_benchmarks-2.56}/.github/workflows/publish.yml +0 -0
  12. {iqm_benchmarks-2.55 → iqm_benchmarks-2.56}/.github/workflows/tag_and_release.yml +0 -0
  13. {iqm_benchmarks-2.55 → iqm_benchmarks-2.56}/.gitignore +0 -0
  14. {iqm_benchmarks-2.55 → iqm_benchmarks-2.56}/LICENSE +0 -0
  15. {iqm_benchmarks-2.55 → iqm_benchmarks-2.56}/MANIFEST.in +0 -0
  16. {iqm_benchmarks-2.55 → iqm_benchmarks-2.56}/README.md +0 -0
  17. {iqm_benchmarks-2.55 → iqm_benchmarks-2.56}/benchmark_runner.py +0 -0
  18. {iqm_benchmarks-2.55 → iqm_benchmarks-2.56}/docbuild +0 -0
  19. {iqm_benchmarks-2.55 → iqm_benchmarks-2.56}/docs/API.rst +0 -0
  20. {iqm_benchmarks-2.55 → iqm_benchmarks-2.56}/docs/Makefile +0 -0
  21. {iqm_benchmarks-2.55 → iqm_benchmarks-2.56}/docs/_static/images/favicon.ico +0 -0
  22. {iqm_benchmarks-2.55 → iqm_benchmarks-2.56}/docs/_static/images/logo.png +0 -0
  23. {iqm_benchmarks-2.55 → iqm_benchmarks-2.56}/docs/_templates/autosummary-class-template.rst +0 -0
  24. {iqm_benchmarks-2.55 → iqm_benchmarks-2.56}/docs/_templates/autosummary-module-template.rst +0 -0
  25. {iqm_benchmarks-2.55 → iqm_benchmarks-2.56}/docs/changelog.rst +0 -0
  26. {iqm_benchmarks-2.55 → iqm_benchmarks-2.56}/docs/conf.py +0 -0
  27. {iqm_benchmarks-2.55 → iqm_benchmarks-2.56}/docs/development/development.rst +0 -0
  28. {iqm_benchmarks-2.55 → iqm_benchmarks-2.56}/docs/development/generate_2qubit_cliffords.ipynb +0 -0
  29. {iqm_benchmarks-2.55 → iqm_benchmarks-2.56}/docs/development/how_to_make_your_own_benchmark.ipynb +0 -0
  30. {iqm_benchmarks-2.55 → iqm_benchmarks-2.56}/docs/devices/devices.rst +0 -0
  31. {iqm_benchmarks-2.55 → iqm_benchmarks-2.56}/docs/devices/spark.ipynb +0 -0
  32. {iqm_benchmarks-2.55 → iqm_benchmarks-2.56}/docs/devices/star.ipynb +0 -0
  33. {iqm_benchmarks-2.55 → iqm_benchmarks-2.56}/docs/examples/example_clifford_rb.ipynb +0 -0
  34. {iqm_benchmarks-2.55 → iqm_benchmarks-2.56}/docs/examples/example_clops.ipynb +0 -0
  35. {iqm_benchmarks-2.55 → iqm_benchmarks-2.56}/docs/examples/example_coherence.ipynb +0 -0
  36. {iqm_benchmarks-2.55 → iqm_benchmarks-2.56}/docs/examples/example_eplg.ipynb +0 -0
  37. {iqm_benchmarks-2.55 → iqm_benchmarks-2.56}/docs/examples/example_experiment_all.ipynb +0 -0
  38. {iqm_benchmarks-2.55 → iqm_benchmarks-2.56}/docs/examples/example_graphstate.ipynb +0 -0
  39. {iqm_benchmarks-2.55 → iqm_benchmarks-2.56}/docs/examples/example_gst.ipynb +0 -0
  40. {iqm_benchmarks-2.55 → iqm_benchmarks-2.56}/docs/examples/example_interleaved_rb.ipynb +0 -0
  41. {iqm_benchmarks-2.55 → iqm_benchmarks-2.56}/docs/examples/example_mirror_rb.ipynb +0 -0
  42. {iqm_benchmarks-2.55 → iqm_benchmarks-2.56}/docs/examples/examples.rst +0 -0
  43. {iqm_benchmarks-2.55 → iqm_benchmarks-2.56}/docs/index.rst +0 -0
  44. {iqm_benchmarks-2.55 → iqm_benchmarks-2.56}/docs/license.rst +0 -0
  45. {iqm_benchmarks-2.55 → iqm_benchmarks-2.56}/docs/readme.md +0 -0
  46. {iqm_benchmarks-2.55 → iqm_benchmarks-2.56}/format +0 -0
  47. {iqm_benchmarks-2.55 → iqm_benchmarks-2.56}/pyproject.toml +0 -0
  48. {iqm_benchmarks-2.55 → iqm_benchmarks-2.56}/requirements.txt +0 -0
  49. {iqm_benchmarks-2.55 → iqm_benchmarks-2.56}/scheduled_experiments/adonis/__init__.py +0 -0
  50. {iqm_benchmarks-2.55 → iqm_benchmarks-2.56}/scheduled_experiments/adonis/weekly.py +0 -0
  51. {iqm_benchmarks-2.55 → iqm_benchmarks-2.56}/setup.cfg +0 -0
  52. {iqm_benchmarks-2.55 → iqm_benchmarks-2.56}/src/iqm/benchmarks/__init__.py +0 -0
  53. {iqm_benchmarks-2.55 → iqm_benchmarks-2.56}/src/iqm/benchmarks/benchmark.py +0 -0
  54. {iqm_benchmarks-2.55 → iqm_benchmarks-2.56}/src/iqm/benchmarks/benchmark_definition.py +0 -0
  55. {iqm_benchmarks-2.55 → iqm_benchmarks-2.56}/src/iqm/benchmarks/circuit_containers.py +0 -0
  56. {iqm_benchmarks-2.55 → iqm_benchmarks-2.56}/src/iqm/benchmarks/coherence/__init__.py +0 -0
  57. {iqm_benchmarks-2.55 → iqm_benchmarks-2.56}/src/iqm/benchmarks/coherence/coherence.py +0 -0
  58. {iqm_benchmarks-2.55 → iqm_benchmarks-2.56}/src/iqm/benchmarks/compressive_gst/__init__.py +0 -0
  59. {iqm_benchmarks-2.55 → iqm_benchmarks-2.56}/src/iqm/benchmarks/compressive_gst/compressive_gst.py +0 -0
  60. {iqm_benchmarks-2.55 → iqm_benchmarks-2.56}/src/iqm/benchmarks/compressive_gst/gst_analysis.py +0 -0
  61. {iqm_benchmarks-2.55 → iqm_benchmarks-2.56}/src/iqm/benchmarks/entanglement/__init__.py +0 -0
  62. {iqm_benchmarks-2.55 → iqm_benchmarks-2.56}/src/iqm/benchmarks/entanglement/graph_states.py +0 -0
  63. {iqm_benchmarks-2.55 → iqm_benchmarks-2.56}/src/iqm/benchmarks/logging_config.py +0 -0
  64. {iqm_benchmarks-2.55 → iqm_benchmarks-2.56}/src/iqm/benchmarks/optimization/__init__.py +0 -0
  65. {iqm_benchmarks-2.55 → iqm_benchmarks-2.56}/src/iqm/benchmarks/optimization/qscore.py +0 -0
  66. {iqm_benchmarks-2.55 → iqm_benchmarks-2.56}/src/iqm/benchmarks/quantum_volume/__init__.py +0 -0
  67. {iqm_benchmarks-2.55 → iqm_benchmarks-2.56}/src/iqm/benchmarks/quantum_volume/clops.py +0 -0
  68. {iqm_benchmarks-2.55 → iqm_benchmarks-2.56}/src/iqm/benchmarks/quantum_volume/quantum_volume.py +0 -0
  69. {iqm_benchmarks-2.55 → iqm_benchmarks-2.56}/src/iqm/benchmarks/randomized_benchmarking/__init__.py +0 -0
  70. {iqm_benchmarks-2.55 → iqm_benchmarks-2.56}/src/iqm/benchmarks/randomized_benchmarking/clifford_1q.pkl +0 -0
  71. {iqm_benchmarks-2.55 → iqm_benchmarks-2.56}/src/iqm/benchmarks/randomized_benchmarking/clifford_2q.pkl +0 -0
  72. {iqm_benchmarks-2.55 → iqm_benchmarks-2.56}/src/iqm/benchmarks/randomized_benchmarking/clifford_rb/__init__.py +0 -0
  73. {iqm_benchmarks-2.55 → iqm_benchmarks-2.56}/src/iqm/benchmarks/randomized_benchmarking/clifford_rb/clifford_rb.py +0 -0
  74. {iqm_benchmarks-2.55 → iqm_benchmarks-2.56}/src/iqm/benchmarks/randomized_benchmarking/direct_rb/__init__.py +0 -0
  75. {iqm_benchmarks-2.55 → iqm_benchmarks-2.56}/src/iqm/benchmarks/randomized_benchmarking/direct_rb/direct_rb.py +0 -0
  76. {iqm_benchmarks-2.55 → iqm_benchmarks-2.56}/src/iqm/benchmarks/randomized_benchmarking/eplg/__init__.py +0 -0
  77. {iqm_benchmarks-2.55 → iqm_benchmarks-2.56}/src/iqm/benchmarks/randomized_benchmarking/eplg/eplg.py +0 -0
  78. {iqm_benchmarks-2.55 → iqm_benchmarks-2.56}/src/iqm/benchmarks/randomized_benchmarking/interleaved_rb/__init__.py +0 -0
  79. {iqm_benchmarks-2.55 → iqm_benchmarks-2.56}/src/iqm/benchmarks/randomized_benchmarking/mirror_rb/__init__.py +0 -0
  80. {iqm_benchmarks-2.55 → iqm_benchmarks-2.56}/src/iqm/benchmarks/randomized_benchmarking/mirror_rb/mirror_rb.py +0 -0
  81. {iqm_benchmarks-2.55 → iqm_benchmarks-2.56}/src/iqm/benchmarks/randomized_benchmarking/multi_lmfit.py +0 -0
  82. {iqm_benchmarks-2.55 → iqm_benchmarks-2.56}/src/iqm/benchmarks/randomized_benchmarking/randomized_benchmarking_common.py +0 -0
  83. {iqm_benchmarks-2.55 → iqm_benchmarks-2.56}/src/iqm/benchmarks/readout_mitigation.py +0 -0
  84. {iqm_benchmarks-2.55 → iqm_benchmarks-2.56}/src/iqm/benchmarks/utils.py +0 -0
  85. {iqm_benchmarks-2.55 → iqm_benchmarks-2.56}/src/iqm/benchmarks/utils_plots.py +0 -0
  86. {iqm_benchmarks-2.55 → iqm_benchmarks-2.56}/src/iqm/benchmarks/utils_shadows.py +0 -0
  87. {iqm_benchmarks-2.55 → iqm_benchmarks-2.56}/src/iqm_benchmarks.egg-info/SOURCES.txt +0 -0
  88. {iqm_benchmarks-2.55 → iqm_benchmarks-2.56}/src/iqm_benchmarks.egg-info/dependency_links.txt +0 -0
  89. {iqm_benchmarks-2.55 → iqm_benchmarks-2.56}/src/iqm_benchmarks.egg-info/requires.txt +0 -0
  90. {iqm_benchmarks-2.55 → iqm_benchmarks-2.56}/src/iqm_benchmarks.egg-info/top_level.txt +0 -0
  91. {iqm_benchmarks-2.55 → iqm_benchmarks-2.56}/src/mGST/LICENSE +0 -0
  92. {iqm_benchmarks-2.55 → iqm_benchmarks-2.56}/src/mGST/README.md +0 -0
  93. {iqm_benchmarks-2.55 → iqm_benchmarks-2.56}/src/mGST/additional_fns.py +0 -0
  94. {iqm_benchmarks-2.55 → iqm_benchmarks-2.56}/src/mGST/algorithm.py +0 -0
  95. {iqm_benchmarks-2.55 → iqm_benchmarks-2.56}/src/mGST/compatibility.py +0 -0
  96. {iqm_benchmarks-2.55 → iqm_benchmarks-2.56}/src/mGST/low_level_jit.py +0 -0
  97. {iqm_benchmarks-2.55 → iqm_benchmarks-2.56}/src/mGST/optimization.py +0 -0
  98. {iqm_benchmarks-2.55 → iqm_benchmarks-2.56}/src/mGST/qiskit_interface.py +0 -0
  99. {iqm_benchmarks-2.55 → iqm_benchmarks-2.56}/src/mGST/reporting/figure_gen.py +0 -0
  100. {iqm_benchmarks-2.55 → iqm_benchmarks-2.56}/src/mGST/reporting/reporting.py +0 -0
  101. {iqm_benchmarks-2.55 → iqm_benchmarks-2.56}/tag-from-pipeline.sh +0 -0
  102. {iqm_benchmarks-2.55 → iqm_benchmarks-2.56}/test +0 -0
  103. {iqm_benchmarks-2.55 → iqm_benchmarks-2.56}/tests/test_coherence.py +0 -0
  104. {iqm_benchmarks-2.55 → iqm_benchmarks-2.56}/tests/test_ghz.py +0 -0
  105. {iqm_benchmarks-2.55 → iqm_benchmarks-2.56}/tests/test_graph_states.py +0 -0
  106. {iqm_benchmarks-2.55 → iqm_benchmarks-2.56}/tests/test_gst.py +0 -0
  107. {iqm_benchmarks-2.55 → iqm_benchmarks-2.56}/tests/test_qscore.py +0 -0
  108. {iqm_benchmarks-2.55 → iqm_benchmarks-2.56}/tests/test_qv.py +0 -0
  109. {iqm_benchmarks-2.55 → iqm_benchmarks-2.56}/tests/test_rb.py +0 -0
  110. {iqm_benchmarks-2.55 → iqm_benchmarks-2.56}/tests/unit/test_backend_transpilation.py +0 -0
  111. {iqm_benchmarks-2.55 → iqm_benchmarks-2.56}/tests/unit/test_benchmark_circuit.py +0 -0
  112. {iqm_benchmarks-2.55 → iqm_benchmarks-2.56}/tests/unit/test_submit_execute.py +0 -0
  113. {iqm_benchmarks-2.55 → iqm_benchmarks-2.56}/update-requirements.py +0 -0
@@ -2,6 +2,11 @@
2
2
  Changelog
3
3
  =========
4
4
 
5
+ Version 2.56
6
+ ============
7
+ * Fixed import bug with iRB.
8
+ * Improved execution of star_optimal GHZ creation circuit.
9
+
5
10
  Version 2.55
6
11
  ============
7
12
  * Compatibility with new job metadata formats.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: iqm-benchmarks
3
- Version: 2.55
3
+ Version: 2.56
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
@@ -0,0 +1,242 @@
1
+ {
2
+ "cells": [
3
+ {
4
+ "cell_type": "markdown",
5
+ "id": "feba4cfa-dc9d-4029-967c-83140c11d750",
6
+ "metadata": {},
7
+ "source": [
8
+ "# Greenberger–Horne–Zeilinger (GHZ) State Fidelity\n",
9
+ "\n",
10
+ "The aim of this benchmark is to show whether a GHZ state with high enough fidelity can be prepared such that the state is genuinely multipartite entangled. One can show that a fidelity larger than 0.5 is a sufficient condition (see Leibfried, D. et al., Creation of a six-atom ‘Schrödinger cat’ state. Nature 438, 639–642 (2005))\n",
11
+ "\n",
12
+ "The benchmark currently offers two methods to estimate the fidelity:\n",
13
+ "* Multiple quantum coherences (G. J. Mooney et al., Generation and verification of 27-qubit Greenberger-Horne-Zeilinger states in a superconducting quantum computer, J. Phys. Commun. 5, 095004 (2021))\n",
14
+ "* Randomized measurements (Elben, A. et al., Statistical correlations between locally randomized measurements: A toolbox for probing entanglement in many-body quantum states, Phys. Rev. A 99, 052323 (2019))\n",
15
+ "\n",
16
+ "Additionally, for a given set of $n$ qubits, different circuits can be applied which lead to the same GHZ state. Currently there are the following implementations:\n",
17
+ "* \"naive\": The textbook ciruit of depth $n$, which starts from a Hadamrd gate on one qubit and entangles each additional qubit with a CNOT operation from the first.\n",
18
+ "* \"log_depth\": A logarithmic depth circuit utilizing parallel CNOT applications. Either the method in Cruz et al. https://arxiv.org/abs/1807.05572 or the method in Mooney et al. https://arxiv.org/abs/2101.08946 is used, depending on which yields the lower depth or the lower number of 2-qubit gates. \n",
19
+ "* \"tree\": An in-house logarithmic depth circuit utilizing calibration data of the CZ-fidelities and a tree-graph algorithm to find a circuit with minimal depth and high fidelity 2-qubit gates. \n",
20
+ "\n",
21
+ "Note that the first two methods will always give the same circuit for the same qubit layout (and the same coupling map), while the \"tree\" method relies on the latest calibration fidelities and can give different circuits on different days. \n",
22
+ "Thus for consistent comparisons one of the first two methods should be chosen, while for the best results, i.e. the largest possible GME entangled GHZ state, the tree-method is preferable."
23
+ ]
24
+ },
25
+ {
26
+ "cell_type": "code",
27
+ "execution_count": null,
28
+ "id": "c517b115acb6fbc1",
29
+ "metadata": {},
30
+ "outputs": [],
31
+ "source": [
32
+ "from iqm.benchmarks.entanglement.ghz import *\n",
33
+ "import os\n",
34
+ "from iqm.qiskit_iqm import IQMProvider\n",
35
+ "\n",
36
+ "token = \"XXXXXXX\"\n",
37
+ "os.environ[\"IQM_TOKEN\"] = token\n",
38
+ "quantum_computer = \"qc_name\" # provide actual quantum computer name\n",
39
+ "iqm_server_url = \"iqm_server_url\" # provide actual IQM server URL\n",
40
+ "os.environ[\"IQM_SERVER_URL\"] = iqm_server_url\n",
41
+ "provider = IQMProvider(iqm_server_url, quantum_computer=quantum_computer)\n",
42
+ "backend = provider.get_backend()"
43
+ ]
44
+ },
45
+ {
46
+ "cell_type": "markdown",
47
+ "id": "b8b83411414e5a18",
48
+ "metadata": {},
49
+ "source": [
50
+ "## Dynamical decoupling strategy\n",
51
+ "\n",
52
+ "The success of dynamical decoupling (DD) depends on the coherence several factors, like\n",
53
+ "* Amount and lenght of idle segments in the circuit,\n",
54
+ "* Magnitude of idling errors,\n",
55
+ "* Single qubit gate fidelities (since DD adds additional single qubit gates).\n",
56
+ "\n",
57
+ "Therefore just using the default DD strategy is not guaranteed to improve the results. In this notebook we apply a minimal DD strategy which only add single qubit gates on qubits with a high single qubit gate fidelity, and only adds a minimal amount of extra gates per idle segment (just tow X-Gates). This strategy should improve outcomes in most cases."
58
+ ]
59
+ },
60
+ {
61
+ "cell_type": "code",
62
+ "execution_count": null,
63
+ "id": "cdcd5ae9663b21fc",
64
+ "metadata": {},
65
+ "outputs": [],
66
+ "source": [
67
+ "from iqm.iqm_client.models import DDStrategy\n",
68
+ "\n",
69
+ "strategy = DDStrategy(gate_sequences=[(2, 'XX', 'center')], target_qubits = None)\n",
70
+ "\n",
71
+ "print(f\"Minimal dynamical decoupling strategy:\")\n",
72
+ "for k, v in strategy.__dict__.items():\n",
73
+ " print(f\"\\t{k}: {v}\")"
74
+ ]
75
+ },
76
+ {
77
+ "cell_type": "markdown",
78
+ "id": "d483c8396dc58041",
79
+ "metadata": {},
80
+ "source": [
81
+ "## Definition of the benchmark configuration\n",
82
+ "The important parameters are:\n",
83
+ "* ``custom_qubits_array``: A ``list[list[int]]`` which includes all qubit layouts on which the benchmark is run.\n",
84
+ "* ``shots``: The number of shots for the fidelity measurement\n",
85
+ "* ``fidelity_routine``: Either \"coherences\" or \"randomized_measurements\"\n",
86
+ "* ``rem``: Boolean value that controls whether readout error mitigation is used\n",
87
+ "* ``mit_shots``: Whenever rem=True, this parameter controls the total number of shots used to calibrate readout error mitgation\n",
88
+ "* ``num_RMs``: The number of randomized measurement settings (only necessary when choosing ``fidelity_routine=randomized_measurements``)"
89
+ ]
90
+ },
91
+ {
92
+ "cell_type": "code",
93
+ "execution_count": null,
94
+ "id": "81059f0ce9442e7c",
95
+ "metadata": {},
96
+ "outputs": [],
97
+ "source": [
98
+ "MINIMAL_GHZ = GHZConfiguration(\n",
99
+ " state_generation_routine=\"tree\",\n",
100
+ " custom_qubits_array=[ # These are naive settings, replace with better qubit layouts!\n",
101
+ " list(np.arange(10)),\n",
102
+ " list(np.arange(20)),\n",
103
+ " ],\n",
104
+ " shots=1000,\n",
105
+ " fidelity_routine=\"coherences\", \n",
106
+ " rem=True,\n",
107
+ " mit_shots=1000,\n",
108
+ " use_dd = True,\n",
109
+ " dd_strategy=strategy,\n",
110
+ " quantum_computer=quantum_computer\n",
111
+ ")"
112
+ ]
113
+ },
114
+ {
115
+ "cell_type": "markdown",
116
+ "id": "8cb9a0ddbd88c6fb",
117
+ "metadata": {},
118
+ "source": [
119
+ "### Improved qubit selection via layout fidelity graph\n",
120
+ "\n",
121
+ "For thinking about which qubit layouts to use, the following visualization of the connectivity and CZ fidelities is helpful.\n",
122
+ "\n",
123
+ "Requirements: \n",
124
+ "* Access to the backend, in this example IQM Garnet.\n",
125
+ "* An access token environment variable needs to be set via ``os.environ[\"IQM_TOKEN\"] = <your_token>``.\n",
126
+ "\n",
127
+ "Use of the plot:\n",
128
+ "* If the ``qubit_layouts`` argument is provided, the selected qubits are marked in orange.\n",
129
+ "* CZ errors are indicated with edge width (**thinner edge is better**), where the edge width is given by $w_{ij} = - \\mathrm{log}(\\mathcal{F}_{\\mathrm{CZ}}^{ij})$.\n",
130
+ "* Each edge is also labeled with the width value. \n",
131
+ "* Some graph layouts are predefined to match the layout as shown in IQM-Resonance. If the layout is not predefined, a graph in grid or star layout will be automatically generated, dependeing on the backend. Automatically generated graphs might need to be rerun a few times until a nice node layout is found.\n",
132
+ "* Single qubit errors are visualized as node size (**smaller radius is better**), with the node size being determined by $- \\mathrm{log}(\\mathcal{F})$, where $\\mathcal{F}$ is either the single qubit average gate fidelity, the single qubit readout fidelity, or the single qubit idle gate fidelity. Which of these is used can be controlled by the ``sq_metric`` argument, which can be set to \"fidelity\" \"readout\", or \"coherence\", where the latter option leads to the idle fidelities being shown.\n",
133
+ "* If the option `show_ghz_path` is set to True, the connections used for creating the GHZ state are highlighted red. Furthermore the \"Edge map\" is printed, which is the list of qubit pairs on which CZ gates act in the GHZ circuit. The list is ordered, so the first pair is scheduled first, and so on. CZ-Gates on subsequent pairs that don't share the same qubit are executed in parallel. "
134
+ ]
135
+ },
136
+ {
137
+ "cell_type": "code",
138
+ "execution_count": null,
139
+ "id": "b6cf7b3d715e6da6",
140
+ "metadata": {},
141
+ "outputs": [],
142
+ "source": [
143
+ "from iqm.benchmarks.utils_plots import plot_layout_fidelity_graph\n",
144
+ "import os\n",
145
+ "\n",
146
+ "print(f\"Check if access token environment variable is set: {'IQM_TOKEN' in os.environ}\")\n",
147
+ "qubit_layouts = [list(range(20))]\n",
148
+ "fig = plot_layout_fidelity_graph(iqm_server_url, backend, quantum_computer = quantum_computer, qubit_layouts = qubit_layouts, sq_metric=\"coherence\", show_ghz_path = True)"
149
+ ]
150
+ },
151
+ {
152
+ "cell_type": "markdown",
153
+ "id": "bc253129-4f0d-4a9e-aff1-852c2e7d4e21",
154
+ "metadata": {},
155
+ "source": [
156
+ "## Running the benchmark"
157
+ ]
158
+ },
159
+ {
160
+ "cell_type": "code",
161
+ "execution_count": null,
162
+ "id": "3ca4c757-9b58-4ee6-b9b6-365e22e3b378",
163
+ "metadata": {
164
+ "ExecuteTime": {
165
+ "end_time": "2025-07-21T15:14:11.771971Z",
166
+ "start_time": "2025-07-21T15:13:57.980121Z"
167
+ }
168
+ },
169
+ "outputs": [],
170
+ "source": [
171
+ "benchmark_ghz = GHZBenchmark(backend, MINIMAL_GHZ)\n",
172
+ "run_ghz = benchmark_ghz.run()"
173
+ ]
174
+ },
175
+ {
176
+ "cell_type": "code",
177
+ "execution_count": null,
178
+ "id": "c20f246c-9fd0-4399-96a9-3755ccbfd81e",
179
+ "metadata": {
180
+ "ExecuteTime": {
181
+ "end_time": "2025-07-21T15:14:49.112922Z",
182
+ "start_time": "2025-07-21T15:14:49.042215Z"
183
+ }
184
+ },
185
+ "outputs": [],
186
+ "source": [
187
+ "result = benchmark_ghz.analyze()"
188
+ ]
189
+ },
190
+ {
191
+ "cell_type": "markdown",
192
+ "id": "11f39392-7350-4010-bec4-08ca4c6ed908",
193
+ "metadata": {},
194
+ "source": [
195
+ "## Accessing the results\n",
196
+ "To see individual fidelitiy and uncertainty values of a given qubit layout, one can filter the ``result.observations``-list by layout as shown below. \n",
197
+ "\n",
198
+ "The plot allows a comparison of all layout results with and without REM, where the data point description labels \"L0\", \"L1\", ... enumerate the layouts in the order defined in the configuration."
199
+ ]
200
+ },
201
+ {
202
+ "cell_type": "code",
203
+ "execution_count": null,
204
+ "id": "93df7e17-4eda-4ab4-95de-8b0e7fbfed30",
205
+ "metadata": {
206
+ "ExecuteTime": {
207
+ "end_time": "2025-07-21T15:14:54.536169Z",
208
+ "start_time": "2025-07-21T15:14:54.405959Z"
209
+ }
210
+ },
211
+ "outputs": [],
212
+ "source": [
213
+ "qubit_layout = list(range(20))\n",
214
+ "for observation in result.observations:\n",
215
+ " if observation.identifier.string_identifier == str(qubit_layout):\n",
216
+ " print(f\"{observation.name}: {observation.value} +/- {observation.uncertainty}\")\n",
217
+ "result.plot_all()"
218
+ ]
219
+ }
220
+ ],
221
+ "metadata": {
222
+ "kernelspec": {
223
+ "display_name": "Python 3 (ipykernel)",
224
+ "language": "python",
225
+ "name": "python3"
226
+ },
227
+ "language_info": {
228
+ "codemirror_mode": {
229
+ "name": "ipython",
230
+ "version": 3
231
+ },
232
+ "file_extension": ".py",
233
+ "mimetype": "text/x-python",
234
+ "name": "python",
235
+ "nbconvert_exporter": "python",
236
+ "pygments_lexer": "ipython3",
237
+ "version": "3.12.12"
238
+ }
239
+ },
240
+ "nbformat": 4,
241
+ "nbformat_minor": 5
242
+ }
@@ -32,7 +32,7 @@
32
32
  "id": "61b1a1228ac49ff3",
33
33
  "metadata": {},
34
34
  "source": [
35
- "## Choose (or define) a backend"
35
+ "## Choose (or define) a backend and the token"
36
36
  ]
37
37
  },
38
38
  {
@@ -47,35 +47,41 @@
47
47
  },
48
48
  "outputs": [],
49
49
  "source": [
50
- "backend = \"fakeadonis\"\n",
51
- "# backend = \"fakeapollo\"\n",
52
- "#backend = \"garnet\"\n",
53
- "#backend = \"deneb\"\n",
54
- "#backend = \"pyrite\""
50
+ "import os\n",
51
+ "from iqm.qiskit_iqm import IQMProvider\n",
52
+ "\n",
53
+ "token = \"XXXXXXX\"\n",
54
+ "os.environ[\"IQM_TOKEN\"] = token\n",
55
+ "quantum_computer = \"qc_name\" # provide actual quantum computer name\n",
56
+ "iqm_server_url = \"iqm_server_url\" # provide actual IQM server URL\n",
57
+ "os.environ[\"IQM_SERVER_URL\"] = iqm_server_url\n",
58
+ "provider = IQMProvider(iqm_server_url, quantum_computer=quantum_computer)\n",
59
+ "backend = provider.get_backend()"
55
60
  ]
56
61
  },
57
62
  {
58
63
  "cell_type": "markdown",
59
- "id": "c5e8e58810f038b7",
64
+ "id": "619c1341",
60
65
  "metadata": {},
61
66
  "source": [
62
- "## Set IQM Token if using Resonance."
67
+ "## Define DD startegy"
63
68
  ]
64
69
  },
65
70
  {
66
71
  "cell_type": "code",
67
72
  "execution_count": null,
68
- "id": "d27a0f6a5b492fc8",
69
- "metadata": {
70
- "ExecuteTime": {
71
- "end_time": "2025-01-08T19:52:55.789229Z",
72
- "start_time": "2025-01-08T19:52:55.776713Z"
73
- }
74
- },
73
+ "id": "7a9f437e",
74
+ "metadata": {},
75
75
  "outputs": [],
76
76
  "source": [
77
- "import os\n",
78
- "os.environ[\"IQM_TOKEN\"] = \"XXXXXXXXXXXXXX\""
77
+ "from iqm.iqm_client.models import DDStrategy\n",
78
+ "\n",
79
+ "# Define DD strategy\n",
80
+ "strategy = DDStrategy(gate_sequences=[(2, 'XX', 'center')], target_qubits = None)\n",
81
+ "\n",
82
+ "print(f\"Minimal dynamical decoupling strategy:\")\n",
83
+ "for k, v in strategy.__dict__.items():\n",
84
+ " print(f\"\\t{k}: {v}\")"
79
85
  ]
80
86
  },
81
87
  {
@@ -98,24 +104,23 @@
98
104
  },
99
105
  "outputs": [],
100
106
  "source": [
107
+ "min_num_nodes = 6 # minimum number of nodes in the graph\n",
108
+ "max_num_nodes = 10 # maximum number of nodes in the graph]\n",
101
109
  "EXAMPLE_QSCORE = QScoreConfiguration(\n",
102
- " num_instances = 100,\n",
103
- " num_qaoa_layers= 1,\n",
104
- " shots = 10000,\n",
105
- " calset_id=None, # calibration set ID, default is None\n",
106
- " min_num_nodes = 3,\n",
107
- " max_num_nodes= 5, # put it to run for all the node sizes\n",
108
- " use_virtual_node = True,\n",
109
- " use_classically_optimized_angles = True,\n",
110
- " choose_qubits_routine = \"custom\",\n",
111
- " custom_qubits_array=[\n",
112
- " [2, 0, 1],\n",
113
- " [2, 0, 1, 3],\n",
114
- " [2, 0, 1, 3, 4]],\n",
115
- " seed = random.randint(1, 999999),\n",
116
- " REM = True,\n",
117
- " mit_shots=1000,\n",
118
- " num_trials=1, # number of trials per instance to improve transpilation robustness\n",
110
+ " num_instances = 100, # number of graph instances to run\n",
111
+ " num_qaoa_layers= 1, # number of QAOA layers (depth of the QAOA circuit). Usually is set to 1 for QScore benchmark.\n",
112
+ " shots = 2048, # number of shots per instance\n",
113
+ " min_num_nodes = min_num_nodes, # minimum number of nodes in the graph\n",
114
+ " max_num_nodes= max_num_nodes, # maximum number of nodes in the graph\n",
115
+ " use_virtual_node = True, # whether to use a virtual node in the graph (works only for depth 1 QAOA)\n",
116
+ " use_classically_optimized_angles = True, # whether to use classically optimized angles or use\n",
117
+ " choose_qubits_routine = \"naive\", # routine to choose qubits for the QAOA circuit, \"naive\" is the default selection, while \"custom\" allows for custom qubit selection\n",
118
+ " custom_qubits_array=None, # custom qubits array, only used if choose_qubits_routine is set to \"custom\"\n",
119
+ " seed = random.randint(1, 999999), # random seed for reproducibility\n",
120
+ " REM = True, # whether to use the readout error mitigation protocol\n",
121
+ " mit_shots=1000, # number of shots for the readout error mitigation protocol\n",
122
+ " use_dd = False, # whether to use dynamical decoupling\n",
123
+ " dd_strategy = strategy, # dynamical decoupling strategy\n",
119
124
  " )"
120
125
  ]
121
126
  },
@@ -199,7 +204,7 @@
199
204
  ],
200
205
  "metadata": {
201
206
  "kernelspec": {
202
- "display_name": "env-iqm-benchmarks",
207
+ "display_name": ".conda",
203
208
  "language": "python",
204
209
  "name": "python3"
205
210
  },
@@ -24,39 +24,51 @@
24
24
  "id": "b2c63962f3ca4618",
25
25
  "metadata": {},
26
26
  "source": [
27
- "## Choose (or define) a backend"
27
+ "## Choose (or define) a backend and initialise token"
28
28
  ]
29
29
  },
30
30
  {
31
31
  "cell_type": "code",
32
- "execution_count": 2,
32
+ "execution_count": null,
33
33
  "id": "bd04e92bc8bc6d22",
34
34
  "metadata": {},
35
35
  "outputs": [],
36
36
  "source": [
37
- "#backend = \"fakeadonis\"\n",
38
- "backend = \"fakeapollo\"\n",
39
- "#backend = \"garnet\"\n",
40
- "#backend = \"deneb\""
37
+ "import os\n",
38
+ "from iqm.qiskit_iqm import IQMProvider\n",
39
+ "\n",
40
+ "token = \"XXXXXXX\"\n",
41
+ "os.environ[\"IQM_TOKEN\"] = token\n",
42
+ "quantum_computer = \"qc_name\" # provide actual quantum computer name\n",
43
+ "iqm_server_url = \"iqm_server_url\" # provide actual IQM server URL\n",
44
+ "os.environ[\"IQM_SERVER_URL\"] = iqm_server_url\n",
45
+ "provider = IQMProvider(iqm_server_url, quantum_computer=quantum_computer)\n",
46
+ "backend = provider.get_backend()"
41
47
  ]
42
48
  },
43
49
  {
44
50
  "cell_type": "markdown",
45
- "id": "24a83603a9b243f4",
51
+ "id": "850d5144",
46
52
  "metadata": {},
47
53
  "source": [
48
- "## Set IQM Token if using Resonance."
54
+ "## Customising DD"
49
55
  ]
50
56
  },
51
57
  {
52
58
  "cell_type": "code",
53
- "execution_count": 3,
54
- "id": "249d8974af559964",
59
+ "execution_count": null,
60
+ "id": "ae95bb25",
55
61
  "metadata": {},
56
62
  "outputs": [],
57
63
  "source": [
58
- "# import os\n",
59
- "# os.environ[\"IQM_TOKEN\"] = \"\""
64
+ "from iqm.iqm_client.models import DDStrategy\n",
65
+ "\n",
66
+ "# Define DD strategy\n",
67
+ "strategy = DDStrategy(gate_sequences=[(2, 'XX', 'center')], target_qubits = None)\n",
68
+ "\n",
69
+ "print(f\"Minimal dynamical decoupling strategy:\")\n",
70
+ "for k, v in strategy.__dict__.items():\n",
71
+ " print(f\"\\t{k}: {v}\")"
60
72
  ]
61
73
  },
62
74
  {
@@ -79,7 +91,7 @@
79
91
  },
80
92
  {
81
93
  "cell_type": "code",
82
- "execution_count": 5,
94
+ "execution_count": null,
83
95
  "id": "1072ddc990ea37e1",
84
96
  "metadata": {},
85
97
  "outputs": [],
@@ -87,17 +99,14 @@
87
99
  "EXAMPLE_QV = QuantumVolumeConfiguration(\n",
88
100
  " num_circuits=500,\n",
89
101
  " shots=2**8,\n",
90
- " calset_id=None,\n",
91
102
  " num_sigmas=2,\n",
92
103
  " choose_qubits_routine=\"custom\",\n",
93
104
  " custom_qubits_array=[[0,1,2,3], [0,1,3,4]],\n",
94
- " qiskit_optim_level=3,\n",
95
- " optimize_sqg=True,\n",
96
- " routing_method=\"sabre\",\n",
97
- " physical_layout=\"fixed\",\n",
98
- " max_gates_per_batch=60_000,\n",
105
+ " max_gates_per_batch=10_000,\n",
99
106
  " rem=True,\n",
100
107
  " mit_shots=1_000,\n",
108
+ " dd_strategy=strategy,\n",
109
+ " use_dd=True,\n",
101
110
  ")"
102
111
  ]
103
112
  },
@@ -974,7 +983,7 @@
974
983
  ],
975
984
  "metadata": {
976
985
  "kernelspec": {
977
- "display_name": "env-iqm-benchmarks",
986
+ "display_name": ".conda",
978
987
  "language": "python",
979
988
  "name": "python3"
980
989
  },
@@ -988,7 +997,7 @@
988
997
  "name": "python",
989
998
  "nbconvert_exporter": "python",
990
999
  "pygments_lexer": "ipython3",
991
- "version": "3.11.2"
1000
+ "version": "3.11.14"
992
1001
  }
993
1002
  },
994
1003
  "nbformat": 4,
@@ -792,10 +792,10 @@ class GHZBenchmark(Benchmark):
792
792
  qc_phase = qc.copy()
793
793
  qc_phase.barrier()
794
794
  for _, qubit in enumerate(qubit_layout):
795
- qc_phase.p(phase, qubit + 1)
795
+ qc_phase.p(phase, qubit)
796
796
  qc_phase.barrier()
797
797
  qc_phase.compose(qc_inv, inplace=True)
798
- qc_phase.measure([q + 1 for q in qubit_layout], list(range(qubit_count)))
798
+ qc_phase.measure(qubit_layout, list(range(qubit_count)))
799
799
  qc_list.append(qc_phase)
800
800
  else:
801
801
  qc_inv = qc.inverse()
@@ -22,7 +22,6 @@ from typing import Any, Dict, List, Literal, Optional, Sequence, Type
22
22
  from matplotlib.figure import Figure
23
23
  import numpy as np
24
24
  import xarray as xr
25
- from pycparser.ply.ctokens import t_STRING
26
25
 
27
26
  from iqm.benchmarks.benchmark import BenchmarkConfigurationBase
28
27
  from iqm.benchmarks.benchmark_definition import (
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: iqm-benchmarks
3
- Version: 2.55
3
+ Version: 2.56
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