iqm-benchmarks 2.39__tar.gz → 2.40__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.
- {iqm_benchmarks-2.39 → iqm_benchmarks-2.40}/CHANGELOG.rst +4 -0
- {iqm_benchmarks-2.39/src/iqm_benchmarks.egg-info → iqm_benchmarks-2.40}/PKG-INFO +1 -1
- {iqm_benchmarks-2.39 → iqm_benchmarks-2.40}/requirements.txt +6 -6
- {iqm_benchmarks-2.39 → iqm_benchmarks-2.40}/src/iqm/benchmarks/utils.py +3 -1
- {iqm_benchmarks-2.39 → iqm_benchmarks-2.40/src/iqm_benchmarks.egg-info}/PKG-INFO +1 -1
- {iqm_benchmarks-2.39 → iqm_benchmarks-2.40}/tests/test_ghz.py +4 -2
- {iqm_benchmarks-2.39 → iqm_benchmarks-2.40}/tests/test_graph_states.py +8 -4
- {iqm_benchmarks-2.39 → iqm_benchmarks-2.40}/tests/test_gst.py +2 -1
- {iqm_benchmarks-2.39 → iqm_benchmarks-2.40}/tests/test_qscore.py +3 -2
- {iqm_benchmarks-2.39 → iqm_benchmarks-2.40}/tests/test_qv.py +2 -1
- {iqm_benchmarks-2.39 → iqm_benchmarks-2.40}/tests/test_rb.py +5 -6
- {iqm_benchmarks-2.39 → iqm_benchmarks-2.40}/tests/unit/test_backend_transpilation.py +72 -9
- {iqm_benchmarks-2.39 → iqm_benchmarks-2.40}/tests/unit/test_submit_execute.py +12 -29
- {iqm_benchmarks-2.39 → iqm_benchmarks-2.40}/.github/workflows/main.yml +0 -0
- {iqm_benchmarks-2.39 → iqm_benchmarks-2.40}/.github/workflows/publish.yml +0 -0
- {iqm_benchmarks-2.39 → iqm_benchmarks-2.40}/.github/workflows/tag_and_release.yml +0 -0
- {iqm_benchmarks-2.39 → iqm_benchmarks-2.40}/.gitignore +0 -0
- {iqm_benchmarks-2.39 → iqm_benchmarks-2.40}/LICENSE +0 -0
- {iqm_benchmarks-2.39 → iqm_benchmarks-2.40}/MANIFEST.in +0 -0
- {iqm_benchmarks-2.39 → iqm_benchmarks-2.40}/README.md +0 -0
- {iqm_benchmarks-2.39 → iqm_benchmarks-2.40}/benchmark_runner.py +0 -0
- {iqm_benchmarks-2.39 → iqm_benchmarks-2.40}/docbuild +0 -0
- {iqm_benchmarks-2.39 → iqm_benchmarks-2.40}/docs/API.rst +0 -0
- {iqm_benchmarks-2.39 → iqm_benchmarks-2.40}/docs/Makefile +0 -0
- {iqm_benchmarks-2.39 → iqm_benchmarks-2.40}/docs/_static/images/favicon.ico +0 -0
- {iqm_benchmarks-2.39 → iqm_benchmarks-2.40}/docs/_static/images/logo.png +0 -0
- {iqm_benchmarks-2.39 → iqm_benchmarks-2.40}/docs/_templates/autosummary-class-template.rst +0 -0
- {iqm_benchmarks-2.39 → iqm_benchmarks-2.40}/docs/_templates/autosummary-module-template.rst +0 -0
- {iqm_benchmarks-2.39 → iqm_benchmarks-2.40}/docs/changelog.rst +0 -0
- {iqm_benchmarks-2.39 → iqm_benchmarks-2.40}/docs/conf.py +0 -0
- {iqm_benchmarks-2.39 → iqm_benchmarks-2.40}/docs/development/development.rst +0 -0
- {iqm_benchmarks-2.39 → iqm_benchmarks-2.40}/docs/development/generate_2qubit_cliffords.ipynb +0 -0
- {iqm_benchmarks-2.39 → iqm_benchmarks-2.40}/docs/development/how_to_make_your_own_benchmark.ipynb +0 -0
- {iqm_benchmarks-2.39 → iqm_benchmarks-2.40}/docs/devices/devices.rst +0 -0
- {iqm_benchmarks-2.39 → iqm_benchmarks-2.40}/docs/devices/spark.ipynb +0 -0
- {iqm_benchmarks-2.39 → iqm_benchmarks-2.40}/docs/devices/star.ipynb +0 -0
- {iqm_benchmarks-2.39 → iqm_benchmarks-2.40}/docs/examples/example_clifford_rb.ipynb +0 -0
- {iqm_benchmarks-2.39 → iqm_benchmarks-2.40}/docs/examples/example_clops.ipynb +0 -0
- {iqm_benchmarks-2.39 → iqm_benchmarks-2.40}/docs/examples/example_eplg.ipynb +0 -0
- {iqm_benchmarks-2.39 → iqm_benchmarks-2.40}/docs/examples/example_experiment_all.ipynb +0 -0
- {iqm_benchmarks-2.39 → iqm_benchmarks-2.40}/docs/examples/example_ghz.ipynb +0 -0
- {iqm_benchmarks-2.39 → iqm_benchmarks-2.40}/docs/examples/example_graphstate.ipynb +0 -0
- {iqm_benchmarks-2.39 → iqm_benchmarks-2.40}/docs/examples/example_gst.ipynb +0 -0
- {iqm_benchmarks-2.39 → iqm_benchmarks-2.40}/docs/examples/example_interleaved_rb.ipynb +0 -0
- {iqm_benchmarks-2.39 → iqm_benchmarks-2.40}/docs/examples/example_mirror_rb.ipynb +0 -0
- {iqm_benchmarks-2.39 → iqm_benchmarks-2.40}/docs/examples/example_qscore.ipynb +0 -0
- {iqm_benchmarks-2.39 → iqm_benchmarks-2.40}/docs/examples/example_quantum_volume.ipynb +0 -0
- {iqm_benchmarks-2.39 → iqm_benchmarks-2.40}/docs/examples/examples.rst +0 -0
- {iqm_benchmarks-2.39 → iqm_benchmarks-2.40}/docs/index.rst +0 -0
- {iqm_benchmarks-2.39 → iqm_benchmarks-2.40}/docs/license.rst +0 -0
- {iqm_benchmarks-2.39 → iqm_benchmarks-2.40}/docs/readme.md +0 -0
- {iqm_benchmarks-2.39 → iqm_benchmarks-2.40}/format +0 -0
- {iqm_benchmarks-2.39 → iqm_benchmarks-2.40}/pyproject.toml +0 -0
- {iqm_benchmarks-2.39 → iqm_benchmarks-2.40}/scheduled_experiments/adonis/__init__.py +0 -0
- {iqm_benchmarks-2.39 → iqm_benchmarks-2.40}/scheduled_experiments/adonis/weekly.py +0 -0
- {iqm_benchmarks-2.39 → iqm_benchmarks-2.40}/setup.cfg +0 -0
- {iqm_benchmarks-2.39 → iqm_benchmarks-2.40}/src/iqm/benchmarks/__init__.py +0 -0
- {iqm_benchmarks-2.39 → iqm_benchmarks-2.40}/src/iqm/benchmarks/benchmark.py +0 -0
- {iqm_benchmarks-2.39 → iqm_benchmarks-2.40}/src/iqm/benchmarks/benchmark_definition.py +0 -0
- {iqm_benchmarks-2.39 → iqm_benchmarks-2.40}/src/iqm/benchmarks/circuit_containers.py +0 -0
- {iqm_benchmarks-2.39 → iqm_benchmarks-2.40}/src/iqm/benchmarks/compressive_gst/__init__.py +0 -0
- {iqm_benchmarks-2.39 → iqm_benchmarks-2.40}/src/iqm/benchmarks/compressive_gst/compressive_gst.py +0 -0
- {iqm_benchmarks-2.39 → iqm_benchmarks-2.40}/src/iqm/benchmarks/compressive_gst/gst_analysis.py +0 -0
- {iqm_benchmarks-2.39 → iqm_benchmarks-2.40}/src/iqm/benchmarks/entanglement/__init__.py +0 -0
- {iqm_benchmarks-2.39 → iqm_benchmarks-2.40}/src/iqm/benchmarks/entanglement/ghz.py +0 -0
- {iqm_benchmarks-2.39 → iqm_benchmarks-2.40}/src/iqm/benchmarks/entanglement/graph_states.py +0 -0
- {iqm_benchmarks-2.39 → iqm_benchmarks-2.40}/src/iqm/benchmarks/logging_config.py +0 -0
- {iqm_benchmarks-2.39 → iqm_benchmarks-2.40}/src/iqm/benchmarks/optimization/__init__.py +0 -0
- {iqm_benchmarks-2.39 → iqm_benchmarks-2.40}/src/iqm/benchmarks/optimization/qscore.py +0 -0
- {iqm_benchmarks-2.39 → iqm_benchmarks-2.40}/src/iqm/benchmarks/quantum_volume/__init__.py +0 -0
- {iqm_benchmarks-2.39 → iqm_benchmarks-2.40}/src/iqm/benchmarks/quantum_volume/clops.py +0 -0
- {iqm_benchmarks-2.39 → iqm_benchmarks-2.40}/src/iqm/benchmarks/quantum_volume/quantum_volume.py +0 -0
- {iqm_benchmarks-2.39 → iqm_benchmarks-2.40}/src/iqm/benchmarks/randomized_benchmarking/__init__.py +0 -0
- {iqm_benchmarks-2.39 → iqm_benchmarks-2.40}/src/iqm/benchmarks/randomized_benchmarking/clifford_1q.pkl +0 -0
- {iqm_benchmarks-2.39 → iqm_benchmarks-2.40}/src/iqm/benchmarks/randomized_benchmarking/clifford_2q.pkl +0 -0
- {iqm_benchmarks-2.39 → iqm_benchmarks-2.40}/src/iqm/benchmarks/randomized_benchmarking/clifford_rb/__init__.py +0 -0
- {iqm_benchmarks-2.39 → iqm_benchmarks-2.40}/src/iqm/benchmarks/randomized_benchmarking/clifford_rb/clifford_rb.py +0 -0
- {iqm_benchmarks-2.39 → iqm_benchmarks-2.40}/src/iqm/benchmarks/randomized_benchmarking/direct_rb/__init__.py +0 -0
- {iqm_benchmarks-2.39 → iqm_benchmarks-2.40}/src/iqm/benchmarks/randomized_benchmarking/direct_rb/direct_rb.py +0 -0
- {iqm_benchmarks-2.39 → iqm_benchmarks-2.40}/src/iqm/benchmarks/randomized_benchmarking/eplg/__init__.py +0 -0
- {iqm_benchmarks-2.39 → iqm_benchmarks-2.40}/src/iqm/benchmarks/randomized_benchmarking/eplg/eplg.py +0 -0
- {iqm_benchmarks-2.39 → iqm_benchmarks-2.40}/src/iqm/benchmarks/randomized_benchmarking/interleaved_rb/__init__.py +0 -0
- {iqm_benchmarks-2.39 → iqm_benchmarks-2.40}/src/iqm/benchmarks/randomized_benchmarking/interleaved_rb/interleaved_rb.py +0 -0
- {iqm_benchmarks-2.39 → iqm_benchmarks-2.40}/src/iqm/benchmarks/randomized_benchmarking/mirror_rb/__init__.py +0 -0
- {iqm_benchmarks-2.39 → iqm_benchmarks-2.40}/src/iqm/benchmarks/randomized_benchmarking/mirror_rb/mirror_rb.py +0 -0
- {iqm_benchmarks-2.39 → iqm_benchmarks-2.40}/src/iqm/benchmarks/randomized_benchmarking/multi_lmfit.py +0 -0
- {iqm_benchmarks-2.39 → iqm_benchmarks-2.40}/src/iqm/benchmarks/randomized_benchmarking/randomized_benchmarking_common.py +0 -0
- {iqm_benchmarks-2.39 → iqm_benchmarks-2.40}/src/iqm/benchmarks/readout_mitigation.py +0 -0
- {iqm_benchmarks-2.39 → iqm_benchmarks-2.40}/src/iqm/benchmarks/utils_plots.py +0 -0
- {iqm_benchmarks-2.39 → iqm_benchmarks-2.40}/src/iqm/benchmarks/utils_shadows.py +0 -0
- {iqm_benchmarks-2.39 → iqm_benchmarks-2.40}/src/iqm_benchmarks.egg-info/SOURCES.txt +0 -0
- {iqm_benchmarks-2.39 → iqm_benchmarks-2.40}/src/iqm_benchmarks.egg-info/dependency_links.txt +0 -0
- {iqm_benchmarks-2.39 → iqm_benchmarks-2.40}/src/iqm_benchmarks.egg-info/requires.txt +0 -0
- {iqm_benchmarks-2.39 → iqm_benchmarks-2.40}/src/iqm_benchmarks.egg-info/top_level.txt +0 -0
- {iqm_benchmarks-2.39 → iqm_benchmarks-2.40}/src/mGST/LICENSE +0 -0
- {iqm_benchmarks-2.39 → iqm_benchmarks-2.40}/src/mGST/README.md +0 -0
- {iqm_benchmarks-2.39 → iqm_benchmarks-2.40}/src/mGST/additional_fns.py +0 -0
- {iqm_benchmarks-2.39 → iqm_benchmarks-2.40}/src/mGST/algorithm.py +0 -0
- {iqm_benchmarks-2.39 → iqm_benchmarks-2.40}/src/mGST/compatibility.py +0 -0
- {iqm_benchmarks-2.39 → iqm_benchmarks-2.40}/src/mGST/low_level_jit.py +0 -0
- {iqm_benchmarks-2.39 → iqm_benchmarks-2.40}/src/mGST/optimization.py +0 -0
- {iqm_benchmarks-2.39 → iqm_benchmarks-2.40}/src/mGST/qiskit_interface.py +0 -0
- {iqm_benchmarks-2.39 → iqm_benchmarks-2.40}/src/mGST/reporting/figure_gen.py +0 -0
- {iqm_benchmarks-2.39 → iqm_benchmarks-2.40}/src/mGST/reporting/reporting.py +0 -0
- {iqm_benchmarks-2.39 → iqm_benchmarks-2.40}/tag-from-pipeline.sh +0 -0
- {iqm_benchmarks-2.39 → iqm_benchmarks-2.40}/test +0 -0
- {iqm_benchmarks-2.39 → iqm_benchmarks-2.40}/tests/unit/test_benchmark_circuit.py +0 -0
- {iqm_benchmarks-2.39 → iqm_benchmarks-2.40}/update-requirements.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: iqm-benchmarks
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.40
|
|
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
|
|
@@ -824,18 +824,18 @@ ipykernel==6.29.5 \
|
|
|
824
824
|
ipython==8.31.0 \
|
|
825
825
|
--hash=sha256:46ec58f8d3d076a61d128fe517a51eb730e3aaf0c184ea8c17d16e366660c6a6 \
|
|
826
826
|
--hash=sha256:b6a2274606bec6166405ff05e54932ed6e5cfecaca1fc05f2cacde7bb074d70b
|
|
827
|
-
iqm-client==29.
|
|
828
|
-
--hash=sha256:
|
|
829
|
-
--hash=sha256:
|
|
827
|
+
iqm-client==29.3.0 \
|
|
828
|
+
--hash=sha256:4fc8494056ff03babf7fda3826fefd087ce24d58cd1101455f0c4819f68ced20 \
|
|
829
|
+
--hash=sha256:e553e97ab23a150ae94908ee19cbea86e46814fe48085c05596fe90db72d2c6a
|
|
830
830
|
iqm-data-definitions==2.13 \
|
|
831
831
|
--hash=sha256:0de52e2a1ffdc63375b13825b28170d0868b12cda011e782b9348bb143083a0e \
|
|
832
832
|
--hash=sha256:be6a71ab2e5b04c6e6c4d53094c89c088cc4b6e8e293f412f9fa937cf8dc980c
|
|
833
833
|
iqm-exa-common==26.24.0 \
|
|
834
834
|
--hash=sha256:92e880913589015b78baf8e0267f82cadc8a52cb090c8e7b5226d1d9a8ddbd26 \
|
|
835
835
|
--hash=sha256:fc3edd89b501961b3ad034f4c37983bb879735626df4f342ea0edcab3bce8182
|
|
836
|
-
iqm-station-control-client==9.
|
|
837
|
-
--hash=sha256:
|
|
838
|
-
--hash=sha256:
|
|
836
|
+
iqm-station-control-client==9.4.0 \
|
|
837
|
+
--hash=sha256:1cd6262ce8b84a6ebd7eeb763e752962d47d23271e47dde2f6bcdfbf75add36d \
|
|
838
|
+
--hash=sha256:e893ea59bdbbb1a348e386a501e898417a202d21621ca3a00e57d11ae1f5b927
|
|
839
839
|
isoduration==20.11.0 \
|
|
840
840
|
--hash=sha256:ac2f9015137935279eac671f94f89eb00584f940f5dc49462a0c4ee692ba1bd9 \
|
|
841
841
|
--hash=sha256:b2904c2a4228c3d44f409c8ae8e2370eb21a26f7ac2ec5446df141dde3452042
|
|
@@ -40,7 +40,7 @@ import xarray as xr
|
|
|
40
40
|
from iqm.benchmarks.logging_config import qcvv_logger
|
|
41
41
|
from iqm.iqm_client.models import CircuitCompilationOptions
|
|
42
42
|
from iqm.qiskit_iqm import IQMCircuit as QuantumCircuit
|
|
43
|
-
from iqm.qiskit_iqm import IQMFakeDeneb, transpile_to_IQM
|
|
43
|
+
from iqm.qiskit_iqm import IQMFakeDeneb, optimize_single_qubit_gates, transpile_to_IQM
|
|
44
44
|
from iqm.qiskit_iqm.fake_backends.fake_adonis import IQMFakeAdonis
|
|
45
45
|
from iqm.qiskit_iqm.fake_backends.fake_apollo import IQMFakeApollo
|
|
46
46
|
from iqm.qiskit_iqm.iqm_backend import IQMBackendBase
|
|
@@ -575,6 +575,8 @@ def perform_backend_transpilation(
|
|
|
575
575
|
initial_layout=qubits if aux_qc is None else None,
|
|
576
576
|
routing_method=routing_method,
|
|
577
577
|
)
|
|
578
|
+
if optimize_sqg:
|
|
579
|
+
transpiled = optimize_single_qubit_gates(transpiled, drop_final_rz=drop_final_rz)
|
|
578
580
|
if backend.has_resonators():
|
|
579
581
|
transpiled = transpile_to_IQM(
|
|
580
582
|
qc, backend=backend, optimize_single_qubits=optimize_sqg, remove_final_rzs=drop_final_rz
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: iqm-benchmarks
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.40
|
|
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
|
|
@@ -6,6 +6,7 @@ from iqm.benchmarks.entanglement.ghz import GHZBenchmark, GHZConfiguration
|
|
|
6
6
|
from iqm.qiskit_iqm.fake_backends.fake_apollo import IQMFakeApollo
|
|
7
7
|
from iqm.qiskit_iqm.fake_backends.fake_deneb import IQMFakeDeneb
|
|
8
8
|
|
|
9
|
+
|
|
9
10
|
class TestGHZ:
|
|
10
11
|
backend = IQMFakeApollo()
|
|
11
12
|
|
|
@@ -25,7 +26,7 @@ class TestGHZ:
|
|
|
25
26
|
num_RMs=10,
|
|
26
27
|
rem=False,
|
|
27
28
|
mit_shots=10,
|
|
28
|
-
use_dd
|
|
29
|
+
use_dd=True,
|
|
29
30
|
)
|
|
30
31
|
benchmark = GHZBenchmark(self.backend, MINIMAL_GHZ)
|
|
31
32
|
benchmark.run()
|
|
@@ -70,5 +71,6 @@ class TestGHZ:
|
|
|
70
71
|
benchmark.analyze()
|
|
71
72
|
mock_fig.assert_called()
|
|
72
73
|
|
|
74
|
+
|
|
73
75
|
class TestGHZDeneb(TestGHZ):
|
|
74
|
-
backend = IQMFakeDeneb()
|
|
76
|
+
backend = IQMFakeDeneb()
|
|
@@ -4,7 +4,10 @@ from unittest.mock import patch
|
|
|
4
4
|
|
|
5
5
|
from iqm.benchmarks.entanglement.graph_states import *
|
|
6
6
|
from iqm.qiskit_iqm.fake_backends.fake_apollo import IQMFakeApollo
|
|
7
|
-
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
# from iqm.qiskit_iqm.fake_backends.fake_deneb import IQMFakeDeneb
|
|
10
|
+
|
|
8
11
|
|
|
9
12
|
class TestGraphState:
|
|
10
13
|
backend = IQMFakeApollo()
|
|
@@ -13,7 +16,7 @@ class TestGraphState:
|
|
|
13
16
|
def test_state_tomo(self, mock_fig):
|
|
14
17
|
MINIMAL_GRAPHSTATE = GraphStateConfiguration(
|
|
15
18
|
qubits=list(range(5)),
|
|
16
|
-
shots=2
|
|
19
|
+
shots=2**10,
|
|
17
20
|
tomography="state_tomography",
|
|
18
21
|
num_bootstraps=10,
|
|
19
22
|
)
|
|
@@ -26,7 +29,7 @@ class TestGraphState:
|
|
|
26
29
|
def test_shadows(self, mock_fig):
|
|
27
30
|
MINIMAL_GRAPHSTATE = GraphStateConfiguration(
|
|
28
31
|
qubits=list(range(5)),
|
|
29
|
-
shots=2
|
|
32
|
+
shots=2**6,
|
|
30
33
|
tomography="shadow_tomography",
|
|
31
34
|
num_bootstraps=2,
|
|
32
35
|
n_random_unitaries=10,
|
|
@@ -37,5 +40,6 @@ class TestGraphState:
|
|
|
37
40
|
benchmark.analyze()
|
|
38
41
|
mock_fig.assert_called()
|
|
39
42
|
|
|
43
|
+
|
|
40
44
|
# class TestGraphStateDeneb(TestGraphState):
|
|
41
|
-
# backend = IQMFakeDeneb()
|
|
45
|
+
# backend = IQMFakeDeneb()
|
|
@@ -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]
|
|
10
|
+
custom_qubits_array = [[0, 1, 3], [0, 1, 2, 3], [0, 1, 2, 3, 4]]
|
|
11
11
|
|
|
12
12
|
def test_qscore(self):
|
|
13
13
|
EXAMPLE_QSCORE = QScoreConfiguration(
|
|
@@ -29,6 +29,7 @@ class TestQScore:
|
|
|
29
29
|
benchmark.run()
|
|
30
30
|
benchmark.analyze()
|
|
31
31
|
|
|
32
|
+
|
|
32
33
|
class TestQScoreDeneb(TestQScore):
|
|
33
34
|
backend = IQMFakeDeneb()
|
|
34
|
-
custom_qubits_array = [[1], [1, 2], [1, 2, 3, 4], [1, 2, 3, 4, 5]]
|
|
35
|
+
custom_qubits_array = [[1], [1, 2], [1, 2, 3, 4], [1, 2, 3, 4, 5]]
|
|
@@ -6,6 +6,7 @@ from iqm.benchmarks.randomized_benchmarking.clifford_rb.clifford_rb import (
|
|
|
6
6
|
CliffordRandomizedBenchmarking,
|
|
7
7
|
CliffordRBConfiguration,
|
|
8
8
|
)
|
|
9
|
+
from iqm.benchmarks.randomized_benchmarking.eplg.eplg import EPLGBenchmark, EPLGConfiguration
|
|
9
10
|
from iqm.benchmarks.randomized_benchmarking.interleaved_rb.interleaved_rb import (
|
|
10
11
|
InterleavedRandomizedBenchmarking,
|
|
11
12
|
InterleavedRBConfiguration,
|
|
@@ -14,13 +15,10 @@ from iqm.benchmarks.randomized_benchmarking.mirror_rb.mirror_rb import (
|
|
|
14
15
|
MirrorRandomizedBenchmarking,
|
|
15
16
|
MirrorRBConfiguration,
|
|
16
17
|
)
|
|
17
|
-
from iqm.benchmarks.randomized_benchmarking.eplg.eplg import (
|
|
18
|
-
EPLGConfiguration,
|
|
19
|
-
EPLGBenchmark,
|
|
20
|
-
)
|
|
21
18
|
from iqm.qiskit_iqm.fake_backends.fake_apollo import IQMFakeApollo
|
|
22
19
|
from iqm.qiskit_iqm.fake_backends.fake_deneb import IQMFakeDeneb
|
|
23
20
|
|
|
21
|
+
|
|
24
22
|
class TestRB:
|
|
25
23
|
backend = IQMFakeApollo()
|
|
26
24
|
|
|
@@ -70,7 +68,7 @@ class TestRB:
|
|
|
70
68
|
|
|
71
69
|
def test_eplg(self):
|
|
72
70
|
EXAMPLE_EPLG = EPLGConfiguration(
|
|
73
|
-
custom_qubits_array=[[0,1],[1,4],[4,5]],
|
|
71
|
+
custom_qubits_array=[[0, 1], [1, 4], [4, 5]],
|
|
74
72
|
drb_depths=sorted(list(set(np.geomspace(1, 100, num=5, endpoint=True, dtype=int).tolist())), reverse=True),
|
|
75
73
|
drb_circuit_samples=5,
|
|
76
74
|
shots=2**8,
|
|
@@ -81,5 +79,6 @@ class TestRB:
|
|
|
81
79
|
benchmark.run()
|
|
82
80
|
benchmark.analyze()
|
|
83
81
|
|
|
82
|
+
|
|
84
83
|
class TestRBDeneb(TestRB):
|
|
85
|
-
backend = IQMFakeDeneb()
|
|
84
|
+
backend = IQMFakeDeneb()
|
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
import unittest
|
|
2
|
+
|
|
2
3
|
import numpy as np
|
|
3
4
|
from qiskit import QuantumCircuit
|
|
4
|
-
from iqm.qiskit_iqm import transpile_to_IQM
|
|
5
5
|
from qiskit.quantum_info import Operator
|
|
6
|
+
from scipy.optimize import minimize
|
|
7
|
+
|
|
8
|
+
from iqm.benchmarks.utils import perform_backend_transpilation, reduce_to_active_qubits, set_coupling_map
|
|
9
|
+
from iqm.qiskit_iqm import transpile_to_IQM
|
|
6
10
|
from iqm.qiskit_iqm.fake_backends.fake_apollo import IQMFakeApollo
|
|
7
|
-
from
|
|
11
|
+
from mGST.additional_fns import multikron
|
|
8
12
|
|
|
9
13
|
|
|
10
14
|
class TestPerformBackendTranspilation(unittest.TestCase):
|
|
@@ -64,6 +68,63 @@ class TestPerformBackendTranspilation(unittest.TestCase):
|
|
|
64
68
|
|
|
65
69
|
return len(active_qubits)
|
|
66
70
|
|
|
71
|
+
def equiv_up_to_local_z(self, op1: "Operator", op2: "Operator", atol: float = 1e-6) -> bool:
|
|
72
|
+
"""
|
|
73
|
+
Check if two operators are equivalent up to local Z rotations and global phase at the beginning
|
|
74
|
+
or end of the circuit.
|
|
75
|
+
|
|
76
|
+
Args:
|
|
77
|
+
op1: First Qiskit Operator object to compare
|
|
78
|
+
op2: Second Qiskit Operator object to compare
|
|
79
|
+
atol: Absolute tolerance for numerical comparison
|
|
80
|
+
|
|
81
|
+
Returns:
|
|
82
|
+
bool: True if operators are equivalent up to local Z rotations
|
|
83
|
+
"""
|
|
84
|
+
|
|
85
|
+
# First check dimensions match
|
|
86
|
+
if op1.dim != op2.dim:
|
|
87
|
+
return False
|
|
88
|
+
|
|
89
|
+
def u_rz(u: np.ndarray, angles: np.ndarray) -> np.ndarray:
|
|
90
|
+
"""
|
|
91
|
+
Apply before-and-after local Z rotations and global phase to a unitary matrix.
|
|
92
|
+
|
|
93
|
+
Args:
|
|
94
|
+
u: Input unitary matrix
|
|
95
|
+
angles: Rotation angles (first is global phase, others for local Z rotations)
|
|
96
|
+
|
|
97
|
+
Returns:
|
|
98
|
+
np.ndarray: Modified unitary matrix
|
|
99
|
+
"""
|
|
100
|
+
rz_l = multikron(np.array([np.array([[1, 0], [0, np.exp(1j * angle)]]) for angle in angles[2::2]]))
|
|
101
|
+
rz_r = multikron(np.array([np.array([[1, 0], [0, np.exp(1j * angle)]]) for angle in angles[1::2]]))
|
|
102
|
+
return np.exp(1j * angles[0]) * rz_l @ u @ rz_r
|
|
103
|
+
|
|
104
|
+
def dist_up_to_rz(angles: np.ndarray, u1: np.ndarray, u2: np.ndarray) -> float:
|
|
105
|
+
"""
|
|
106
|
+
Compute the distance between two unitary matrices up to local Z rotations.
|
|
107
|
+
|
|
108
|
+
Args:
|
|
109
|
+
angles: Rotation angles to optimize
|
|
110
|
+
u1: First unitary matrix
|
|
111
|
+
u2: Second unitary matrix
|
|
112
|
+
|
|
113
|
+
Returns:
|
|
114
|
+
float: Frobenius norm of the difference between the modified matrices
|
|
115
|
+
"""
|
|
116
|
+
u1_rz = u_rz(u1, angles)
|
|
117
|
+
return np.linalg.norm(u1_rz - u2, ord='fro')
|
|
118
|
+
|
|
119
|
+
res = minimize(
|
|
120
|
+
dist_up_to_rz,
|
|
121
|
+
x0=np.ones(2 * int(np.log2(op1.dim[0])) + 1),
|
|
122
|
+
args=(op1.to_matrix(), op2.to_matrix()),
|
|
123
|
+
method='L-BFGS-B',
|
|
124
|
+
)
|
|
125
|
+
|
|
126
|
+
return res.fun < atol
|
|
127
|
+
|
|
67
128
|
def test_basic_transpilation(self):
|
|
68
129
|
"""Test basic transpilation functionality."""
|
|
69
130
|
|
|
@@ -73,7 +134,7 @@ class TestPerformBackendTranspilation(unittest.TestCase):
|
|
|
73
134
|
self.qubit_layout,
|
|
74
135
|
self.coupling_map,
|
|
75
136
|
qiskit_optim_level=1,
|
|
76
|
-
optimize_sqg=
|
|
137
|
+
optimize_sqg=False,
|
|
77
138
|
)
|
|
78
139
|
|
|
79
140
|
# Verify we get the same number of circuits back
|
|
@@ -99,8 +160,9 @@ class TestPerformBackendTranspilation(unittest.TestCase):
|
|
|
99
160
|
reduced_qc_transp.remove_final_measurements()
|
|
100
161
|
op = Operator(reduced_qc)
|
|
101
162
|
op_transp = Operator(reduced_qc_transp)
|
|
102
|
-
|
|
103
|
-
|
|
163
|
+
self.assertTrue(
|
|
164
|
+
op.equiv(op_transp), f"Circuit {i} failed unitary equivalence check after transpilation"
|
|
165
|
+
)
|
|
104
166
|
|
|
105
167
|
def test_transpilation_with_sqg_optimization(self):
|
|
106
168
|
"""Test with and without single-qubit gate optimization."""
|
|
@@ -126,7 +188,8 @@ class TestPerformBackendTranspilation(unittest.TestCase):
|
|
|
126
188
|
|
|
127
189
|
# The circuits should be functionally equivalent
|
|
128
190
|
for i in range(len(self.test_circuits)):
|
|
129
|
-
# For small circuits we can check unitary equivalence
|
|
191
|
+
# For small circuits we can check unitary equivalence, this time up to global phase and local Z rotations
|
|
192
|
+
# since those are ignored in the single qubit gate optimization
|
|
130
193
|
if self.test_circuits[i].num_qubits <= 3:
|
|
131
194
|
reduced_qc_with = reduce_to_active_qubits(transpiled_with_opt[i])
|
|
132
195
|
reduced_qc_with.remove_final_measurements()
|
|
@@ -134,8 +197,8 @@ class TestPerformBackendTranspilation(unittest.TestCase):
|
|
|
134
197
|
reduced_qc_without.remove_final_measurements()
|
|
135
198
|
op_with = Operator(reduced_qc_with)
|
|
136
199
|
op_without = Operator(reduced_qc_without)
|
|
137
|
-
|
|
138
|
-
self.
|
|
200
|
+
equiv_rz = self.equiv_up_to_local_z(op_with, op_without)
|
|
201
|
+
self.assertTrue(equiv_rz, f"Circuit {i} failed unitary equivalence check after transpilation")
|
|
139
202
|
|
|
140
203
|
def test_transpilation_with_parameter_binding(self):
|
|
141
204
|
"""Test transpilation with parameter binding."""
|
|
@@ -160,7 +223,7 @@ class TestPerformBackendTranspilation(unittest.TestCase):
|
|
|
160
223
|
initial_layout=self.qubit_layout[:2], # Only need 2 qubits
|
|
161
224
|
coupling_map=self.coupling_map,
|
|
162
225
|
optimization_level=1,
|
|
163
|
-
seed_transpiler=42
|
|
226
|
+
seed_transpiler=42,
|
|
164
227
|
)
|
|
165
228
|
|
|
166
229
|
# Check that the output circuit has no free parameters
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import unittest
|
|
2
|
-
from unittest.mock import Mock,
|
|
2
|
+
from unittest.mock import Mock, call, patch
|
|
3
3
|
|
|
4
|
+
from iqm.benchmarks.utils import submit_execute
|
|
5
|
+
from iqm.iqm_client.models import CircuitCompilationOptions
|
|
4
6
|
from iqm.qiskit_iqm import IQMCircuit as QuantumCircuit
|
|
5
7
|
from iqm.qiskit_iqm.iqm_backend import IQMBackendBase
|
|
6
8
|
from iqm.qiskit_iqm.iqm_job import IQMJob
|
|
7
|
-
from iqm.iqm_client.models import CircuitCompilationOptions
|
|
8
|
-
from iqm.benchmarks.utils import submit_execute
|
|
9
|
-
|
|
10
9
|
|
|
11
10
|
|
|
12
11
|
class TestSubmitExecute(unittest.TestCase):
|
|
@@ -53,7 +52,7 @@ class TestSubmitExecute(unittest.TestCase):
|
|
|
53
52
|
@patch('iqm.benchmarks.utils.qcvv_logger')
|
|
54
53
|
def test_submit_execute_no_restrictions(self, mock_logger):
|
|
55
54
|
"""Test with no batch size restrictions."""
|
|
56
|
-
jobs,_ = submit_execute(self.sorted_circuits, self.mock_backend, shots=1000)
|
|
55
|
+
jobs, _ = submit_execute(self.sorted_circuits, self.mock_backend, shots=1000)
|
|
57
56
|
|
|
58
57
|
# Should return after first batch
|
|
59
58
|
self.assertEqual(len(jobs), 2)
|
|
@@ -61,21 +60,14 @@ class TestSubmitExecute(unittest.TestCase):
|
|
|
61
60
|
# Check that backend.run was called with each circuit list
|
|
62
61
|
expected_calls = []
|
|
63
62
|
for key in self.sorted_circuits.keys():
|
|
64
|
-
expected_calls.append(call(
|
|
65
|
-
self.sorted_circuits[key], shots=1000, calibration_set_id=None
|
|
66
|
-
))
|
|
63
|
+
expected_calls.append(call(self.sorted_circuits[key], shots=1000, calibration_set_id=None))
|
|
67
64
|
self.mock_backend.run.assert_has_calls(expected_calls, any_order=True)
|
|
68
65
|
|
|
69
66
|
@patch('iqm.benchmarks.utils.qcvv_logger')
|
|
70
67
|
def test_submit_execute_max_circuits(self, mock_logger):
|
|
71
68
|
"""Test with max_circuits_per_batch restriction."""
|
|
72
69
|
|
|
73
|
-
jobs, _ = submit_execute(
|
|
74
|
-
self.sorted_circuits,
|
|
75
|
-
self.mock_backend,
|
|
76
|
-
shots=1000,
|
|
77
|
-
max_circuits_per_batch=2
|
|
78
|
-
)
|
|
70
|
+
jobs, _ = submit_execute(self.sorted_circuits, self.mock_backend, shots=1000, max_circuits_per_batch=2)
|
|
79
71
|
|
|
80
72
|
# Check that backend.run was called with correct batches
|
|
81
73
|
expected_calls = [
|
|
@@ -101,12 +93,7 @@ class TestSubmitExecute(unittest.TestCase):
|
|
|
101
93
|
|
|
102
94
|
# Each small circuit has 5 operations, each large has 10
|
|
103
95
|
# Set max_gates_per_batch to a value that will test different batch sizes
|
|
104
|
-
jobs,_ = submit_execute(
|
|
105
|
-
self.sorted_circuits,
|
|
106
|
-
self.mock_backend,
|
|
107
|
-
shots=1000,
|
|
108
|
-
max_gates_per_batch=15
|
|
109
|
-
)
|
|
96
|
+
jobs, _ = submit_execute(self.sorted_circuits, self.mock_backend, shots=1000, max_gates_per_batch=15)
|
|
110
97
|
|
|
111
98
|
# For large circuits (12 operations each), batches should have 1 circuit per batch
|
|
112
99
|
# For small circuits (5 operations each), batches should have 3 circuits per batch
|
|
@@ -117,8 +104,7 @@ class TestSubmitExecute(unittest.TestCase):
|
|
|
117
104
|
actual_batch_sizes = [len(args[0]) for args, _ in self.mock_backend.run.call_args_list]
|
|
118
105
|
|
|
119
106
|
# Verify we have the right number of batches
|
|
120
|
-
self.assertEqual(len(actual_batch_sizes),
|
|
121
|
-
len(expected_batch_sizes_large) + len(expected_batch_sizes_small))
|
|
107
|
+
self.assertEqual(len(actual_batch_sizes), len(expected_batch_sizes_large) + len(expected_batch_sizes_small))
|
|
122
108
|
|
|
123
109
|
# Verify batch sizes match our expectations
|
|
124
110
|
self.assertEqual(actual_batch_sizes[4:], expected_batch_sizes_large)
|
|
@@ -132,12 +118,8 @@ class TestSubmitExecute(unittest.TestCase):
|
|
|
132
118
|
def test_submit_execute_both_restrictions(self, mock_logger):
|
|
133
119
|
"""Test with both max_gates_per_batch and max_circuits_per_batch restrictions."""
|
|
134
120
|
|
|
135
|
-
jobs,_ = submit_execute(
|
|
136
|
-
self.sorted_circuits,
|
|
137
|
-
self.mock_backend,
|
|
138
|
-
shots=1000,
|
|
139
|
-
max_gates_per_batch=15,
|
|
140
|
-
max_circuits_per_batch=2
|
|
121
|
+
jobs, _ = submit_execute(
|
|
122
|
+
self.sorted_circuits, self.mock_backend, shots=1000, max_gates_per_batch=15, max_circuits_per_batch=2
|
|
141
123
|
)
|
|
142
124
|
|
|
143
125
|
# For large circuits:
|
|
@@ -168,5 +150,6 @@ class TestSubmitExecute(unittest.TestCase):
|
|
|
168
150
|
# Circuits per batch should not exceed max_circuits_per_batch
|
|
169
151
|
self.assertLessEqual(batch_size, 2)
|
|
170
152
|
|
|
153
|
+
|
|
171
154
|
if __name__ == '__main__':
|
|
172
|
-
unittest.main()
|
|
155
|
+
unittest.main()
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{iqm_benchmarks-2.39 → iqm_benchmarks-2.40}/docs/development/generate_2qubit_cliffords.ipynb
RENAMED
|
File without changes
|
{iqm_benchmarks-2.39 → iqm_benchmarks-2.40}/docs/development/how_to_make_your_own_benchmark.ipynb
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{iqm_benchmarks-2.39 → iqm_benchmarks-2.40}/src/iqm/benchmarks/compressive_gst/compressive_gst.py
RENAMED
|
File without changes
|
{iqm_benchmarks-2.39 → iqm_benchmarks-2.40}/src/iqm/benchmarks/compressive_gst/gst_analysis.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{iqm_benchmarks-2.39 → iqm_benchmarks-2.40}/src/iqm/benchmarks/quantum_volume/quantum_volume.py
RENAMED
|
File without changes
|
{iqm_benchmarks-2.39 → iqm_benchmarks-2.40}/src/iqm/benchmarks/randomized_benchmarking/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{iqm_benchmarks-2.39 → iqm_benchmarks-2.40}/src/iqm/benchmarks/randomized_benchmarking/eplg/eplg.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{iqm_benchmarks-2.39 → iqm_benchmarks-2.40}/src/iqm_benchmarks.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|