iqm-pulla 11.17.0__tar.gz → 12.0.1__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_pulla-11.17.0 → iqm_pulla-12.0.1}/CHANGELOG.rst +46 -11
- iqm_pulla-12.0.1/MANIFEST.in +4 -0
- {iqm_pulla-11.17.0 → iqm_pulla-12.0.1}/PKG-INFO +11 -20
- {iqm_pulla-11.17.0 → iqm_pulla-12.0.1}/README.rst +2 -2
- {iqm_pulla-11.17.0 → iqm_pulla-12.0.1}/docs/Compilation Stages.ipynb +11 -12
- {iqm_pulla-11.17.0 → iqm_pulla-12.0.1}/docs/Configuration and Usage.ipynb +24 -29
- {iqm_pulla-11.17.0 → iqm_pulla-12.0.1}/docs/Custom Gates and Implementations.ipynb +17 -23
- {iqm_pulla-11.17.0 → iqm_pulla-12.0.1}/docs/Example - Compilation With Local Calibration Set.ipynb +33 -43
- iqm_pulla-12.0.1/docs/Example - Executing QIR programs.ipynb +242 -0
- {iqm_pulla-11.17.0 → iqm_pulla-12.0.1}/docs/Example - Measuring T1.ipynb +8 -6
- {iqm_pulla-11.17.0 → iqm_pulla-12.0.1}/docs/Example - Randomized Benchmarking.ipynb +12 -23
- {iqm_pulla-11.17.0 → iqm_pulla-12.0.1}/docs/Example - Simple Dynamical Decoupling.ipynb +14 -11
- {iqm_pulla-11.17.0 → iqm_pulla-12.0.1}/docs/Quick Start.ipynb +85 -103
- iqm_pulla-12.0.1/docs/changelog.rst +8 -0
- {iqm_pulla-11.17.0 → iqm_pulla-12.0.1}/pyproject.toml +4 -5
- iqm_pulla-12.0.1/requirements/base.in.internal +4 -0
- iqm_pulla-12.0.1/requirements/base.txt +8 -0
- iqm_pulla-12.0.1/requirements/notebook.txt +4 -0
- iqm_pulla-12.0.1/requirements/qir.in +2 -0
- iqm_pulla-12.0.1/requirements/qir.txt +3 -0
- iqm_pulla-12.0.1/requirements/qiskit.in.internal +1 -0
- iqm_pulla-12.0.1/requirements/qiskit.txt +3 -0
- {iqm_pulla-11.17.0 → iqm_pulla-12.0.1}/src/iqm/cpc/compiler/compiler.py +21 -25
- {iqm_pulla-11.17.0 → iqm_pulla-12.0.1}/src/iqm/cpc/compiler/dd.py +1 -1
- {iqm_pulla-11.17.0 → iqm_pulla-12.0.1}/src/iqm/cpc/compiler/standard_stages.py +19 -5
- {iqm_pulla-11.17.0 → iqm_pulla-12.0.1}/src/iqm/cpc/compiler/station_settings.py +9 -7
- {iqm_pulla-11.17.0 → iqm_pulla-12.0.1}/src/iqm/cpc/interface/compiler.py +7 -98
- iqm_pulla-12.0.1/src/iqm/cpc/py.typed +0 -0
- iqm_pulla-12.0.1/src/iqm/pulla/calibration.py +74 -0
- iqm_pulla-12.0.1/src/iqm/pulla/interface.py +50 -0
- iqm_pulla-12.0.1/src/iqm/pulla/pulla.py +311 -0
- iqm_pulla-12.0.1/src/iqm/pulla/py.typed +0 -0
- {iqm_pulla-11.17.0 → iqm_pulla-12.0.1}/src/iqm/pulla/utils.py +21 -17
- {iqm_pulla-11.17.0 → iqm_pulla-12.0.1}/src/iqm/pulla/utils_qir.py +3 -2
- {iqm_pulla-11.17.0 → iqm_pulla-12.0.1}/src/iqm/pulla/utils_qiskit.py +37 -46
- {iqm_pulla-11.17.0 → iqm_pulla-12.0.1}/src/iqm_pulla.egg-info/PKG-INFO +11 -20
- {iqm_pulla-11.17.0 → iqm_pulla-12.0.1}/src/iqm_pulla.egg-info/SOURCES.txt +3 -0
- iqm_pulla-12.0.1/src/iqm_pulla.egg-info/requires.txt +19 -0
- iqm_pulla-12.0.1/tests/__init__.py +0 -0
- {iqm_pulla-11.17.0 → iqm_pulla-12.0.1}/tests/conftest.py +32 -106
- iqm_pulla-12.0.1/version.txt +1 -0
- iqm_pulla-11.17.0/MANIFEST.in +0 -10
- iqm_pulla-11.17.0/docs/Example - Executing QIR programs.ipynb +0 -246
- iqm_pulla-11.17.0/docs/changelog.rst +0 -2
- iqm_pulla-11.17.0/requirements/base.in.internal +0 -3
- iqm_pulla-11.17.0/requirements/base.txt +0 -6
- iqm_pulla-11.17.0/requirements/notebook.txt +0 -6
- iqm_pulla-11.17.0/requirements/qir.in +0 -2
- iqm_pulla-11.17.0/requirements/qir.txt +0 -5
- iqm_pulla-11.17.0/requirements/qiskit.in.internal +0 -1
- iqm_pulla-11.17.0/requirements/qiskit.txt +0 -5
- iqm_pulla-11.17.0/src/iqm/pulla/calibration.py +0 -95
- iqm_pulla-11.17.0/src/iqm/pulla/interface.py +0 -105
- iqm_pulla-11.17.0/src/iqm/pulla/pulla.py +0 -371
- iqm_pulla-11.17.0/src/iqm_pulla.egg-info/requires.txt +0 -28
- iqm_pulla-11.17.0/version.txt +0 -1
- {iqm_pulla-11.17.0 → iqm_pulla-12.0.1}/AUTHORS.rst +0 -0
- {iqm_pulla-11.17.0 → iqm_pulla-12.0.1}/LICENSE.txt +0 -0
- {iqm_pulla-11.17.0 → iqm_pulla-12.0.1}/docs/API.rst +0 -0
- {iqm_pulla-11.17.0 → iqm_pulla-12.0.1}/docs/_static/images/favicon.ico +0 -0
- {iqm_pulla-11.17.0 → iqm_pulla-12.0.1}/docs/_static/images/logo.png +0 -0
- {iqm_pulla-11.17.0 → iqm_pulla-12.0.1}/docs/_templates/autosummary-class-template.rst +0 -0
- {iqm_pulla-11.17.0 → iqm_pulla-12.0.1}/docs/_templates/autosummary-module-template.rst +0 -0
- {iqm_pulla-11.17.0 → iqm_pulla-12.0.1}/docs/authors.rst +0 -0
- {iqm_pulla-11.17.0 → iqm_pulla-12.0.1}/docs/common_errors.rst +0 -0
- {iqm_pulla-11.17.0 → iqm_pulla-12.0.1}/docs/conf.py +0 -0
- {iqm_pulla-11.17.0 → iqm_pulla-12.0.1}/docs/examples.rst +0 -0
- {iqm_pulla-11.17.0 → iqm_pulla-12.0.1}/docs/index.rst +1 -1
- {iqm_pulla-11.17.0 → iqm_pulla-12.0.1}/docs/license.rst +0 -0
- {iqm_pulla-11.17.0 → iqm_pulla-12.0.1}/docs/migration_guide.rst +0 -0
- {iqm_pulla-11.17.0 → iqm_pulla-12.0.1}/docs/readme.rst +0 -0
- {iqm_pulla-11.17.0 → iqm_pulla-12.0.1}/docs/references.bib +0 -0
- {iqm_pulla-11.17.0 → iqm_pulla-12.0.1}/docs/references.rst +0 -0
- {iqm_pulla-11.17.0 → iqm_pulla-12.0.1}/docs/user_guides.rst +0 -0
- {iqm_pulla-11.17.0 → iqm_pulla-12.0.1}/requirements/base.in +0 -0
- {iqm_pulla-11.17.0 → iqm_pulla-12.0.1}/requirements/notebook.in +0 -0
- /iqm_pulla-11.17.0/src/iqm/cpc/py.typed → /iqm_pulla-12.0.1/requirements/notebook.in.internal +0 -0
- /iqm_pulla-11.17.0/src/iqm/pulla/py.typed → /iqm_pulla-12.0.1/requirements/qir.in.internal +0 -0
- /iqm_pulla-11.17.0/tests/__init__.py → /iqm_pulla-12.0.1/requirements/qiskit.in +0 -0
- {iqm_pulla-11.17.0 → iqm_pulla-12.0.1}/setup.cfg +0 -0
- {iqm_pulla-11.17.0 → iqm_pulla-12.0.1}/setup.py +0 -0
- {iqm_pulla-11.17.0 → iqm_pulla-12.0.1}/src/iqm/cpc/__init__.py +0 -0
- {iqm_pulla-11.17.0 → iqm_pulla-12.0.1}/src/iqm/cpc/compiler/__init__.py +0 -0
- {iqm_pulla-11.17.0 → iqm_pulla-12.0.1}/src/iqm/cpc/compiler/errors.py +0 -0
- {iqm_pulla-11.17.0 → iqm_pulla-12.0.1}/src/iqm/cpc/interface/__init__.py +0 -0
- {iqm_pulla-11.17.0 → iqm_pulla-12.0.1}/src/iqm/pulla/__init__.py +0 -0
- {iqm_pulla-11.17.0 → iqm_pulla-12.0.1}/src/iqm/pulla/quantum_architecture.py +0 -0
- {iqm_pulla-11.17.0 → iqm_pulla-12.0.1}/src/iqm/pulla/utils_cirq.py +0 -0
- {iqm_pulla-11.17.0 → iqm_pulla-12.0.1}/src/iqm/pulla/utils_dd.py +0 -0
- {iqm_pulla-11.17.0 → iqm_pulla-12.0.1}/src/iqm_pulla.egg-info/dependency_links.txt +0 -0
- {iqm_pulla-11.17.0 → iqm_pulla-12.0.1}/src/iqm_pulla.egg-info/top_level.txt +0 -0
- {iqm_pulla-11.17.0 → iqm_pulla-12.0.1}/tests/.pylintrc +0 -0
|
@@ -1,20 +1,55 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
=========
|
|
1
|
+
Version 12.0.1 (2025-12-02)
|
|
2
|
+
===========================
|
|
4
3
|
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
Bug fixes
|
|
5
|
+
---------
|
|
6
|
+
|
|
7
|
+
- Fix version ranges in python package dependencies.
|
|
8
|
+
|
|
9
|
+
Version 12.0.0 (2025-11-21)
|
|
10
|
+
===========================
|
|
11
|
+
|
|
12
|
+
Breaking changes
|
|
13
|
+
----------------
|
|
14
|
+
|
|
15
|
+
- Update ``Pulla`` to use IQMServer in REST communication instead of Station Control service.
|
|
16
|
+
- Many models have been removed from Pulla and similar/same models are used from station control interface models.
|
|
17
|
+
For example, ``TaskStatus``, ``DDMode``, ``DDStrategy``, ``HeraldingMode``, ``MoveGateFrameTrackingMode``,
|
|
18
|
+
and ``MoveGateValidationMode``
|
|
19
|
+
- ``CalibrationSet`` model is renamed to ``CalibrationSetValues``.
|
|
20
|
+
- ``calibration_set`` parameter is removed in many classes/methods/functions, use ``calibration_set_values`` instead.
|
|
21
|
+
For example, for ``find_observation``, ``get_standard_compiler``, ``Compiler``, etc.
|
|
22
|
+
- ``get_calibration`` method in ``Compiler`` is removed, use ``get_calibration_set_values`` instead.
|
|
23
|
+
- ``set_calibration`` method in ``Compiler`` is removed, use ``set_calibration_set_values`` instead.
|
|
24
|
+
- ``get_calibration`` method in ``CalibrationDataProvider`` is removed, use ``get_calibration_set_values`` instead.
|
|
25
|
+
- ``station_control_url`` init parameter for ``Pulla`` is removed, use ``iqm_server_url`` instead.
|
|
26
|
+
- ``get_token_callback`` init parameter for ``Pulla`` is removed, use ``token`` instead.
|
|
27
|
+
- ``fetch_latest_calibration_set`` method in ``Pulla`` is removed, use ``fetch_default_calibration_set`` instead.
|
|
28
|
+
- ``fetch_calibration_set_by_id`` method in ``Pulla`` is removed, use ``fetch_calibration_set_values_by_id`` instead.
|
|
29
|
+
- ``execute`` method in ``Pulla`` is removed, use ``submit_playlist`` instead.
|
|
30
|
+
- ``station_control`` init parameter for ``CalibrationDataProvider`` is removed, use ``iqm_server_client`` instead.
|
|
31
|
+
- ``get_latest_calibration_set`` method in ``CalibrationDataProvider`` is removed,
|
|
32
|
+
use ``get_default_calibration_set`` instead.
|
|
33
|
+
- ``station_control_result_to_qiskit`` function in ``utils_qiskit`` is removed, use ``sweep_job_to_qiskit`` instead.
|
|
34
|
+
|
|
35
|
+
Features
|
|
36
|
+
--------
|
|
37
|
+
|
|
38
|
+
- Minimal changes to support Qiskit v2.0 and v2.1 :issue:`SW-1735`.
|
|
39
|
+
- Updated QIR User Guide example to include a note about ``iqm-qiskit-qir`` not supporting Qiskit v2.x.
|
|
40
|
+
- Removed ``iqm-qiskit-qir`` from the QIR requirements as the package does not support Qiskit 2.X
|
|
41
|
+
- Allow Python 3.12 in project configuration.
|
|
42
|
+
- Verify unit testswith Python 3.12
|
|
7
43
|
|
|
8
44
|
Bug fixes
|
|
9
45
|
---------
|
|
10
46
|
|
|
11
47
|
- CPC calibration set whitelist is updated to include various missing controller settings
|
|
12
48
|
that already were in the calibration set.
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
- Bump version for 4.3.1 release. No functional changes.
|
|
49
|
+
- CPC's `CircuitExecutionOptions` are now validated such that active reset cannot be used with the option
|
|
50
|
+
`CircuitExecutionOptions.convert_terminal_measurements = True` as `measure_fidelity` is not optimized for leakage.
|
|
51
|
+
In that case we set `CircuitExecutionOptions.convert_terminal_measurements = False` and throw a warning in the
|
|
52
|
+
compilation
|
|
18
53
|
|
|
19
54
|
Version 11.16.0 (2025-10-22)
|
|
20
55
|
============================
|
|
@@ -473,7 +508,7 @@ Version 7.1.0 (2025-04-07)
|
|
|
473
508
|
Features
|
|
474
509
|
--------
|
|
475
510
|
|
|
476
|
-
- Fix package version in published docs footers, :issue:`SW-1392`.
|
|
511
|
+
- Fix package version in published docs footers, :issue:`SW-1392`.
|
|
477
512
|
|
|
478
513
|
Version 7.0.0 (2025-04-04)
|
|
479
514
|
==========================
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: iqm-pulla
|
|
3
|
-
Version:
|
|
3
|
+
Version: 12.0.1
|
|
4
4
|
Summary: Client library for pulse-level access to an IQM quantum computer
|
|
5
5
|
Author-email: IQM Finland Oy <developers@meetiqm.com>
|
|
6
6
|
License: Apache License
|
|
@@ -205,42 +205,33 @@ License: Apache License
|
|
|
205
205
|
See the License for the specific language governing permissions and
|
|
206
206
|
limitations under the License.
|
|
207
207
|
|
|
208
|
-
Project-URL: Documentation, https://
|
|
208
|
+
Project-URL: Documentation, https://docs.meetiqm.com/iqm-pulla/
|
|
209
209
|
Project-URL: Homepage, https://pypi.org/project/iqm-pulla/
|
|
210
210
|
Classifier: Development Status :: 4 - Beta
|
|
211
211
|
Classifier: Programming Language :: Python :: 3 :: Only
|
|
212
212
|
Classifier: Topic :: Scientific/Engineering :: Physics
|
|
213
213
|
Classifier: Intended Audience :: Science/Research
|
|
214
214
|
Classifier: License :: OSI Approved :: Apache Software License
|
|
215
|
-
Requires-Python: <3.
|
|
215
|
+
Requires-Python: <3.13,>=3.11
|
|
216
216
|
Description-Content-Type: text/x-rst
|
|
217
217
|
License-File: LICENSE.txt
|
|
218
218
|
License-File: AUTHORS.rst
|
|
219
|
-
Requires-Dist: iqm-exa-common<28,>=27
|
|
220
|
-
Requires-Dist: iqm-station-control-client<12,>=11
|
|
221
|
-
Requires-Dist: iqm-pulse<13,>=12
|
|
222
219
|
Requires-Dist: iqm-data-definitions<3.0,>=2.18
|
|
223
220
|
Requires-Dist: pylatexenc==2.10
|
|
224
221
|
Requires-Dist: pydantic<3.0,>=2.10.4
|
|
222
|
+
Requires-Dist: iqm-client<34,>=33.0.1
|
|
223
|
+
Requires-Dist: iqm-exa-common<28,>=27.4.1
|
|
224
|
+
Requires-Dist: iqm-pulse<13,>=12.7.1
|
|
225
|
+
Requires-Dist: iqm-station-control-client<13,>=12.0.1
|
|
225
226
|
Provides-Extra: notebook
|
|
226
|
-
Requires-Dist: iqm-exa-common<28,>=27; extra == "notebook"
|
|
227
|
-
Requires-Dist: iqm-station-control-client<12,>=11; extra == "notebook"
|
|
228
|
-
Requires-Dist: iqm-pulse<13,>=12; extra == "notebook"
|
|
229
227
|
Requires-Dist: notebook<7,>=6.4.11; extra == "notebook"
|
|
230
228
|
Requires-Dist: matplotlib<4,>=3.6.3; extra == "notebook"
|
|
231
229
|
Requires-Dist: nbclient~=0.5.10; extra == "notebook"
|
|
232
230
|
Provides-Extra: qir
|
|
233
|
-
Requires-Dist: iqm-exa-common<28,>=27; extra == "qir"
|
|
234
|
-
Requires-Dist: iqm-station-control-client<12,>=11; extra == "qir"
|
|
235
|
-
Requires-Dist: iqm-pulse<13,>=12; extra == "qir"
|
|
236
231
|
Requires-Dist: iqm-pyqir==0.12.0; extra == "qir"
|
|
237
|
-
Requires-Dist:
|
|
232
|
+
Requires-Dist: qiskit<2.2,>=1.0; extra == "qir"
|
|
238
233
|
Provides-Extra: qiskit
|
|
239
|
-
Requires-Dist: iqm-
|
|
240
|
-
Requires-Dist: iqm-station-control-client<12,>=11; extra == "qiskit"
|
|
241
|
-
Requires-Dist: iqm-pulse<13,>=12; extra == "qiskit"
|
|
242
|
-
Requires-Dist: iqm-client<33,>=32; extra == "qiskit"
|
|
243
|
-
Requires-Dist: iqm-client[qiskit]<33,>=32; extra == "qiskit"
|
|
234
|
+
Requires-Dist: iqm-client[qiskit]<34,>=33.0.1; extra == "qiskit"
|
|
244
235
|
|
|
245
236
|
IQM Pulla
|
|
246
237
|
#########
|
|
@@ -286,11 +277,11 @@ e2e testing is execution of all user guides (Jupyter notebooks). User guides cov
|
|
|
286
277
|
so we achieve two things: end-to-end-test Pulla as a client library, and make sure the user guides are correct.
|
|
287
278
|
(Server-side use of Pulla is e2e-tested as part of CoCoS.)
|
|
288
279
|
|
|
289
|
-
You have to provide
|
|
280
|
+
You have to provide IQM Server URL as environment variable:
|
|
290
281
|
|
|
291
282
|
.. code-block:: bash
|
|
292
283
|
|
|
293
|
-
|
|
284
|
+
IQM_SERVER_URL=<IQM_SERVER_URL> tox -e e2e
|
|
294
285
|
|
|
295
286
|
Notebooks are executed using `jupyter execute` command. It does not print any output if there are no errors. If you want
|
|
296
287
|
to run a particular notebook and see the output cells printed in the terminal, you can use ``nbconvert`` with ``jq``
|
|
@@ -42,11 +42,11 @@ e2e testing is execution of all user guides (Jupyter notebooks). User guides cov
|
|
|
42
42
|
so we achieve two things: end-to-end-test Pulla as a client library, and make sure the user guides are correct.
|
|
43
43
|
(Server-side use of Pulla is e2e-tested as part of CoCoS.)
|
|
44
44
|
|
|
45
|
-
You have to provide
|
|
45
|
+
You have to provide IQM Server URL as environment variable:
|
|
46
46
|
|
|
47
47
|
.. code-block:: bash
|
|
48
48
|
|
|
49
|
-
|
|
49
|
+
IQM_SERVER_URL=<IQM_SERVER_URL> tox -e e2e
|
|
50
50
|
|
|
51
51
|
Notebooks are executed using `jupyter execute` command. It does not print any output if there are no errors. If you want
|
|
52
52
|
to run a particular notebook and see the output cells printed in the terminal, you can use ``nbconvert`` with ``jq``
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"from iqm.qiskit_iqm import IQMProvider\n",
|
|
44
44
|
"from iqm.qiskit_iqm.iqm_transpilation import optimize_single_qubit_gates\n",
|
|
45
45
|
"from iqm.pulla.pulla import Pulla\n",
|
|
46
|
-
"from iqm.pulla.utils_qiskit import
|
|
46
|
+
"from iqm.pulla.utils_qiskit import sweep_job_to_qiskit"
|
|
47
47
|
]
|
|
48
48
|
},
|
|
49
49
|
{
|
|
@@ -71,10 +71,10 @@
|
|
|
71
71
|
}
|
|
72
72
|
],
|
|
73
73
|
"source": [
|
|
74
|
-
"
|
|
75
|
-
"
|
|
74
|
+
"iqm_server_url = os.environ['PULLA_IQM_SERVER_URL'] # or set the URL directly here\n",
|
|
75
|
+
"os.environ[\"IQM_TOKEN\"] = os.environ.get(\"IQM_TOKEN\") # or set the token directly here\n",
|
|
76
76
|
"\n",
|
|
77
|
-
"provider = IQMProvider(
|
|
77
|
+
"provider = IQMProvider(iqm_server_url)\n",
|
|
78
78
|
"backend = provider.get_backend()\n",
|
|
79
79
|
"\n",
|
|
80
80
|
"qc = QuantumCircuit(3, 3)\n",
|
|
@@ -175,7 +175,7 @@
|
|
|
175
175
|
"source": [
|
|
176
176
|
"from iqm.pulla.utils_qiskit import qiskit_to_pulla\n",
|
|
177
177
|
"\n",
|
|
178
|
-
"p = Pulla(
|
|
178
|
+
"p = Pulla(iqm_server_url)\n",
|
|
179
179
|
"circuits, compiler = qiskit_to_pulla(p, backend, qc_optimized)\n",
|
|
180
180
|
"\n",
|
|
181
181
|
"pprint(circuits[0])"
|
|
@@ -430,7 +430,7 @@
|
|
|
430
430
|
"source": [
|
|
431
431
|
"## Standard stages\n",
|
|
432
432
|
"\n",
|
|
433
|
-
"As mentioned earlier, Pulla comes with a pre-defined \"standard\" set of stages which you can use and, if needed, modify. These standard stages are used by
|
|
433
|
+
"As mentioned earlier, Pulla comes with a pre-defined \"standard\" set of stages which you can use and, if needed, modify. These standard stages are used by IQM Server if you were to submit a circuit to IQM Server (without using Pulla). Thus, if you use the same version of the Pulla library that the remote IQM Server uses, you will be able to produce and inspect the same pulse schedules that IQM Server would (assuming you use the same calibration set).\n",
|
|
434
434
|
"\n",
|
|
435
435
|
"Let's replace our current single stage with standard stages, and view them:"
|
|
436
436
|
]
|
|
@@ -1205,7 +1205,7 @@
|
|
|
1205
1205
|
"id": "c2e9f72a",
|
|
1206
1206
|
"metadata": {},
|
|
1207
1207
|
"source": [
|
|
1208
|
-
"At this point everything is ready to be submitted for execution to the server. Namely, these three objects will be used to construct a request to
|
|
1208
|
+
"At this point everything is ready to be submitted for execution to the server. Namely, these three objects will be used to construct a request to IQM Server:\n",
|
|
1209
1209
|
"\n",
|
|
1210
1210
|
"- `playlist`: sequence of instruction schedules corresponding to the batch of circuits to be executed\n",
|
|
1211
1211
|
"- `settings`: Station Control settings node\n",
|
|
@@ -1238,7 +1238,8 @@
|
|
|
1238
1238
|
}
|
|
1239
1239
|
],
|
|
1240
1240
|
"source": [
|
|
1241
|
-
"
|
|
1241
|
+
"job = p.submit_playlist(playlist, settings, context=context)\n",
|
|
1242
|
+
"job.wait_for_completion()"
|
|
1242
1243
|
]
|
|
1243
1244
|
},
|
|
1244
1245
|
{
|
|
@@ -1280,7 +1281,7 @@
|
|
|
1280
1281
|
}
|
|
1281
1282
|
],
|
|
1282
1283
|
"source": [
|
|
1283
|
-
"qiskit_result =
|
|
1284
|
+
"qiskit_result = sweep_job_to_qiskit(job, shots=shots, execution_options=context['options'])\n",
|
|
1284
1285
|
"print(f\"Qiskit result counts: {qiskit_result.get_counts()}\")\n",
|
|
1285
1286
|
"visualization.plot_histogram(qiskit_result.get_counts())"
|
|
1286
1287
|
]
|
|
@@ -1289,9 +1290,7 @@
|
|
|
1289
1290
|
"cell_type": "markdown",
|
|
1290
1291
|
"id": "fd2ce976",
|
|
1291
1292
|
"metadata": {},
|
|
1292
|
-
"source":
|
|
1293
|
-
"We can also submit the same circuit to CoCoS for execution. CoCoS is essentially a server-side Pulla with fixed standard stages. Since we started with a normal Qiskit backend and a circuit, execution is as simple as:"
|
|
1294
|
-
]
|
|
1293
|
+
"source": "We can also submit the same circuit to IQM Server for execution. IQM Server uses a server-side Pulla with fixed standard stages. Since we started with a normal Qiskit backend and a circuit, execution is as simple as:"
|
|
1295
1294
|
},
|
|
1296
1295
|
{
|
|
1297
1296
|
"cell_type": "code",
|
|
@@ -29,7 +29,6 @@
|
|
|
29
29
|
"from qiskit import QuantumCircuit\n",
|
|
30
30
|
"from qiskit.compiler import transpile\n",
|
|
31
31
|
"from iqm.qiskit_iqm import IQMProvider\n",
|
|
32
|
-
"from iqm.qiskit_iqm.iqm_transpilation import optimize_single_qubit_gates\n",
|
|
33
32
|
"from iqm.pulla.utils_qiskit import qiskit_to_pulla"
|
|
34
33
|
]
|
|
35
34
|
},
|
|
@@ -57,9 +56,9 @@
|
|
|
57
56
|
"- set of implementations for each native operation (including user-defined implementations)\n",
|
|
58
57
|
"- methods for manipulating the calibration, operations, and implementations\n",
|
|
59
58
|
"\n",
|
|
60
|
-
"Pulla can construct a standard compiler equivalent to the one used by the server side (
|
|
59
|
+
"Pulla can construct a standard compiler equivalent to the one used by the server side (IQM Server). You can also construct a Compiler manually.\n",
|
|
61
60
|
"\n",
|
|
62
|
-
"To create an instance of Pulla, you need to provide the URL of
|
|
61
|
+
"To create an instance of Pulla, you need to provide the URL of IQM Server. Upon successful initialization, some configuration data is printed (the verbosity of such messages will be controlled by a debug level value)."
|
|
63
62
|
]
|
|
64
63
|
},
|
|
65
64
|
{
|
|
@@ -76,18 +75,17 @@
|
|
|
76
75
|
"source": [
|
|
77
76
|
"from iqm.pulla.pulla import Pulla\n",
|
|
78
77
|
"\n",
|
|
79
|
-
"
|
|
78
|
+
"iqm_server_url = os.environ['PULLA_IQM_SERVER_URL'] # or set the URL directly here\n",
|
|
79
|
+
"os.environ[\"IQM_TOKEN\"] = os.environ.get(\"IQM_TOKEN\") # or set the token directly here\n",
|
|
80
80
|
"\n",
|
|
81
|
-
"p = Pulla(
|
|
81
|
+
"p = Pulla(iqm_server_url)"
|
|
82
82
|
]
|
|
83
83
|
},
|
|
84
84
|
{
|
|
85
85
|
"cell_type": "markdown",
|
|
86
86
|
"id": "378fc082",
|
|
87
87
|
"metadata": {},
|
|
88
|
-
"source":
|
|
89
|
-
"You can access various things like channel properties of the connected station, chip topology, or the current calibration. The initial calibration is the latest calibration of the connected station. "
|
|
90
|
-
]
|
|
88
|
+
"source": "You can access various things like channel properties of the connected station, chip topology, or the current calibration. The initial calibration is the default calibration of the connected station."
|
|
91
89
|
},
|
|
92
90
|
{
|
|
93
91
|
"cell_type": "code",
|
|
@@ -148,9 +146,7 @@
|
|
|
148
146
|
"cell_type": "markdown",
|
|
149
147
|
"id": "02a29eb8",
|
|
150
148
|
"metadata": {},
|
|
151
|
-
"source":
|
|
152
|
-
"Call `get_standard_compiler()` method to get an instance of `Compiler`. It will be pre-populated with the latest default calibration set and standard compilation stages. This standard compiler is the same one that CoCoS uses on the server side when processing circuits."
|
|
153
|
-
]
|
|
149
|
+
"source": "Call `get_standard_compiler()` method to get an instance of `Compiler`. It will be pre-populated with the latest default calibration set and standard compilation stages. This standard compiler is the same one that IQM Server uses on the server side when processing circuits."
|
|
154
150
|
},
|
|
155
151
|
{
|
|
156
152
|
"cell_type": "code",
|
|
@@ -185,10 +181,10 @@
|
|
|
185
181
|
}
|
|
186
182
|
],
|
|
187
183
|
"source": [
|
|
188
|
-
"#
|
|
184
|
+
"# get_calibration_set_values() returns the entire calibration set\n",
|
|
189
185
|
"# here we filter the data to get just the instrument settings of QB1\n",
|
|
190
186
|
"\n",
|
|
191
|
-
"pprint({k: v for k, v in compiler.
|
|
187
|
+
"pprint({k: v for k, v in compiler.get_calibration_set_values().items() if k.startswith('controllers.QB1')})"
|
|
192
188
|
]
|
|
193
189
|
},
|
|
194
190
|
{
|
|
@@ -196,21 +192,21 @@
|
|
|
196
192
|
"id": "dd9d6ef4",
|
|
197
193
|
"metadata": {},
|
|
198
194
|
"source": [
|
|
199
|
-
"`get_standard_compiler()` fetches the
|
|
195
|
+
"`get_standard_compiler()` fetches the default calibration set from the server. This network request takes a few moments. You may want to create many Compiler instances without such delay.\n",
|
|
200
196
|
"\n",
|
|
201
|
-
"It may also be possible that, due to human error, the
|
|
197
|
+
"It may also be possible that, due to human error, the default calibration set stored on the server is invalid (or incompatible with your version of Pulla or IQM Pulse). In that case `get_standard_compiler()` will fail.\n",
|
|
202
198
|
"\n",
|
|
203
|
-
"To avoid this, you can pass the calibration set manually, and Pulla will construct the compiler with it instead of getting one from the server. If you want to reuse the calibration of an existing compiler, call `Compiler.
|
|
199
|
+
"To avoid this, you can pass the calibration set manually, and Pulla will construct the compiler with it instead of getting one from the server. If you want to reuse the calibration of an existing compiler, call `Compiler.get_calibration_set_values()`, e.g.:\n",
|
|
204
200
|
"\n",
|
|
205
201
|
"```python\n",
|
|
206
|
-
"compiler_new = p.get_standard_compiler(
|
|
202
|
+
"compiler_new = p.get_standard_compiler(calibration_set_values=compiler_old.get_calibration_set_values())\n",
|
|
207
203
|
"```\n",
|
|
208
204
|
"\n",
|
|
209
205
|
"You can also get a specific calibration set from the server if you know its UUID by calling `Pulla.fetch_calibration_set_by_id()`, e.g.:\n",
|
|
210
206
|
"\n",
|
|
211
207
|
"```python\n",
|
|
212
|
-
"specific_cal_set = p.
|
|
213
|
-
"compiler = p.get_standard_compiler(
|
|
208
|
+
"specific_cal_set = p.fetch_calibration_set_values_by_id('fe026208-19aa-4906-93ab-06ba3c86100f')\n",
|
|
209
|
+
"compiler = p.get_standard_compiler(calibration_set_values=specific_cal_set)\n",
|
|
214
210
|
"```"
|
|
215
211
|
]
|
|
216
212
|
},
|
|
@@ -238,7 +234,7 @@
|
|
|
238
234
|
"\n",
|
|
239
235
|
"For the `constant` implementation of the `measure` operation, the readout type is controlled by the `acquisition_type` parameter. By default, it's set to `\"threshold\"`. Let's change it to `\"complex\"`. The full key in the calibration set dictionary is `gates.measure.constant.QUBIT.acquisition_type`, where `QUBIT` is the physical qubit name. \n",
|
|
240
236
|
"\n",
|
|
241
|
-
"Note that we call `
|
|
237
|
+
"Note that we call `get_calibration_set_values()` to get a copy of the compiler's current calibration set, make changes to the copy, then replace the compiler's set with the copy. The compiler always contains a single calibration set only."
|
|
242
238
|
]
|
|
243
239
|
},
|
|
244
240
|
{
|
|
@@ -263,9 +259,7 @@
|
|
|
263
259
|
}
|
|
264
260
|
],
|
|
265
261
|
"source": [
|
|
266
|
-
"
|
|
267
|
-
"\n",
|
|
268
|
-
"provider = IQMProvider(cocos_url)\n",
|
|
262
|
+
"provider = IQMProvider(iqm_server_url)\n",
|
|
269
263
|
"backend = provider.get_backend()\n",
|
|
270
264
|
"shots = 10\n",
|
|
271
265
|
"\n",
|
|
@@ -279,19 +273,20 @@
|
|
|
279
273
|
"circuits, compiler = qiskit_to_pulla(p, backend, qc_transpiled)\n",
|
|
280
274
|
"\n",
|
|
281
275
|
"# change the acquisition type to 'complex' in the calibration set\n",
|
|
282
|
-
"updated_cal_set = compiler.
|
|
276
|
+
"updated_cal_set = compiler.get_calibration_set_values()\n",
|
|
283
277
|
"for qubit in backend.physical_qubits:\n",
|
|
284
278
|
" updated_cal_set[f'gates.measure.constant.{qubit}.acquisition_type'] = 'complex'\n",
|
|
285
|
-
"compiler.
|
|
279
|
+
"compiler.set_calibration_set_values(updated_cal_set)\n",
|
|
286
280
|
"\n",
|
|
287
281
|
"playlist, context = compiler.compile(circuits)\n",
|
|
288
282
|
"settings, context = compiler.build_settings(context, shots=shots)\n",
|
|
289
|
-
"
|
|
283
|
+
"job = p.submit_playlist(playlist, settings, context=context)\n",
|
|
284
|
+
"job.wait_for_completion()\n",
|
|
290
285
|
"\n",
|
|
291
|
-
"#
|
|
292
|
-
"#
|
|
286
|
+
"# Pulla.submit_playlist() returns a SweepJob object.\n",
|
|
287
|
+
"# The measurements are obtained using SweepJob.result() after SweepJob.wait_for_completion().\n",
|
|
293
288
|
"\n",
|
|
294
|
-
"print(f\"Raw results:\\n{
|
|
289
|
+
"print(f\"Raw results:\\n{job.result()}\\n\")"
|
|
295
290
|
]
|
|
296
291
|
}
|
|
297
292
|
],
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"\n",
|
|
10
10
|
"This notebook demonstrates how to work with user-defined quantum operations and gate implementations that go beyond the standard gate set.\n",
|
|
11
11
|
"\n",
|
|
12
|
-
"Each quantum operation is associated with one or more `GateImplementation`s which translate the high-level concepts to lower-level instructions accepted by the IQM
|
|
12
|
+
"Each quantum operation is associated with one or more `GateImplementation`s which translate the high-level concepts to lower-level instructions accepted by the IQM Server. This example shows how the user can\n",
|
|
13
13
|
"\n",
|
|
14
14
|
"- Selecting a non-default implementation for a gate\n",
|
|
15
15
|
"- Add a custom implementation for an existing gate\n",
|
|
@@ -19,26 +19,20 @@
|
|
|
19
19
|
]
|
|
20
20
|
},
|
|
21
21
|
{
|
|
22
|
-
"cell_type": "markdown",
|
|
23
|
-
"id": "e6dceded",
|
|
24
22
|
"metadata": {},
|
|
23
|
+
"cell_type": "markdown",
|
|
25
24
|
"source": [
|
|
26
25
|
"## Environment setup\n",
|
|
27
26
|
"\n",
|
|
28
|
-
"Please refer to the `
|
|
29
|
-
]
|
|
27
|
+
"Please refer to the `Quick Start.ipynb` for basic usage, terminology, and environment setup."
|
|
28
|
+
],
|
|
29
|
+
"id": "87b897bb5f553e2f"
|
|
30
30
|
},
|
|
31
31
|
{
|
|
32
|
+
"metadata": {},
|
|
32
33
|
"cell_type": "code",
|
|
33
|
-
"execution_count": 1,
|
|
34
|
-
"id": "3ecd000a",
|
|
35
|
-
"metadata": {
|
|
36
|
-
"ExecuteTime": {
|
|
37
|
-
"end_time": "2024-07-15T09:37:29.282407Z",
|
|
38
|
-
"start_time": "2024-07-15T09:37:17.932145Z"
|
|
39
|
-
}
|
|
40
|
-
},
|
|
41
34
|
"outputs": [],
|
|
35
|
+
"execution_count": null,
|
|
42
36
|
"source": [
|
|
43
37
|
"import os\n",
|
|
44
38
|
"from pprint import pprint\n",
|
|
@@ -47,9 +41,9 @@
|
|
|
47
41
|
"from iqm.pulla.pulla import Pulla\n",
|
|
48
42
|
"from iqm.pulla.utils_qiskit import qiskit_to_pulla\n",
|
|
49
43
|
"from iqm.pulse.playlist.visualisation.base import inspect_playlist\n",
|
|
50
|
-
"from IPython.core.display import HTML
|
|
51
|
-
|
|
52
|
-
|
|
44
|
+
"from IPython.core.display import HTML"
|
|
45
|
+
],
|
|
46
|
+
"id": "294ec38a8411bffd"
|
|
53
47
|
},
|
|
54
48
|
{
|
|
55
49
|
"cell_type": "code",
|
|
@@ -58,12 +52,12 @@
|
|
|
58
52
|
"metadata": {},
|
|
59
53
|
"outputs": [],
|
|
60
54
|
"source": [
|
|
61
|
-
"
|
|
62
|
-
"
|
|
55
|
+
"iqm_server_url = os.environ['PULLA_IQM_SERVER_URL'] # or set the URL directly here\n",
|
|
56
|
+
"os.environ[\"IQM_TOKEN\"] = os.environ.get(\"IQM_TOKEN\") # or set the token directly here\n",
|
|
63
57
|
"\n",
|
|
64
|
-
"p = Pulla(
|
|
58
|
+
"p = Pulla(iqm_server_url)\n",
|
|
65
59
|
"\n",
|
|
66
|
-
"provider = IQMProvider(
|
|
60
|
+
"provider = IQMProvider(iqm_server_url)\n",
|
|
67
61
|
"backend = provider.get_backend()"
|
|
68
62
|
]
|
|
69
63
|
},
|
|
@@ -113,7 +107,7 @@
|
|
|
113
107
|
"## Changing implementations at the circuit level\n",
|
|
114
108
|
"\n",
|
|
115
109
|
"Circuits are usually defined without specifying implementations for any of the gates.\n",
|
|
116
|
-
"The implementations available in a given calibration set are listed in the corresponding dynamic quantum architecture, through
|
|
110
|
+
"The implementations available in a given calibration set are listed in the corresponding dynamic quantum architecture, through IQM Server.\n",
|
|
117
111
|
"\n",
|
|
118
112
|
"Let's see a list of available implementations, with their parameters:"
|
|
119
113
|
]
|
|
@@ -1019,7 +1013,7 @@
|
|
|
1019
1013
|
"source": [
|
|
1020
1014
|
"from iqm.pulse.gates.prx import PRX_CustomWaveforms\n",
|
|
1021
1015
|
"from dataclasses import dataclass\n",
|
|
1022
|
-
"from iqm.pulse.playlist.waveforms import
|
|
1016
|
+
"from iqm.pulse.playlist.waveforms import Waveform\n",
|
|
1023
1017
|
"import numpy as np\n",
|
|
1024
1018
|
"\n",
|
|
1025
1019
|
"\n",
|
|
@@ -1222,7 +1216,7 @@
|
|
|
1222
1216
|
"id": "831f56e5",
|
|
1223
1217
|
"metadata": {},
|
|
1224
1218
|
"source": [
|
|
1225
|
-
"Data with `gates.prx.raised_cosine.*` is now visible in `compiler.
|
|
1219
|
+
"Data with `gates.prx.raised_cosine.*` is now visible in `compiler.get_calibration_set_values()`. Note that we added the same calibration data to all qubits. In practice, this rarely makes sense, because each qubit\n",
|
|
1226
1220
|
"is usually calibrated differently.\n",
|
|
1227
1221
|
"\n",
|
|
1228
1222
|
"Now the compilation succeeds and we see that `raised_cosine` was used once. Using the schedule visualization you could also verify that the pulse shape is indeed different on the first `prx` instance."
|