iqm-benchmarks 1.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.

Files changed (42) hide show
  1. iqm/benchmarks/__init__.py +31 -0
  2. iqm/benchmarks/benchmark.py +109 -0
  3. iqm/benchmarks/benchmark_definition.py +264 -0
  4. iqm/benchmarks/benchmark_experiment.py +163 -0
  5. iqm/benchmarks/compressive_gst/__init__.py +20 -0
  6. iqm/benchmarks/compressive_gst/compressive_gst.py +1029 -0
  7. iqm/benchmarks/entanglement/__init__.py +18 -0
  8. iqm/benchmarks/entanglement/ghz.py +802 -0
  9. iqm/benchmarks/logging_config.py +29 -0
  10. iqm/benchmarks/optimization/__init__.py +18 -0
  11. iqm/benchmarks/optimization/qscore.py +719 -0
  12. iqm/benchmarks/quantum_volume/__init__.py +21 -0
  13. iqm/benchmarks/quantum_volume/clops.py +726 -0
  14. iqm/benchmarks/quantum_volume/quantum_volume.py +854 -0
  15. iqm/benchmarks/randomized_benchmarking/__init__.py +18 -0
  16. iqm/benchmarks/randomized_benchmarking/clifford_1q.pkl +0 -0
  17. iqm/benchmarks/randomized_benchmarking/clifford_2q.pkl +0 -0
  18. iqm/benchmarks/randomized_benchmarking/clifford_rb/__init__.py +19 -0
  19. iqm/benchmarks/randomized_benchmarking/clifford_rb/clifford_rb.py +386 -0
  20. iqm/benchmarks/randomized_benchmarking/interleaved_rb/__init__.py +19 -0
  21. iqm/benchmarks/randomized_benchmarking/interleaved_rb/interleaved_rb.py +555 -0
  22. iqm/benchmarks/randomized_benchmarking/mirror_rb/__init__.py +19 -0
  23. iqm/benchmarks/randomized_benchmarking/mirror_rb/mirror_rb.py +810 -0
  24. iqm/benchmarks/randomized_benchmarking/multi_lmfit.py +86 -0
  25. iqm/benchmarks/randomized_benchmarking/randomized_benchmarking_common.py +892 -0
  26. iqm/benchmarks/readout_mitigation.py +290 -0
  27. iqm/benchmarks/utils.py +521 -0
  28. iqm_benchmarks-1.3.dist-info/LICENSE +205 -0
  29. iqm_benchmarks-1.3.dist-info/METADATA +190 -0
  30. iqm_benchmarks-1.3.dist-info/RECORD +42 -0
  31. iqm_benchmarks-1.3.dist-info/WHEEL +5 -0
  32. iqm_benchmarks-1.3.dist-info/top_level.txt +2 -0
  33. mGST/LICENSE +21 -0
  34. mGST/README.md +54 -0
  35. mGST/additional_fns.py +962 -0
  36. mGST/algorithm.py +733 -0
  37. mGST/compatibility.py +238 -0
  38. mGST/low_level_jit.py +694 -0
  39. mGST/optimization.py +349 -0
  40. mGST/qiskit_interface.py +282 -0
  41. mGST/reporting/figure_gen.py +334 -0
  42. mGST/reporting/reporting.py +710 -0
@@ -0,0 +1,205 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright 2024 IQM
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
202
+
203
+
204
+ This repository contains also code from other authors, which is licensed under the following licences:
205
+ * mGST under MIT License (in `src/mGST`) by Raphael Brieger, Ingo Roth, Martin Kliesch (see LICENSE file in mGST folder)
@@ -0,0 +1,190 @@
1
+ Metadata-Version: 2.1
2
+ Name: iqm-benchmarks
3
+ Version: 1.3
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>
6
+ Project-URL: Homepage, https://github.com/iqm-finland/iqm-benchmarks
7
+ Classifier: Development Status :: 4 - Beta
8
+ Classifier: Programming Language :: Python :: 3 :: Only
9
+ Classifier: Topic :: Scientific/Engineering :: Physics
10
+ Classifier: Intended Audience :: Science/Research
11
+ Requires-Python: >=3.11
12
+ Description-Content-Type: text/markdown
13
+ License-File: LICENSE
14
+ Requires-Dist: lmfit==1.3.1
15
+ Requires-Dist: matplotlib==3.9.0
16
+ Requires-Dist: more-itertools==10.1.0
17
+ Requires-Dist: mthree==2.6.3
18
+ Requires-Dist: networkx==2.8.8
19
+ Requires-Dist: numpy>=1.24.2
20
+ Requires-Dist: qiskit==0.45.3
21
+ Requires-Dist: qiskit-aer==0.13.3
22
+ Requires-Dist: qiskit-iqm==15.1
23
+ Requires-Dist: scikit-optimize==0.10.2
24
+ Requires-Dist: tabulate==0.9.0
25
+ Requires-Dist: uncertainties==3.2.1
26
+ Requires-Dist: pycurl==7.45.3
27
+ Requires-Dist: xarray==2024.6.0
28
+ Requires-Dist: types-pycurl
29
+ Provides-Extra: develop
30
+ Requires-Dist: tox==4.16.0; extra == "develop"
31
+ Provides-Extra: examples
32
+ Requires-Dist: notebook==7.2.1; extra == "examples"
33
+ Provides-Extra: mgst
34
+ Requires-Dist: numpy<2.0; extra == "mgst"
35
+ Requires-Dist: cvxpy==1.5.3; extra == "mgst"
36
+ Requires-Dist: pygsti==0.9.12.3; extra == "mgst"
37
+ Requires-Dist: tqdm==4.66.5; extra == "mgst"
38
+ Requires-Dist: numba==0.60.0; extra == "mgst"
39
+ Provides-Extra: test
40
+ Requires-Dist: black==24.4.2; extra == "test"
41
+ Requires-Dist: isort==5.13.2; extra == "test"
42
+ Requires-Dist: mypy==1.10.1; extra == "test"
43
+ Requires-Dist: pylint==3.2.5; extra == "test"
44
+ Requires-Dist: pytest==7.4.4; extra == "test"
45
+ Requires-Dist: pytest-cov==4.1.0; extra == "test"
46
+ Requires-Dist: pytest-isort==3.1.0; extra == "test"
47
+ Requires-Dist: pytest-mypy==0.10.3; extra == "test"
48
+ Requires-Dist: pytest-pylint==0.21.0; extra == "test"
49
+
50
+ # IQM Benchmarks
51
+
52
+ The IQM Benchmarks is a suite of quantum characterization, verification, and validation (QCVV) tools for quantum computing. It is designed to be a comprehensive tool for benchmarking quantum hardware. The suite is designed to be modular, allowing users to easily add new benchmarks and customize existing ones. The suite is designed to be easy to use, with a simple API that allows users to run benchmarks with a single command.
53
+
54
+
55
+ Below is a list of the benchmarks currently available in the suite:
56
+ * Randomized Benchmarking: A suite of randomized benchmarking protocols for characterizing the performance of quantum gates (Clifford Randomized Benchmarking, Mirror Randomized Benchmarking, Interleaved Randomized Benchmarking).
57
+ * Quantum Volume: A benchmark for characterizing the performance of quantum computers.
58
+ * Q-Score: A benchmark that estimates the size of combinatorial optimization problems a given number of qubits can execute with meaningful results.
59
+ * GHZ State Benchmarking: A benchmark for characterizing the performance of multi-qubit entangled states.
60
+
61
+
62
+ The project is split into different benchmarks, all sharing the `Benchmark` class or the legacy `BenchmarkBase` class. Each individual benchmark takes as an argument their own `BenchmarkConfigurationBase` class. All the (legacy) benchmarks executed at once are wrapped by the `BenchmarkExperiment` class, which handles dependencies among the benchmarks, storing the results, producing the plots...
63
+
64
+
65
+ ## Installation _(latest release)_
66
+
67
+ Usually it makes sense to use a new Conda environment (e.g. ``iqm-benchmarks``) to isolate your setup from the global Python installation. That way, you can play around without messing the rest of your system.
68
+
69
+ Start a terminal in your machine, and type
70
+
71
+ ```
72
+ conda create -n iqm-benchmarks python=3.11.2
73
+ conda activate iqm-benchmarks
74
+ ```
75
+
76
+ Then, you can install the latest release of the IQM Benchmarks by running:
77
+ ```bash
78
+ $ pip install iqm-benchmarks
79
+ ```
80
+
81
+ If you have already installed `iqm-benchmarks` and want to get the latest release you can add the --upgrade flag:
82
+
83
+ ```bash
84
+ pip install iqm-benchmarks --upgrade
85
+ ```
86
+
87
+ ## Development mode _(latest changes: recommended)_
88
+
89
+ To install in development mode with all required dependencies, you can instead clone the [repository](https://www.github.com/iqm-finland/iqm-benchmarks) and from the project directory run
90
+
91
+ ```bash
92
+ python -m pip install -e ".[develop,test]" --upgrade --upgrade-strategy=eager
93
+ ```
94
+
95
+ To run the tests, you can use the following command:
96
+
97
+ ```bash
98
+ tox -e test
99
+ ```
100
+
101
+ ## Characterize Physical Hardware
102
+
103
+ The IQM Benchmarks suite is designed to be used with real quantum hardware. To use the suite, you will need to have access to a quantum computer. The suite is designed to work with both IQM Resonance (IQM's quantum cloud service) and on-prem devices, but can be easily adapted to work with other quantum computing platforms.
104
+
105
+ To use the suite with IQM Resonance, you will need to set up an account and obtain an API token. You can then set the `IQM_TOKEN` environment variable to your API token. The suite will automatically use this token to authenticate with IQM Resonance.
106
+
107
+ ```python
108
+ import os
109
+ os.environ["IQM_TOKEN"] = "your_token"
110
+ ```
111
+
112
+ ### Using a Jupyter notebook or Python script
113
+
114
+ You can easily set up one or more benchmarks by defining a configuration for them. For example, for Randomized, Interleaved and Mirror Benchmarking, or Quantum Volume:
115
+
116
+ ```python
117
+ from iqm.benchmarks.randomized_benchmarking.interleaved_rb.interleaved_rb import InterleavedRBConfiguration
118
+ from iqm.benchmarks.randomized_benchmarking.mirror_rb.mirror_rb import MirrorRBConfiguration
119
+ from iqm.benchmarks.quantum_volume.quantum_volume import QuantumVolumeConfiguration
120
+
121
+ EXAMPLE_IRB = InterleavedRBConfiguration(
122
+ qubits_array=[[3,4],[8,9]],
123
+ sequence_lengths=[2**(m+1)-1 for m in range(7)],
124
+ num_circuit_samples=30,
125
+ shots=2**10,
126
+ calset_id=None,
127
+ parallel_execution=True,
128
+ interleaved_gate = "iSwapGate",
129
+ interleaved_gate_params = None,
130
+ simultaneous_fit = ["amplitude", "offset"],
131
+ )
132
+
133
+ EXAMPLE_MRB = MirrorRBConfiguration(
134
+ qubits_array=[[0,1],
135
+ [0,1,3,4],
136
+ [0,1,3,4,8,9],
137
+ [0,1,3,4,8,9,13,14],
138
+ [0,1,3,4,8,9,13,14,17,18]],
139
+ depths_array=[[2**m for m in range(9)],
140
+ [2**m for m in range(8)],
141
+ [2**m for m in range(7)],
142
+ [2**m for m in range(6)],
143
+ [2**m for m in range(5)]],
144
+ num_circuit_samples=10,
145
+ num_pauli_samples=5,
146
+ shots=2**8,
147
+ two_qubit_gate_ensemble={"CZGate": 0.7, "iSwapGate": 0.3}, # {GATE: PROBABILITY}
148
+ density_2q_gates=0.25,
149
+ calset_id=None,
150
+ )
151
+
152
+ EXAMPLE_QV = QuantumVolumeConfiguration(
153
+ num_circuits=500,
154
+ shots=2**8,
155
+ calset_id=None,
156
+ num_sigmas=2,
157
+ choose_qubits_routine="custom",
158
+ custom_qubits_array=[[0,1,2,3], [0,1,3,4]],
159
+ qiskit_optim_level=3,
160
+ optimize_sqg=True,
161
+ routing_method="sabre",
162
+ physical_layout="fixed",
163
+ max_gates_per_batch=60_000,
164
+ rem=True,
165
+ mit_shots=1_000,
166
+ )
167
+ ```
168
+
169
+ In order to execute them, you must specify a backend.
170
+ * for IQM Resonance this can be given as a simple string, such as "garnet" (together with your IQM Token environment variable)
171
+ * and for an on-prem device and IQM Resonance this can be defined using the URL of the quantum computer.
172
+
173
+ Also, you need to reference the benchmark configuration you want to run:
174
+
175
+ ```python
176
+ from iqm.benchmarks.randomized_benchmarking.mirror_rb.mirror_rb import *
177
+ # import os
178
+ # os.environ["IQM_TOKEN"] = "your_token"
179
+
180
+ backend = IQMProvider("https://example-station.qc.iqm.fi/cocos/").get_backend()
181
+
182
+ EXAMPLE_EXPERIMENT = MirrorRandomizedBenchmarking(backend, EXAMPLE_MRB)
183
+ EXAMPLE_EXPERIMENT.run()
184
+ ```
185
+
186
+ Full examples on how to run benchmarks and analyze the results can be found in the `examples` folder.
187
+
188
+ ### Scheduled benchmarks using a CI/CD Pipeline
189
+
190
+ This repository can be setup to perform a scheduled (weekly, daily...) benchmark from a Gitlab/Github pipeline, executed on a real device. An example configuration is given in the `scheduled_experiments` folder.
@@ -0,0 +1,42 @@
1
+ iqm/benchmarks/__init__.py,sha256=OPL9DS7yU21ZYrYGJ_VGpSeWH-CpW_iq5w0mSPx7bAE,1055
2
+ iqm/benchmarks/benchmark.py,sha256=SGhBcSxLPUu-cVXAjG4Db2TRobFCRBYoE1NtTDK1lJg,4432
3
+ iqm/benchmarks/benchmark_definition.py,sha256=1VxXaJBUHuiLh1VgSuG7xUfZ8ZxTMxrN7IkzQdnvBzw,9232
4
+ iqm/benchmarks/benchmark_experiment.py,sha256=0BFNn04jyD1Yj-pIKnuZjCD00v3pU5EnwkRzJUBc0n4,6540
5
+ iqm/benchmarks/logging_config.py,sha256=U7olP5Kr75AcLJqNODf9VBhJLVqIvA4AYR6J39D5rww,1052
6
+ iqm/benchmarks/readout_mitigation.py,sha256=cx8K2EAjhYfVKGSRlpoh9xBFQZZhyL63wPMtzNL3hAg,12329
7
+ iqm/benchmarks/utils.py,sha256=fNuGkN_GI73nZD6xDN_r97Pr6I8uIDhPXZqdQkQvDpM,21291
8
+ iqm/benchmarks/compressive_gst/__init__.py,sha256=4F_5YxExn4ysGQaEs-WNfm0yiFBxkKtGAYBZFWnRsSk,915
9
+ iqm/benchmarks/compressive_gst/compressive_gst.py,sha256=iLBG6HBPfW3y4EYs6DItuBjqBbMQIoCFsJlUSgH_w8w,46288
10
+ iqm/benchmarks/entanglement/__init__.py,sha256=9T7prOwqMmFWdb4t6ETAHZXKK5o6FvU2DvVb6WhNi-U,682
11
+ iqm/benchmarks/entanglement/ghz.py,sha256=T7HCYmI9pCZn5JuONZMc_J-zFxxf2ioIQ-iMHBOQ8u4,35242
12
+ iqm/benchmarks/optimization/__init__.py,sha256=_ajW_OibYLCtzU5AUv5c2zuuVYn8ZNeZUcUUSIGt51M,747
13
+ iqm/benchmarks/optimization/qscore.py,sha256=_s5_w5QTlaeDcHX1BmAevVctHOTVobee1eGkFx7DTEs,27942
14
+ iqm/benchmarks/quantum_volume/__init__.py,sha256=i-Q4SpDWELBw7frXnxm1j4wJRcxbIyrS5uEK_v06YHo,951
15
+ iqm/benchmarks/quantum_volume/clops.py,sha256=8HxCNaI5_ZUBgRqE6hQkcR7Exc-E9INv4GFvv-QF--U,30837
16
+ iqm/benchmarks/quantum_volume/quantum_volume.py,sha256=An1NUsS5ekuDn4fk7MrS1B-YRoG4cboPwGQd4YMuQ5M,35839
17
+ iqm/benchmarks/randomized_benchmarking/__init__.py,sha256=IkKo-7zUChxZZd3my_csQCJfJfZNsV3-JTvdG8uqys4,734
18
+ iqm/benchmarks/randomized_benchmarking/clifford_1q.pkl,sha256=SVcye1bsjxf1hvC1ku2vHOIZQRG5hy1loAOugpVhUE8,42517
19
+ iqm/benchmarks/randomized_benchmarking/clifford_2q.pkl,sha256=BLDpXdyDGkFUxCMHyUMDBnNclCQTsty-kIXwiuY31eA,82994083
20
+ iqm/benchmarks/randomized_benchmarking/multi_lmfit.py,sha256=Se1ygR4mXn_2_P82Ch31KBnCmY-g_A9NKzE9Ir8nEvw,3247
21
+ iqm/benchmarks/randomized_benchmarking/randomized_benchmarking_common.py,sha256=RZX1G9PBCwqwHk_ylqPHLtWk3GMN5Tc2OchnaEv9W2Y,37824
22
+ iqm/benchmarks/randomized_benchmarking/clifford_rb/__init__.py,sha256=bTDA156LAl7OLGcMec--1nzDrV1XpPRVq3CquTmucgE,677
23
+ iqm/benchmarks/randomized_benchmarking/clifford_rb/clifford_rb.py,sha256=0zaFjzz95aDsZ7dxV5-rXd8lGOSk9KuCXZBtk988I8M,16911
24
+ iqm/benchmarks/randomized_benchmarking/interleaved_rb/__init__.py,sha256=sq6MgN_hwlpkOj10vyCU4e6eKSX-oLcF2L9na6W2Gt4,681
25
+ iqm/benchmarks/randomized_benchmarking/interleaved_rb/interleaved_rb.py,sha256=kZHS3_FnwgVAt4_UmOmwl5DRDO24dKNV6epAGxGRM-U,25563
26
+ iqm/benchmarks/randomized_benchmarking/mirror_rb/__init__.py,sha256=ZekEqI_89nXzGO1vjM-b5Uwwicy59M4fYHXfA-f0MIg,674
27
+ iqm/benchmarks/randomized_benchmarking/mirror_rb/mirror_rb.py,sha256=yDYJePSG6kcW0aa3Xw5GHris5L7Sry3JWemvEW5iH2o,34060
28
+ mGST/LICENSE,sha256=TtHNq55cUcbglb7uhVudeBLUh_qPdUoAEvU0BBwFz-k,1098
29
+ mGST/README.md,sha256=v_5kw253csHF4-RfE-44KqFmBXIsSMRmOtN0AUPrRxE,5050
30
+ mGST/additional_fns.py,sha256=_SEJ10FRNM7_CroysT8hCLZTfpm6ZhEIDCY5zPTnhjo,31390
31
+ mGST/algorithm.py,sha256=jSB9G9uI30zD-IZBJvrvIbdPMXp0elXPxk8F8QeyC3w,26006
32
+ mGST/compatibility.py,sha256=00DsPnNfOtrQcDTvxBDs-0aMhmuXmOIIxl_Ohy-Emkg,8920
33
+ mGST/low_level_jit.py,sha256=z6taafZOmgIRsnKZKPFN6aJ2daRsVjzOeOk_GtmcdwI,27023
34
+ mGST/optimization.py,sha256=YHwkzIkYvsZOPjclR-BCQWh24jeqjuXp0BB0WX5Lwow,10559
35
+ mGST/qiskit_interface.py,sha256=2XuJ4WFViLsHCTpEZncwsLbRr-cELEYhegTpRPzCcuI,10080
36
+ mGST/reporting/figure_gen.py,sha256=6Xd8vwfy09hLY1YbJY6TRevuMsQSU4MsWqemly3ZO0I,12970
37
+ mGST/reporting/reporting.py,sha256=-XBy3OCJIMOsA8cApwKjhVKBwnjSAoxm-voHNbRWytM,25803
38
+ iqm_benchmarks-1.3.dist-info/LICENSE,sha256=2Ncb40-hqkTil78RPv3-YiJfKaJ8te9USJgliKqIdSY,11558
39
+ iqm_benchmarks-1.3.dist-info/METADATA,sha256=Xl9uaemgivU4KTvjrt9A0nF97TFNyKfHputsfiKl4KI,8378
40
+ iqm_benchmarks-1.3.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
41
+ iqm_benchmarks-1.3.dist-info/top_level.txt,sha256=3G23Z-1LGf-IOzTCUl6QwWqiQ3USz25Zt90Ihq192to,9
42
+ iqm_benchmarks-1.3.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (75.6.0)
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
5
+
@@ -0,0 +1,2 @@
1
+ iqm
2
+ mGST
mGST/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2021 Raphael Brieger, Ingo Roth, Martin Kliesch
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
mGST/README.md ADDED
@@ -0,0 +1,54 @@
1
+ # Compressive gate set tomography
2
+
3
+ This is a copy of the [mGST repository](https://github.com/rabrie/mGST/tree/main).
4
+
5
+ This repository contains the Python implementation of a flexible and efficient gate set tomography technique based on low-rank approximations, as described in the following research paper:
6
+
7
+ **Title**: Compressive gate set tomography
8
+
9
+ **Authors**: Raphael Brieger, Ingo Roth, and Martin Kliesch
10
+
11
+ **Links**: https://arxiv.org/abs/2112.05176, https://journals.aps.org/prxquantum/pdf/10.1103/PRXQuantum.4.010325
12
+
13
+ ## Abstract
14
+ Flexible characterization techniques that identify and quantify experimental imperfections under realistic assumptions are crucial for the development of quantum computers. Gate set tomography is a characterization approach that simultaneously and self-consistently extracts a tomographic description of the implementation of an entire set of quantum gates, as well as the initial state and measurement, from experimental data. Obtaining such a detailed picture of the experimental implementation is associated with high requirements on the number of sequences and their design, making gate set tomography a challenging task even for only two qubits.
15
+ In this work, we show that low-rank approximations of gate sets can be obtained from significantly fewer gate sequences and that it is sufficient to draw them randomly. Such tomographic information is needed for the crucial task of dealing with coherent noise. To this end, we formulate the data processing problem of gate set tomography as a rank-constrained tensor completion problem. We provide an algorithm to solve this problem while respecting the usual positivity and normalization constraints of quantum mechanics by using second-order geometrical optimization methods on the complex Stiefel manifold. Besides the reduction in sequences, we demonstrate numerically that the algorithm does not rely on structured gate sets or an elaborate circuit design to robustly perform gate set tomography. Therefore, it is more flexible than traditional approaches. We also demonstrate how coherent errors in shadow estimation protocols can be mitigated using estimates from gate set tomography.
16
+
17
+ ## Use Case
18
+ This Python package allows users to perform gate set tomography on quantum devices using low-rank approximations, which reduces the number of gate sequences and the post processing time required. The standard sequence design needed for compressive GST is given by random sequences of short depth, and the python package provides functions that generate those sequences based on high level parameters such as the number of gates and the system size. In its standard configuration, the mGST algorithm assumes no prior knowledge about the gate set parameters and uses local optimization coupled with random initializations until a high quality fit is obtained. Alternatively, an initial guess for the initialization can be supplied, which can lead to large reductions in runtime.
19
+
20
+ For single qubit gate set tomography we recommend using 100 sequences with at least 1000 shots each. For two qubits with model rank up to 4, we recommend 400 sequences and also at least 1000 shots each. The runtime varies for different gate sets and ranks, but is expected to be on the order of a minute for a single qubit and on the order of an hour for two qubits. Details can be found in the linked publication.
21
+
22
+ ## Automatic compressive GST with tex-report
23
+ The folder tutorials/sample_project contains the blueprint for automatically running mGST from the command line.
24
+
25
+ In order to use make use of this functionality, the following steps should be performed:
26
+ 1) Copy the entire "sample_project" folder to a desired location and rename to identify the current experiment.
27
+ 2) Replace the file "synthetic_data.txt" in the "exp_data" subfolder with a text file containting experimental data.
28
+ 3) Edit the file "exp_description" in the "exp_design" subfolder to define the parameters in your experiment.
29
+ 4) Replace the file "sequences.csv" with the gate sequences used in your current experiment.
30
+ 5) Open a terminal in the main project folder and run the command "python3 run_mGST.py".
31
+
32
+ The mGST-Algorithm should now run and give updates on the current state of the optimization. After an estimate is found, "y/n" promts will guide through the next steps considering whether bootstrapping error bars and tex-reports should be generated.
33
+ Gate error tables as well as plots of gate parametrizations are saved in the subfolder "mGST_results", and the full late-report is saved in the "report"-subfolder.
34
+
35
+
36
+ ## Installation Instructions
37
+ To install the package, follow these steps:
38
+
39
+ ### Clone the repository to your local machine:
40
+ ```bash
41
+ git clone git@github.com:rabrie/mGST.git
42
+ ```
43
+
44
+ ### Change to the repository's directory:
45
+ ```bash
46
+ cd mGST
47
+ ```
48
+
49
+ ### Install the package using pip:
50
+ ```bash
51
+ pip install .
52
+ ```
53
+
54
+ Now you can import the package in your Python scripts and use it. For examples and usage instructions, please refer to the provided Jupyter notebook.