iqm-benchmarks 2.2__py3-none-any.whl → 2.3__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.
- iqm/benchmarks/quantum_volume/quantum_volume.py +10 -11
- iqm/benchmarks/readout_mitigation.py +5 -7
- {iqm_benchmarks-2.2.dist-info → iqm_benchmarks-2.3.dist-info}/METADATA +1 -1
- {iqm_benchmarks-2.2.dist-info → iqm_benchmarks-2.3.dist-info}/RECORD +7 -7
- {iqm_benchmarks-2.2.dist-info → iqm_benchmarks-2.3.dist-info}/LICENSE +0 -0
- {iqm_benchmarks-2.2.dist-info → iqm_benchmarks-2.3.dist-info}/WHEEL +0 -0
- {iqm_benchmarks-2.2.dist-info → iqm_benchmarks-2.3.dist-info}/top_level.txt +0 -0
|
@@ -322,11 +322,10 @@ def qv_analysis(run: BenchmarkRunResult) -> BenchmarkAnalysisResult:
|
|
|
322
322
|
execution_results[str(qubits)] = xrvariable_to_counts(dataset, str(qubits), num_circuits)
|
|
323
323
|
|
|
324
324
|
# Retrieve other dataset values
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
qc_list = run.circuits["transpiled_circuits"][str(qubits)].circuits
|
|
325
|
+
sorted_qc_list_indices = dataset.attrs[qubits_idx]["sorted_qc_list_indices"]
|
|
326
|
+
qc_list = run.circuits["untranspiled_circuits"][str(qubits)].circuits
|
|
328
327
|
|
|
329
|
-
qv_results_type[str(qubits)] =
|
|
328
|
+
qv_results_type[str(qubits)] = dataset.attrs[qubits_idx]["qv_results_type"]
|
|
330
329
|
depth[str(qubits)] = len(qubits)
|
|
331
330
|
|
|
332
331
|
# Simulate the circuits and get the ideal heavy outputs
|
|
@@ -358,12 +357,14 @@ def qv_analysis(run: BenchmarkRunResult) -> BenchmarkAnalysisResult:
|
|
|
358
357
|
|
|
359
358
|
dataset.attrs[qubits_idx].update(
|
|
360
359
|
{
|
|
361
|
-
"sorted_qc_list_indices": (sorted_qc_list_indices if rem or physical_layout == "batching" else None),
|
|
362
360
|
"cumulative_average_heavy_output_probability": cumulative_hop(qv_result),
|
|
363
361
|
"cumulative_stddev_heavy_output_probability": cumulative_std(qv_result),
|
|
364
362
|
"heavy_output_probabilities": qv_result,
|
|
365
363
|
}
|
|
366
364
|
)
|
|
365
|
+
# Remove sorted_qc_list_indices from dataset if using physical_layout = "fixed"
|
|
366
|
+
if physical_layout == "fixed" and rem is None:
|
|
367
|
+
del dataset.attrs[qubits_idx]["sorted_qc_list_indices"]
|
|
367
368
|
|
|
368
369
|
fig_name, fig = plot_hop_threshold(
|
|
369
370
|
qubits,
|
|
@@ -384,12 +385,11 @@ def qv_analysis(run: BenchmarkRunResult) -> BenchmarkAnalysisResult:
|
|
|
384
385
|
mit_shots = dataset.attrs["mit_shots"]
|
|
385
386
|
rem_quasidistros = dataset.attrs["REM_quasidistributions"]
|
|
386
387
|
for qubits_idx, qubits in enumerate(qubit_layouts):
|
|
387
|
-
qcvv_logger.info(f"REM post-processing for layout {qubits}")
|
|
388
|
-
# Retrieve
|
|
389
|
-
dataset_dictionary = dataset.attrs[qubits_idx]
|
|
388
|
+
qcvv_logger.info(f"REM post-processing for layout {qubits} with {mit_shots} shots")
|
|
390
389
|
|
|
391
|
-
|
|
392
|
-
|
|
390
|
+
# Remove sorted_qc_list_indices from dataset if using physical_layout = "fixed"
|
|
391
|
+
if physical_layout == "fixed":
|
|
392
|
+
del dataset.attrs[qubits_idx]["sorted_qc_list_indices"]
|
|
393
393
|
|
|
394
394
|
qv_result_rem = get_rem_hops(
|
|
395
395
|
rem_quasidistros[f"REM_quasidist_{str(qubits)}"],
|
|
@@ -398,7 +398,6 @@ def qv_analysis(run: BenchmarkRunResult) -> BenchmarkAnalysisResult:
|
|
|
398
398
|
|
|
399
399
|
dataset.attrs[qubits_idx].update(
|
|
400
400
|
{
|
|
401
|
-
"sorted_qc_list_indices": (sorted_qc_list_indices if physical_layout == "batching" else None),
|
|
402
401
|
"REM_cumulative_average_heavy_output_probability": cumulative_hop(qv_result_rem),
|
|
403
402
|
"REM_cumulative_stddev_heavy_output_probability": cumulative_std(qv_result_rem),
|
|
404
403
|
"REM_heavy_output_probabilities": qv_result_rem,
|
|
@@ -14,7 +14,6 @@
|
|
|
14
14
|
"""M3 modification for readout mitigation at IQM QPU's."""
|
|
15
15
|
import logging
|
|
16
16
|
from math import ceil
|
|
17
|
-
import sys
|
|
18
17
|
import threading
|
|
19
18
|
from typing import Any, Dict, Iterable, List
|
|
20
19
|
import warnings
|
|
@@ -28,6 +27,7 @@ from mthree.utils import final_measurement_mapping
|
|
|
28
27
|
from qiskit import transpile # pylint: disable = no-name-in-module
|
|
29
28
|
from qiskit.providers import Backend, BackendV1, BackendV2
|
|
30
29
|
|
|
30
|
+
from iqm.benchmarks.logging_config import qcvv_logger
|
|
31
31
|
from iqm.benchmarks.utils import get_iqm_backend, timeit
|
|
32
32
|
from iqm.qiskit_iqm import IQMCircuit as QuantumCircuit
|
|
33
33
|
from iqm.qiskit_iqm.iqm_backend import IQMBackendBase
|
|
@@ -220,7 +220,7 @@ class M3IQM(mthree.M3Mitigation):
|
|
|
220
220
|
calibration_set_id=cal_id,
|
|
221
221
|
)
|
|
222
222
|
jobs.append(_job)
|
|
223
|
-
|
|
223
|
+
qcvv_logger.info(f"REM: {len(circs)} calibration circuits to be executed!")
|
|
224
224
|
|
|
225
225
|
# Execute job and cal building in new thread.
|
|
226
226
|
self._job_error = None
|
|
@@ -265,11 +265,8 @@ def apply_readout_error_mitigation(
|
|
|
265
265
|
Returns:
|
|
266
266
|
tuple[Any, Any] | tuple[QuasiCollection, list] | QuasiCollection: a list of dictionaries with REM-corrected quasiprobabilities for each outcome.
|
|
267
267
|
"""
|
|
268
|
-
# M3IQM uses mthree.mitigation, which for some reason displays many INFO messages
|
|
269
|
-
|
|
270
|
-
warnings.warn("Suppressing INFO messages from M3IQM with logging.disable(sys.maxsize) - update if problematic!")
|
|
271
|
-
logging.disable(sys.maxsize)
|
|
272
|
-
|
|
268
|
+
# M3IQM uses mthree.mitigation, which for some reason displays way too many INFO messages
|
|
269
|
+
logging.getLogger().setLevel(logging.WARN)
|
|
273
270
|
if isinstance(backend_arg, str):
|
|
274
271
|
backend = get_iqm_backend(backend_arg)
|
|
275
272
|
else:
|
|
@@ -282,5 +279,6 @@ def apply_readout_error_mitigation(
|
|
|
282
279
|
mit.cals_from_system(qubits_rem, shots=mit_shots)
|
|
283
280
|
# Apply the REM correction to the given measured counts
|
|
284
281
|
rem_quasidistro = [mit.apply_correction(c, q) for c, q in zip(counts, qubits_rem)]
|
|
282
|
+
logging.getLogger().setLevel(logging.INFO)
|
|
285
283
|
|
|
286
284
|
return rem_quasidistro
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: iqm-benchmarks
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.3
|
|
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>
|
|
6
6
|
Project-URL: Homepage, https://github.com/iqm-finland/iqm-benchmarks
|
|
@@ -4,7 +4,7 @@ iqm/benchmarks/benchmark_definition.py,sha256=AZkvANrf0_0glbq_P_uo_YqbBU9IZa2gJl
|
|
|
4
4
|
iqm/benchmarks/benchmark_experiment.py,sha256=ynbsQS92v6soIgkDEdm3ygNO7f82-dhg7qB1l8jvSFM,6614
|
|
5
5
|
iqm/benchmarks/circuit_containers.py,sha256=anEtZEsodYqOX-34oZRmuKGeEpp_VfgG5045Mz4-4hI,7562
|
|
6
6
|
iqm/benchmarks/logging_config.py,sha256=U7olP5Kr75AcLJqNODf9VBhJLVqIvA4AYR6J39D5rww,1052
|
|
7
|
-
iqm/benchmarks/readout_mitigation.py,sha256=
|
|
7
|
+
iqm/benchmarks/readout_mitigation.py,sha256=7FlbSH-RJTtQuRYLChwkQV_vBv0ZfMQTH519cAbyxQ4,12252
|
|
8
8
|
iqm/benchmarks/utils.py,sha256=BNbPeNNiFfE72Y-coVjLK3O7y7-j1Ag-l_qyBQsxXRY,20278
|
|
9
9
|
iqm/benchmarks/compressive_gst/__init__.py,sha256=4F_5YxExn4ysGQaEs-WNfm0yiFBxkKtGAYBZFWnRsSk,915
|
|
10
10
|
iqm/benchmarks/compressive_gst/compressive_gst.py,sha256=pzkqFQQXEZZJmQgwyLo2_eF3rcK3BwXAj5QfY4poczY,21206
|
|
@@ -15,7 +15,7 @@ iqm/benchmarks/optimization/__init__.py,sha256=_ajW_OibYLCtzU5AUv5c2zuuVYn8ZNeZU
|
|
|
15
15
|
iqm/benchmarks/optimization/qscore.py,sha256=pTDRrNI2kkujqb5IoaPTiq9MS8OZd9M8Gv0G2Jn3Ka0,28078
|
|
16
16
|
iqm/benchmarks/quantum_volume/__init__.py,sha256=i-Q4SpDWELBw7frXnxm1j4wJRcxbIyrS5uEK_v06YHo,951
|
|
17
17
|
iqm/benchmarks/quantum_volume/clops.py,sha256=j6BPEj1rKBAHigox7nrvaTLyb4iCrHadBl2d1yiETDA,30956
|
|
18
|
-
iqm/benchmarks/quantum_volume/quantum_volume.py,sha256=
|
|
18
|
+
iqm/benchmarks/quantum_volume/quantum_volume.py,sha256=PPg1kZA5Lx9b24iFVgP_VcgymI6CsD5LfB5Ppfk8TBM,36814
|
|
19
19
|
iqm/benchmarks/randomized_benchmarking/__init__.py,sha256=IkKo-7zUChxZZd3my_csQCJfJfZNsV3-JTvdG8uqys4,734
|
|
20
20
|
iqm/benchmarks/randomized_benchmarking/clifford_1q.pkl,sha256=vvSd0pRWxtzyirohO9yf_58mjevkc2-pbuWIEb-4gaw,46928
|
|
21
21
|
iqm/benchmarks/randomized_benchmarking/clifford_2q.pkl,sha256=ZipqU3crPhz2T35qGFgB4GvMyoi_7pnu8NqW5ZP8NXg,90707258
|
|
@@ -37,8 +37,8 @@ mGST/optimization.py,sha256=YHwkzIkYvsZOPjclR-BCQWh24jeqjuXp0BB0WX5Lwow,10559
|
|
|
37
37
|
mGST/qiskit_interface.py,sha256=L4H-4SdhP_bjSFFvpQoF1E7EyGbIJ_CI_y4a7_YEwmU,10102
|
|
38
38
|
mGST/reporting/figure_gen.py,sha256=6Xd8vwfy09hLY1YbJY6TRevuMsQSU4MsWqemly3ZO0I,12970
|
|
39
39
|
mGST/reporting/reporting.py,sha256=-XBy3OCJIMOsA8cApwKjhVKBwnjSAoxm-voHNbRWytM,25803
|
|
40
|
-
iqm_benchmarks-2.
|
|
41
|
-
iqm_benchmarks-2.
|
|
42
|
-
iqm_benchmarks-2.
|
|
43
|
-
iqm_benchmarks-2.
|
|
44
|
-
iqm_benchmarks-2.
|
|
40
|
+
iqm_benchmarks-2.3.dist-info/LICENSE,sha256=2Ncb40-hqkTil78RPv3-YiJfKaJ8te9USJgliKqIdSY,11558
|
|
41
|
+
iqm_benchmarks-2.3.dist-info/METADATA,sha256=9X5g_7kRRtPKs581ILEaU7C00SDdWERCXjoa_OCi4Jw,9103
|
|
42
|
+
iqm_benchmarks-2.3.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
|
|
43
|
+
iqm_benchmarks-2.3.dist-info/top_level.txt,sha256=3G23Z-1LGf-IOzTCUl6QwWqiQ3USz25Zt90Ihq192to,9
|
|
44
|
+
iqm_benchmarks-2.3.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|