iqm-benchmarks 2.18__py3-none-any.whl → 2.20__py3-none-any.whl

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

Potentially problematic release.


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

@@ -27,6 +27,7 @@ from .benchmark_definition import (
27
27
  )
28
28
  from .circuit_containers import BenchmarkCircuit, CircuitGroup, Circuits
29
29
  from .entanglement.ghz import GHZBenchmark, GHZConfiguration
30
+ from .optimization.qscore import QScoreBenchmark, QScoreConfiguration
30
31
  from .quantum_volume.clops import CLOPSBenchmark, CLOPSConfiguration
31
32
  from .quantum_volume.quantum_volume import QuantumVolumeBenchmark, QuantumVolumeConfiguration
32
33
  from .randomized_benchmarking.clifford_rb.clifford_rb import CliffordRandomizedBenchmarking, CliffordRBConfiguration
@@ -44,6 +45,7 @@ AVAILABLE_BENCHMARKS = {
44
45
  CliffordRandomizedBenchmarking.name: CliffordRandomizedBenchmarking,
45
46
  InterleavedRandomizedBenchmarking.name: InterleavedRandomizedBenchmarking,
46
47
  MirrorRandomizedBenchmarking.name: MirrorRandomizedBenchmarking,
48
+ QScoreBenchmark.name: QScoreBenchmark,
47
49
  }
48
50
 
49
51
  try:
@@ -30,7 +30,12 @@ import xarray as xr
30
30
 
31
31
  from iqm.benchmarks import Benchmark
32
32
  from iqm.benchmarks.benchmark import BenchmarkConfigurationBase
33
- from iqm.benchmarks.benchmark_definition import BenchmarkAnalysisResult, BenchmarkRunResult
33
+ from iqm.benchmarks.benchmark_definition import (
34
+ BenchmarkAnalysisResult,
35
+ BenchmarkObservation,
36
+ BenchmarkObservationIdentifier,
37
+ BenchmarkRunResult,
38
+ )
34
39
  from iqm.benchmarks.circuit_containers import BenchmarkCircuit, CircuitGroup, Circuits
35
40
  from iqm.benchmarks.logging_config import qcvv_logger
36
41
  from iqm.benchmarks.utils import (
@@ -232,11 +237,12 @@ def clops_analysis(run: BenchmarkRunResult) -> BenchmarkAnalysisResult:
232
237
  AnalysisResult corresponding to CLOPS
233
238
  """
234
239
  plots: Dict[str, Any] = {}
235
- observations = {}
240
+ obs_dict = {}
236
241
  dataset = run.dataset
237
242
 
238
243
  # Retrieve dataset values
239
244
  # backend_name = dataset.attrs["backend_configuration_name"]
245
+ qubits = dataset.attrs["qubits"]
240
246
  num_circuits = dataset.attrs["num_circuits"]
241
247
  num_updates = dataset.attrs["num_updates"]
242
248
  num_shots = dataset.attrs["num_shots"]
@@ -291,7 +297,7 @@ def clops_analysis(run: BenchmarkRunResult) -> BenchmarkAnalysisResult:
291
297
  )
292
298
 
293
299
  # UPDATE OBSERVATIONS
294
- observations.update({1: processed_results})
300
+ obs_dict.update({1: processed_results})
295
301
 
296
302
  # PLOT
297
303
  # Get all execution elapsed times
@@ -305,7 +311,7 @@ def clops_analysis(run: BenchmarkRunResult) -> BenchmarkAnalysisResult:
305
311
  else:
306
312
  qcvv_logger.info(f'\t"{k}": {overall_elapsed[k]:.2f} sec')
307
313
 
308
- fig_name, fig = plot_times(dataset, observations)
314
+ fig_name, fig = plot_times(dataset, obs_dict)
309
315
  plots[fig_name] = fig
310
316
  else:
311
317
  qcvv_logger.info("There is no elapsed-time data associated to jobs (e.g., execution on simulator)")
@@ -313,6 +319,11 @@ def clops_analysis(run: BenchmarkRunResult) -> BenchmarkAnalysisResult:
313
319
  # Sort the final dataset
314
320
  dataset.attrs = dict(sorted(dataset.attrs.items()))
315
321
 
322
+ observations = [
323
+ BenchmarkObservation(name="clops_v", value=int(clops_v), identifier=BenchmarkObservationIdentifier(qubits)),
324
+ BenchmarkObservation(name="clops_h", value=int(clops_h), identifier=BenchmarkObservationIdentifier(qubits)),
325
+ ]
326
+
316
327
  return BenchmarkAnalysisResult(dataset=dataset, plots=plots, observations=observations)
317
328
 
318
329
 
@@ -15,7 +15,12 @@ from qiskit_aer import Aer, AerSimulator
15
15
  from scipy.spatial.distance import hamming
16
16
  import xarray as xr
17
17
 
18
- from iqm.benchmarks import BenchmarkAnalysisResult, BenchmarkRunResult
18
+ from iqm.benchmarks import (
19
+ BenchmarkAnalysisResult,
20
+ BenchmarkObservation,
21
+ BenchmarkObservationIdentifier,
22
+ BenchmarkRunResult,
23
+ )
19
24
  from iqm.benchmarks.benchmark import BenchmarkConfigurationBase
20
25
  from iqm.benchmarks.benchmark_definition import Benchmark, add_counts_to_dataset
21
26
  from iqm.benchmarks.circuit_containers import BenchmarkCircuit, CircuitGroup, Circuits
@@ -431,7 +436,8 @@ def mrb_analysis(run: BenchmarkRunResult) -> BenchmarkAnalysisResult:
431
436
  AnalysisResult corresponding to MRB
432
437
  """
433
438
  plots = {}
434
- observations = {}
439
+ obs_dict = {}
440
+ observations: list[BenchmarkObservation] = []
435
441
  dataset = run.dataset.copy(deep=True)
436
442
 
437
443
  # shots = dataset.attrs["shots"]
@@ -539,25 +545,36 @@ def mrb_analysis(run: BenchmarkRunResult) -> BenchmarkAnalysisResult:
539
545
  )
540
546
 
541
547
  # Update observations
542
- observations.update({qubits_idx: processed_results})
548
+ obs_dict.update({qubits_idx: processed_results})
543
549
 
544
550
  # Generate plots
545
551
  fig_name, fig = plot_rb_decay(
546
552
  "mrb",
547
553
  [qubits],
548
554
  dataset,
549
- observations,
555
+ obs_dict,
550
556
  mrb_2q_density=density_2q_gates,
551
557
  mrb_2q_ensemble=two_qubit_gate_ensemble,
552
558
  )
553
559
  plots[fig_name] = fig
554
560
 
561
+ observations.extend(
562
+ [
563
+ BenchmarkObservation(
564
+ name="decay_rate",
565
+ identifier=BenchmarkObservationIdentifier(qubits),
566
+ value=popt["decay_rate"].value,
567
+ uncertainty=popt["decay_rate"].stderr,
568
+ )
569
+ ]
570
+ )
571
+
555
572
  # Generate the combined plot
556
573
  fig_name, fig = plot_rb_decay(
557
574
  "mrb",
558
575
  qubits_array,
559
576
  dataset,
560
- observations,
577
+ obs_dict,
561
578
  mrb_2q_density=density_2q_gates,
562
579
  mrb_2q_ensemble=two_qubit_gate_ensemble,
563
580
  )
@@ -198,29 +198,20 @@ class M3IQM(mthree.M3Mitigation):
198
198
  trans_qcs[(num_jobs - 1) * circ_slice :]
199
199
  ]
200
200
  # Do job submission here
201
- # This Backend check is here for Qiskit direct access. Should be removed later.
202
201
  jobs = []
203
- if not isinstance(self.system, Backend):
204
- for circs in circs_list:
205
- transpiled_circuit = transpile(circs, self.system, optimization_level=0)
202
+ for circs in circs_list:
203
+ transpiled_circuit = transpile(circs, self.system, optimization_level=0)
204
+ if cal_id is None:
206
205
  _job = self.system.run(transpiled_circuit, shots=shots, rep_delay=self.rep_delay)
207
- jobs.append(_job)
208
-
209
- # *****************************************
210
- else: # That's what IQM backend do!
211
- # *****************************************
212
- for circs in circs_list:
213
- if cal_id is None:
214
- _job = self.system.run(circs, shots=shots, rep_delay=self.rep_delay)
215
- else:
216
- _job = self.system.run(
217
- circs,
218
- shots=shots,
219
- rep_delay=self.rep_delay,
220
- calibration_set_id=cal_id,
221
- )
222
- jobs.append(_job)
223
- qcvv_logger.info(f"REM: {len(circs)} calibration circuits to be executed!")
206
+ else:
207
+ _job = self.system.run(
208
+ transpiled_circuit,
209
+ shots=shots,
210
+ rep_delay=self.rep_delay,
211
+ calibration_set_id=cal_id,
212
+ )
213
+ jobs.append(_job)
214
+ qcvv_logger.info(f"REM: {len(circs)} calibration circuits to be executed!")
224
215
 
225
216
  # Execute job and cal building in new thread.
226
217
  self._job_error = None
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: iqm-benchmarks
3
- Version: 2.18
3
+ Version: 2.20
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>, 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>
6
6
  Project-URL: Homepage, https://github.com/iqm-finland/iqm-benchmarks
@@ -1,9 +1,9 @@
1
- iqm/benchmarks/__init__.py,sha256=Hc0oxTTjCA2QlLJeD7lBBt84l1tFbAF5WkAhP92JmgA,2525
1
+ iqm/benchmarks/__init__.py,sha256=8SRHlADqZjlP8PtbKTMvu-ejpcEZkW8cPmgW8GVKJg8,2638
2
2
  iqm/benchmarks/benchmark.py,sha256=SGhBcSxLPUu-cVXAjG4Db2TRobFCRBYoE1NtTDK1lJg,4432
3
3
  iqm/benchmarks/benchmark_definition.py,sha256=AZkvANrf0_0glbq_P_uo_YqbBU9IZa2gJlMVz6qT6VU,10500
4
4
  iqm/benchmarks/circuit_containers.py,sha256=anEtZEsodYqOX-34oZRmuKGeEpp_VfgG5045Mz4-4hI,7562
5
5
  iqm/benchmarks/logging_config.py,sha256=U7olP5Kr75AcLJqNODf9VBhJLVqIvA4AYR6J39D5rww,1052
6
- iqm/benchmarks/readout_mitigation.py,sha256=7FlbSH-RJTtQuRYLChwkQV_vBv0ZfMQTH519cAbyxQ4,12252
6
+ iqm/benchmarks/readout_mitigation.py,sha256=HLRka3LAlOiH0XdsQCAXmU1K8QVAbG29O_WJj1qv1Dg,11765
7
7
  iqm/benchmarks/utils.py,sha256=wOgf8x1Z-DsVUL5KQSaKXjGDXDBSvhmwg4Qo-vTOoo0,21172
8
8
  iqm/benchmarks/compressive_gst/__init__.py,sha256=LneifgYXtcwo2jcXo7GdUEHL6_peipukShhkrdaTRCA,929
9
9
  iqm/benchmarks/compressive_gst/compressive_gst.py,sha256=spq6jP0NLbjaJDzESpbfRPs0N_YheFWl2Wa6USHS5sI,22398
@@ -13,7 +13,7 @@ iqm/benchmarks/entanglement/ghz.py,sha256=0C3zppwGGn_gIkxRWkV_mYqpkygZsu1Ap-xV9P
13
13
  iqm/benchmarks/optimization/__init__.py,sha256=_ajW_OibYLCtzU5AUv5c2zuuVYn8ZNeZUcUUSIGt51M,747
14
14
  iqm/benchmarks/optimization/qscore.py,sha256=xAv97MRVUNB_YjRbxzM6Ph0Pz0ctJjSA46J9lrbwe-w,37541
15
15
  iqm/benchmarks/quantum_volume/__init__.py,sha256=i-Q4SpDWELBw7frXnxm1j4wJRcxbIyrS5uEK_v06YHo,951
16
- iqm/benchmarks/quantum_volume/clops.py,sha256=aLxq2sC6cvRmtbmgr7TvluE2edkARH_ZzpTD1LEQEjw,30957
16
+ iqm/benchmarks/quantum_volume/clops.py,sha256=abuYvc7XaRTuqLDim9jwZvG_W_KybEbiBs6SD0JUtcA,31319
17
17
  iqm/benchmarks/quantum_volume/quantum_volume.py,sha256=njX5lBty9jcWMuJnl7uNqRfwE9akMe5gcX-f1_uYDXk,36791
18
18
  iqm/benchmarks/randomized_benchmarking/__init__.py,sha256=IkKo-7zUChxZZd3my_csQCJfJfZNsV3-JTvdG8uqys4,734
19
19
  iqm/benchmarks/randomized_benchmarking/clifford_1q.pkl,sha256=vvSd0pRWxtzyirohO9yf_58mjevkc2-pbuWIEb-4gaw,46928
@@ -25,7 +25,7 @@ iqm/benchmarks/randomized_benchmarking/clifford_rb/clifford_rb.py,sha256=v8GDsEC
25
25
  iqm/benchmarks/randomized_benchmarking/interleaved_rb/__init__.py,sha256=sq6MgN_hwlpkOj10vyCU4e6eKSX-oLcF2L9na6W2Gt4,681
26
26
  iqm/benchmarks/randomized_benchmarking/interleaved_rb/interleaved_rb.py,sha256=4hBjIXxqy18WKC8hgpCU6T6Vv2cvJu4AImj7QQDqI1k,27956
27
27
  iqm/benchmarks/randomized_benchmarking/mirror_rb/__init__.py,sha256=ZekEqI_89nXzGO1vjM-b5Uwwicy59M4fYHXfA-f0MIg,674
28
- iqm/benchmarks/randomized_benchmarking/mirror_rb/mirror_rb.py,sha256=hAAvuQPmIBELeqLu-d33gIEAKTk57M8EB8vMUQkXXfI,34376
28
+ iqm/benchmarks/randomized_benchmarking/mirror_rb/mirror_rb.py,sha256=XYJpfXHeN4PtkiuoCQeyRQIeaKr1PxFNasBjLs2ns7k,34830
29
29
  mGST/LICENSE,sha256=TtHNq55cUcbglb7uhVudeBLUh_qPdUoAEvU0BBwFz-k,1098
30
30
  mGST/README.md,sha256=v_5kw253csHF4-RfE-44KqFmBXIsSMRmOtN0AUPrRxE,5050
31
31
  mGST/additional_fns.py,sha256=_SEJ10FRNM7_CroysT8hCLZTfpm6ZhEIDCY5zPTnhjo,31390
@@ -36,8 +36,8 @@ mGST/optimization.py,sha256=YHwkzIkYvsZOPjclR-BCQWh24jeqjuXp0BB0WX5Lwow,10559
36
36
  mGST/qiskit_interface.py,sha256=L4H-4SdhP_bjSFFvpQoF1E7EyGbIJ_CI_y4a7_YEwmU,10102
37
37
  mGST/reporting/figure_gen.py,sha256=6Xd8vwfy09hLY1YbJY6TRevuMsQSU4MsWqemly3ZO0I,12970
38
38
  mGST/reporting/reporting.py,sha256=We1cccz9BKbITYcSlZHdmBGdjMWAa1xNZe5tKP-yh_E,26004
39
- iqm_benchmarks-2.18.dist-info/LICENSE,sha256=2Ncb40-hqkTil78RPv3-YiJfKaJ8te9USJgliKqIdSY,11558
40
- iqm_benchmarks-2.18.dist-info/METADATA,sha256=DiZ2lOWS1NBVzisiu-Np0_87IOPKlE7p2P8sDczp4LA,10286
41
- iqm_benchmarks-2.18.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
42
- iqm_benchmarks-2.18.dist-info/top_level.txt,sha256=3G23Z-1LGf-IOzTCUl6QwWqiQ3USz25Zt90Ihq192to,9
43
- iqm_benchmarks-2.18.dist-info/RECORD,,
39
+ iqm_benchmarks-2.20.dist-info/LICENSE,sha256=2Ncb40-hqkTil78RPv3-YiJfKaJ8te9USJgliKqIdSY,11558
40
+ iqm_benchmarks-2.20.dist-info/METADATA,sha256=HhQLzBlngrxoF65yMzVD9QLeM7tDu739f6UzPgFuxDw,10286
41
+ iqm_benchmarks-2.20.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
42
+ iqm_benchmarks-2.20.dist-info/top_level.txt,sha256=3G23Z-1LGf-IOzTCUl6QwWqiQ3USz25Zt90Ihq192to,9
43
+ iqm_benchmarks-2.20.dist-info/RECORD,,