iqm-benchmarks 2.20__tar.gz → 2.21__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 (98) hide show
  1. {iqm_benchmarks-2.20 → iqm_benchmarks-2.21}/CHANGELOG.rst +4 -0
  2. {iqm_benchmarks-2.20/src/iqm_benchmarks.egg-info → iqm_benchmarks-2.21}/PKG-INFO +2 -2
  3. {iqm_benchmarks-2.20 → iqm_benchmarks-2.21}/pyproject.toml +8 -6
  4. {iqm_benchmarks-2.20 → iqm_benchmarks-2.21}/src/iqm/benchmarks/entanglement/ghz.py +1 -1
  5. {iqm_benchmarks-2.20 → iqm_benchmarks-2.21}/src/iqm/benchmarks/readout_mitigation.py +1 -1
  6. {iqm_benchmarks-2.20 → iqm_benchmarks-2.21}/src/iqm/benchmarks/utils.py +49 -0
  7. {iqm_benchmarks-2.20 → iqm_benchmarks-2.21/src/iqm_benchmarks.egg-info}/PKG-INFO +2 -2
  8. {iqm_benchmarks-2.20 → iqm_benchmarks-2.21}/tests/test_rb.py +2 -2
  9. {iqm_benchmarks-2.20 → iqm_benchmarks-2.21}/.github/workflows/main.yml +0 -0
  10. {iqm_benchmarks-2.20 → iqm_benchmarks-2.21}/.github/workflows/publish.yml +0 -0
  11. {iqm_benchmarks-2.20 → iqm_benchmarks-2.21}/.github/workflows/tag_and_release.yml +0 -0
  12. {iqm_benchmarks-2.20 → iqm_benchmarks-2.21}/.gitignore +0 -0
  13. {iqm_benchmarks-2.20 → iqm_benchmarks-2.21}/LICENSE +0 -0
  14. {iqm_benchmarks-2.20 → iqm_benchmarks-2.21}/MANIFEST.in +0 -0
  15. {iqm_benchmarks-2.20 → iqm_benchmarks-2.21}/README.md +0 -0
  16. {iqm_benchmarks-2.20 → iqm_benchmarks-2.21}/benchmark_runner.py +0 -0
  17. {iqm_benchmarks-2.20 → iqm_benchmarks-2.21}/docbuild +0 -0
  18. {iqm_benchmarks-2.20 → iqm_benchmarks-2.21}/docs/API.rst +0 -0
  19. {iqm_benchmarks-2.20 → iqm_benchmarks-2.21}/docs/Makefile +0 -0
  20. {iqm_benchmarks-2.20 → iqm_benchmarks-2.21}/docs/_static/images/favicon.ico +0 -0
  21. {iqm_benchmarks-2.20 → iqm_benchmarks-2.21}/docs/_static/images/logo.png +0 -0
  22. {iqm_benchmarks-2.20 → iqm_benchmarks-2.21}/docs/_templates/autosummary-class-template.rst +0 -0
  23. {iqm_benchmarks-2.20 → iqm_benchmarks-2.21}/docs/_templates/autosummary-module-template.rst +0 -0
  24. {iqm_benchmarks-2.20 → iqm_benchmarks-2.21}/docs/changelog.rst +0 -0
  25. {iqm_benchmarks-2.20 → iqm_benchmarks-2.21}/docs/conf.py +0 -0
  26. {iqm_benchmarks-2.20 → iqm_benchmarks-2.21}/docs/development/development.rst +0 -0
  27. {iqm_benchmarks-2.20 → iqm_benchmarks-2.21}/docs/development/generate_2qubit_cliffords.ipynb +0 -0
  28. {iqm_benchmarks-2.20 → iqm_benchmarks-2.21}/docs/development/how_to_make_your_own_benchmark.ipynb +0 -0
  29. {iqm_benchmarks-2.20 → iqm_benchmarks-2.21}/docs/devices/devices.rst +0 -0
  30. {iqm_benchmarks-2.20 → iqm_benchmarks-2.21}/docs/devices/spark.ipynb +0 -0
  31. {iqm_benchmarks-2.20 → iqm_benchmarks-2.21}/docs/devices/star.ipynb +0 -0
  32. {iqm_benchmarks-2.20 → iqm_benchmarks-2.21}/docs/examples/example_clifford_rb.ipynb +0 -0
  33. {iqm_benchmarks-2.20 → iqm_benchmarks-2.21}/docs/examples/example_clops.ipynb +0 -0
  34. {iqm_benchmarks-2.20 → iqm_benchmarks-2.21}/docs/examples/example_experiment_all.ipynb +0 -0
  35. {iqm_benchmarks-2.20 → iqm_benchmarks-2.21}/docs/examples/example_ghz.ipynb +0 -0
  36. {iqm_benchmarks-2.20 → iqm_benchmarks-2.21}/docs/examples/example_ghz_deneb.ipynb +0 -0
  37. {iqm_benchmarks-2.20 → iqm_benchmarks-2.21}/docs/examples/example_gst.ipynb +0 -0
  38. {iqm_benchmarks-2.20 → iqm_benchmarks-2.21}/docs/examples/example_interleaved_rb.ipynb +0 -0
  39. {iqm_benchmarks-2.20 → iqm_benchmarks-2.21}/docs/examples/example_mirror_rb.ipynb +0 -0
  40. {iqm_benchmarks-2.20 → iqm_benchmarks-2.21}/docs/examples/example_qscore.ipynb +0 -0
  41. {iqm_benchmarks-2.20 → iqm_benchmarks-2.21}/docs/examples/example_quantum_volume.ipynb +0 -0
  42. {iqm_benchmarks-2.20 → iqm_benchmarks-2.21}/docs/examples/example_quantum_volume_deneb.ipynb +0 -0
  43. {iqm_benchmarks-2.20 → iqm_benchmarks-2.21}/docs/examples/examples.rst +0 -0
  44. {iqm_benchmarks-2.20 → iqm_benchmarks-2.21}/docs/index.rst +0 -0
  45. {iqm_benchmarks-2.20 → iqm_benchmarks-2.21}/docs/license.rst +0 -0
  46. {iqm_benchmarks-2.20 → iqm_benchmarks-2.21}/docs/readme.md +0 -0
  47. {iqm_benchmarks-2.20 → iqm_benchmarks-2.21}/format +0 -0
  48. {iqm_benchmarks-2.20 → iqm_benchmarks-2.21}/requirements.txt +0 -0
  49. {iqm_benchmarks-2.20 → iqm_benchmarks-2.21}/scheduled_experiments/adonis/__init__.py +0 -0
  50. {iqm_benchmarks-2.20 → iqm_benchmarks-2.21}/scheduled_experiments/adonis/weekly.py +0 -0
  51. {iqm_benchmarks-2.20 → iqm_benchmarks-2.21}/setup.cfg +0 -0
  52. {iqm_benchmarks-2.20 → iqm_benchmarks-2.21}/src/iqm/benchmarks/__init__.py +0 -0
  53. {iqm_benchmarks-2.20 → iqm_benchmarks-2.21}/src/iqm/benchmarks/benchmark.py +0 -0
  54. {iqm_benchmarks-2.20 → iqm_benchmarks-2.21}/src/iqm/benchmarks/benchmark_definition.py +0 -0
  55. {iqm_benchmarks-2.20 → iqm_benchmarks-2.21}/src/iqm/benchmarks/circuit_containers.py +0 -0
  56. {iqm_benchmarks-2.20 → iqm_benchmarks-2.21}/src/iqm/benchmarks/compressive_gst/__init__.py +0 -0
  57. {iqm_benchmarks-2.20 → iqm_benchmarks-2.21}/src/iqm/benchmarks/compressive_gst/compressive_gst.py +0 -0
  58. {iqm_benchmarks-2.20 → iqm_benchmarks-2.21}/src/iqm/benchmarks/compressive_gst/gst_analysis.py +0 -0
  59. {iqm_benchmarks-2.20 → iqm_benchmarks-2.21}/src/iqm/benchmarks/entanglement/__init__.py +0 -0
  60. {iqm_benchmarks-2.20 → iqm_benchmarks-2.21}/src/iqm/benchmarks/logging_config.py +0 -0
  61. {iqm_benchmarks-2.20 → iqm_benchmarks-2.21}/src/iqm/benchmarks/optimization/__init__.py +0 -0
  62. {iqm_benchmarks-2.20 → iqm_benchmarks-2.21}/src/iqm/benchmarks/optimization/qscore.py +0 -0
  63. {iqm_benchmarks-2.20 → iqm_benchmarks-2.21}/src/iqm/benchmarks/quantum_volume/__init__.py +0 -0
  64. {iqm_benchmarks-2.20 → iqm_benchmarks-2.21}/src/iqm/benchmarks/quantum_volume/clops.py +0 -0
  65. {iqm_benchmarks-2.20 → iqm_benchmarks-2.21}/src/iqm/benchmarks/quantum_volume/quantum_volume.py +0 -0
  66. {iqm_benchmarks-2.20 → iqm_benchmarks-2.21}/src/iqm/benchmarks/randomized_benchmarking/__init__.py +0 -0
  67. {iqm_benchmarks-2.20 → iqm_benchmarks-2.21}/src/iqm/benchmarks/randomized_benchmarking/clifford_1q.pkl +0 -0
  68. {iqm_benchmarks-2.20 → iqm_benchmarks-2.21}/src/iqm/benchmarks/randomized_benchmarking/clifford_2q.pkl +0 -0
  69. {iqm_benchmarks-2.20 → iqm_benchmarks-2.21}/src/iqm/benchmarks/randomized_benchmarking/clifford_rb/__init__.py +0 -0
  70. {iqm_benchmarks-2.20 → iqm_benchmarks-2.21}/src/iqm/benchmarks/randomized_benchmarking/clifford_rb/clifford_rb.py +0 -0
  71. {iqm_benchmarks-2.20 → iqm_benchmarks-2.21}/src/iqm/benchmarks/randomized_benchmarking/interleaved_rb/__init__.py +0 -0
  72. {iqm_benchmarks-2.20 → iqm_benchmarks-2.21}/src/iqm/benchmarks/randomized_benchmarking/interleaved_rb/interleaved_rb.py +0 -0
  73. {iqm_benchmarks-2.20 → iqm_benchmarks-2.21}/src/iqm/benchmarks/randomized_benchmarking/mirror_rb/__init__.py +0 -0
  74. {iqm_benchmarks-2.20 → iqm_benchmarks-2.21}/src/iqm/benchmarks/randomized_benchmarking/mirror_rb/mirror_rb.py +0 -0
  75. {iqm_benchmarks-2.20 → iqm_benchmarks-2.21}/src/iqm/benchmarks/randomized_benchmarking/multi_lmfit.py +0 -0
  76. {iqm_benchmarks-2.20 → iqm_benchmarks-2.21}/src/iqm/benchmarks/randomized_benchmarking/randomized_benchmarking_common.py +0 -0
  77. {iqm_benchmarks-2.20 → iqm_benchmarks-2.21}/src/iqm_benchmarks.egg-info/SOURCES.txt +0 -0
  78. {iqm_benchmarks-2.20 → iqm_benchmarks-2.21}/src/iqm_benchmarks.egg-info/dependency_links.txt +0 -0
  79. {iqm_benchmarks-2.20 → iqm_benchmarks-2.21}/src/iqm_benchmarks.egg-info/requires.txt +0 -0
  80. {iqm_benchmarks-2.20 → iqm_benchmarks-2.21}/src/iqm_benchmarks.egg-info/top_level.txt +0 -0
  81. {iqm_benchmarks-2.20 → iqm_benchmarks-2.21}/src/mGST/LICENSE +0 -0
  82. {iqm_benchmarks-2.20 → iqm_benchmarks-2.21}/src/mGST/README.md +0 -0
  83. {iqm_benchmarks-2.20 → iqm_benchmarks-2.21}/src/mGST/additional_fns.py +0 -0
  84. {iqm_benchmarks-2.20 → iqm_benchmarks-2.21}/src/mGST/algorithm.py +0 -0
  85. {iqm_benchmarks-2.20 → iqm_benchmarks-2.21}/src/mGST/compatibility.py +0 -0
  86. {iqm_benchmarks-2.20 → iqm_benchmarks-2.21}/src/mGST/low_level_jit.py +0 -0
  87. {iqm_benchmarks-2.20 → iqm_benchmarks-2.21}/src/mGST/optimization.py +0 -0
  88. {iqm_benchmarks-2.20 → iqm_benchmarks-2.21}/src/mGST/qiskit_interface.py +0 -0
  89. {iqm_benchmarks-2.20 → iqm_benchmarks-2.21}/src/mGST/reporting/figure_gen.py +0 -0
  90. {iqm_benchmarks-2.20 → iqm_benchmarks-2.21}/src/mGST/reporting/reporting.py +0 -0
  91. {iqm_benchmarks-2.20 → iqm_benchmarks-2.21}/tag-from-pipeline.sh +0 -0
  92. {iqm_benchmarks-2.20 → iqm_benchmarks-2.21}/test +0 -0
  93. {iqm_benchmarks-2.20 → iqm_benchmarks-2.21}/tests/test_ghz.py +0 -0
  94. {iqm_benchmarks-2.20 → iqm_benchmarks-2.21}/tests/test_gst.py +0 -0
  95. {iqm_benchmarks-2.20 → iqm_benchmarks-2.21}/tests/test_qscore.py +0 -0
  96. {iqm_benchmarks-2.20 → iqm_benchmarks-2.21}/tests/test_qv.py +0 -0
  97. {iqm_benchmarks-2.20 → iqm_benchmarks-2.21}/tests/unit/test_benchmark_circuit.py +0 -0
  98. {iqm_benchmarks-2.20 → iqm_benchmarks-2.21}/update-requirements.py +0 -0
@@ -2,6 +2,10 @@
2
2
  Changelog
3
3
  =========
4
4
 
5
+ Version 2.21
6
+ ============
7
+ * Function to bootstrap counts added to utils file.
8
+
5
9
  Version 2.20
6
10
  ============
7
11
  * Standardizes observations for CLOPS and Mirror RB.
@@ -1,8 +1,8 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: iqm-benchmarks
3
- Version: 2.20
3
+ Version: 2.21
4
4
  Summary: A package for implementation of Quantum Characterization, Verification and Validation (QCVV) techniques on IQM's hardware at gate level abstraction
5
- Author-email: IQM Finland Oy <developers@meetiqm.com>, Aniket Rath <aniket.rath@meetiqm.com>, Jami Rönkkö <jami@meetiqm.com>, Pedro Figueroa Romero <pedro.romero@meetiqm.com>, Vicente Pina Canelles <vicente.pina@meetiqm.com>, Raphael Brieger <raphael.brieger@meetiqm.com>, Stefan Seegerer <stefan.seegerer@meetiqm.com>, Miikka Koistinen <miikka@meetiqm.com>, Adrian Auer <adrian.auer@meetiqm.com>, Nadia Milazzo <nadia.milazzo@meetiqm.com>
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
7
7
  Classifier: Development Status :: 4 - Beta
8
8
  Classifier: Programming Language :: Python :: 3 :: Only
@@ -15,15 +15,17 @@ dynamic = ["version"]
15
15
  description = "A package for implementation of Quantum Characterization, Verification and Validation (QCVV) techniques on IQM's hardware at gate level abstraction"
16
16
  authors = [
17
17
  {name="IQM Finland Oy", email="developers@meetiqm.com"},
18
- {name="Aniket Rath", email="aniket.rath@meetiqm.com"},
19
- {name="Jami Rönkkö", email="jami@meetiqm.com"},
20
- {name="Pedro Figueroa Romero", email="pedro.romero@meetiqm.com"},
21
- {name="Vicente Pina Canelles", email="vicente.pina@meetiqm.com"},
18
+ {name="Adrian Auer", email="adrian.auer@meetiqm.com"},
22
19
  {name="Raphael Brieger", email="raphael.brieger@meetiqm.com"},
23
- {name="Stefan Seegerer", email="stefan.seegerer@meetiqm.com"},
20
+ {name="Alessio Calzona", email="alessio.calzona@meetiqm.com"},
21
+ {name="Pedro Figueroa Romero", email="pedro.romero@meetiqm.com"},
22
+ {name="Amin Hosseinkhani", email="amin.hosseinkhani@meetiqm.com"},
24
23
  {name="Miikka Koistinen", email="miikka@meetiqm.com"},
25
- {name="Adrian Auer", email="adrian.auer@meetiqm.com"},
26
24
  {name="Nadia Milazzo", email="nadia.milazzo@meetiqm.com"},
25
+ {name="Vicente Pina Canelles", email="vicente.pina@meetiqm.com"},
26
+ {name="Aniket Rath", email="aniket.rath@meetiqm.com"},
27
+ {name="Jami Rönkkö", email="jami@meetiqm.com"},
28
+ {name="Stefan Seegerer", email="stefan.seegerer@meetiqm.com"}
27
29
  ]
28
30
  readme = "README.md"
29
31
  classifiers = [
@@ -682,7 +682,7 @@ class GHZBenchmark(Benchmark):
682
682
  )
683
683
  final_ghz = ghz_native_transpiled
684
684
  elif routine == "star":
685
- ghz: QuantumCircuit = generate_ghz_star(qubit_count)
685
+ ghz = generate_ghz_star(qubit_count)
686
686
  circuit_group.add_circuit(ghz)
687
687
  ghz_native_transpiled, _ = perform_backend_transpilation(
688
688
  [ghz],
@@ -25,7 +25,7 @@ from mthree.exceptions import M3Error
25
25
  from mthree.mitigation import _job_thread
26
26
  from mthree.utils import final_measurement_mapping
27
27
  from qiskit import transpile # pylint: disable = no-name-in-module
28
- from qiskit.providers import Backend, BackendV1, BackendV2
28
+ from qiskit.providers import BackendV1, BackendV2
29
29
 
30
30
  from iqm.benchmarks.logging_config import qcvv_logger
31
31
  from iqm.benchmarks.utils import get_iqm_backend, timeit
@@ -25,6 +25,7 @@ from typing import Any, Dict, Iterable, List, Literal, Optional, Sequence, Tuple
25
25
  from more_itertools import chunked
26
26
  from mthree.utils import final_measurement_mapping
27
27
  import numpy as np
28
+ from numpy.random import Generator
28
29
  from qiskit import ClassicalRegister, transpile
29
30
  from qiskit.converters import circuit_to_dag
30
31
  from qiskit.transpiler import CouplingMap
@@ -65,6 +66,54 @@ def timeit(f):
65
66
  return wrap
66
67
 
67
68
 
69
+ def bootstrap_counts(
70
+ original_counts: Dict[str, int],
71
+ num_bootstrap_samples: int = 100,
72
+ rgen: Optional[Generator] = None,
73
+ include_original_counts: bool = False,
74
+ ) -> List[Dict[str, int]]:
75
+ """Returns num_bootstrap_samples resampled copies of the original_counts.
76
+
77
+ Args:
78
+ original_counts (Dict[str, int]): The original dictionary of counts to bootstrap from.
79
+ num_bootstrap_samples (int): The number of bootstrapping samples to generate.
80
+ * Default is 100.
81
+ rgen (Optional[Generator]): The random number generator.
82
+ * Default is None: assigns numpy's default_rng().
83
+ include_original_counts (bool): Whether to include the original counts in the returned bootstrapped count samples.
84
+ * Default is False.
85
+ Returns:
86
+ List[Dict[str, int]]: A list of bootstrapped counts.
87
+ """
88
+ if rgen is None:
89
+ rgen = np.random.default_rng()
90
+
91
+ keys = list(original_counts.keys())
92
+ values = list(original_counts.values())
93
+ tot_shots = int(sum(values))
94
+
95
+ # Pre-calculate cumulative sum and create bins
96
+ cumulative_sum = np.cumsum(values)
97
+ bins = np.insert(cumulative_sum, 0, 0)
98
+
99
+ if include_original_counts:
100
+ bs_counts_fast = [original_counts]
101
+ else:
102
+ bs_counts_fast = []
103
+
104
+ for _ in range(num_bootstrap_samples):
105
+ # Generate random integers
106
+ random_integers = rgen.integers(low=0, high=tot_shots, size=tot_shots)
107
+ # Bin the random integers
108
+ binned_integers = np.digitize(random_integers, bins) - 1
109
+ # Count occurrences in each bin
110
+ occurrences = np.bincount(binned_integers, minlength=len(keys))
111
+ # Create dictionary mapping keys to occurrence counts
112
+ bs_counts_fast.append(dict(zip(keys, occurrences)))
113
+
114
+ return bs_counts_fast
115
+
116
+
68
117
  @timeit
69
118
  def count_2q_layers(circuit_list: List[QuantumCircuit]) -> List[int]:
70
119
  """Calculate the number of layers of parallel 2-qubit gates in a list of circuits.
@@ -1,8 +1,8 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: iqm-benchmarks
3
- Version: 2.20
3
+ Version: 2.21
4
4
  Summary: A package for implementation of Quantum Characterization, Verification and Validation (QCVV) techniques on IQM's hardware at gate level abstraction
5
- Author-email: IQM Finland Oy <developers@meetiqm.com>, Aniket Rath <aniket.rath@meetiqm.com>, Jami Rönkkö <jami@meetiqm.com>, Pedro Figueroa Romero <pedro.romero@meetiqm.com>, Vicente Pina Canelles <vicente.pina@meetiqm.com>, Raphael Brieger <raphael.brieger@meetiqm.com>, Stefan Seegerer <stefan.seegerer@meetiqm.com>, Miikka Koistinen <miikka@meetiqm.com>, Adrian Auer <adrian.auer@meetiqm.com>, Nadia Milazzo <nadia.milazzo@meetiqm.com>
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
7
7
  Classifier: Development Status :: 4 - Beta
8
8
  Classifier: Programming Language :: Python :: 3 :: Only
@@ -40,7 +40,7 @@ class TestRB:
40
40
  EXAMPLE_IRB_1Q = InterleavedRBConfiguration(
41
41
  qubits_array=[[1]],
42
42
  sequence_lengths=[2 ** (m + 1) - 1 for m in range(4)],
43
- num_circuit_samples=2,
43
+ num_circuit_samples=5,
44
44
  shots=2**4,
45
45
  parallel_execution=True,
46
46
  interleaved_gate="RGate",
@@ -55,7 +55,7 @@ class TestRB:
55
55
  EXAMPLE_CRB_1Q = CliffordRBConfiguration(
56
56
  qubits_array=[[3]],
57
57
  sequence_lengths=[2 ** (m + 1) - 1 for m in range(4)],
58
- num_circuit_samples=2,
58
+ num_circuit_samples=5,
59
59
  shots=2**4,
60
60
  calset_id=None,
61
61
  parallel_execution=False,
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes