iqm-pulla 10.0.0__tar.gz → 11.0.0__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-10.0.0 → iqm_pulla-11.0.0}/CHANGELOG.rst +18 -0
- {iqm_pulla-10.0.0 → iqm_pulla-11.0.0}/PKG-INFO +7 -7
- {iqm_pulla-10.0.0 → iqm_pulla-11.0.0}/docs/Compilation Stages.ipynb +5 -4
- {iqm_pulla-10.0.0 → iqm_pulla-11.0.0}/docs/Custom Gates and Implementations.ipynb +3 -6
- {iqm_pulla-10.0.0 → iqm_pulla-11.0.0}/docs/Example - Measuring T1.ipynb +2 -1
- {iqm_pulla-10.0.0 → iqm_pulla-11.0.0}/docs/Quick Start.ipynb +1 -1
- {iqm_pulla-10.0.0 → iqm_pulla-11.0.0}/requirements/base.txt +1 -1
- {iqm_pulla-10.0.0 → iqm_pulla-11.0.0}/requirements/notebook.txt +1 -1
- {iqm_pulla-10.0.0 → iqm_pulla-11.0.0}/requirements/qir.txt +1 -1
- iqm_pulla-11.0.0/requirements/qiskit.txt +5 -0
- {iqm_pulla-10.0.0 → iqm_pulla-11.0.0}/src/iqm/cpc/compiler/standard_stages.py +1 -1
- {iqm_pulla-10.0.0 → iqm_pulla-11.0.0}/src/iqm/cpc/interface/compiler.py +2 -12
- {iqm_pulla-10.0.0 → iqm_pulla-11.0.0}/src/iqm/pulla/interface.py +2 -47
- {iqm_pulla-10.0.0 → iqm_pulla-11.0.0}/src/iqm/pulla/utils_qir.py +1 -1
- {iqm_pulla-10.0.0 → iqm_pulla-11.0.0}/src/iqm/pulla/utils_qiskit.py +10 -36
- {iqm_pulla-10.0.0 → iqm_pulla-11.0.0}/src/iqm_pulla.egg-info/PKG-INFO +7 -7
- {iqm_pulla-10.0.0 → iqm_pulla-11.0.0}/src/iqm_pulla.egg-info/requires.txt +6 -6
- iqm_pulla-11.0.0/version.txt +1 -0
- iqm_pulla-10.0.0/requirements/qiskit.txt +0 -5
- iqm_pulla-10.0.0/version.txt +0 -1
- {iqm_pulla-10.0.0 → iqm_pulla-11.0.0}/AUTHORS.rst +0 -0
- {iqm_pulla-10.0.0 → iqm_pulla-11.0.0}/LICENSE.txt +0 -0
- {iqm_pulla-10.0.0 → iqm_pulla-11.0.0}/MANIFEST.in +0 -0
- {iqm_pulla-10.0.0 → iqm_pulla-11.0.0}/README.rst +0 -0
- {iqm_pulla-10.0.0 → iqm_pulla-11.0.0}/docs/API.rst +0 -0
- {iqm_pulla-10.0.0 → iqm_pulla-11.0.0}/docs/Configuration and Usage.ipynb +0 -0
- {iqm_pulla-10.0.0 → iqm_pulla-11.0.0}/docs/Example - Compilation With Local Calibration Set.ipynb +0 -0
- {iqm_pulla-10.0.0 → iqm_pulla-11.0.0}/docs/Example - Executing QIR programs.ipynb +0 -0
- {iqm_pulla-10.0.0 → iqm_pulla-11.0.0}/docs/Example - Randomized Benchmarking.ipynb +0 -0
- {iqm_pulla-10.0.0 → iqm_pulla-11.0.0}/docs/Example - Simple Dynamical Decoupling.ipynb +0 -0
- {iqm_pulla-10.0.0 → iqm_pulla-11.0.0}/docs/_static/images/favicon.ico +0 -0
- {iqm_pulla-10.0.0 → iqm_pulla-11.0.0}/docs/_static/images/logo.png +0 -0
- {iqm_pulla-10.0.0 → iqm_pulla-11.0.0}/docs/_templates/autosummary-class-template.rst +0 -0
- {iqm_pulla-10.0.0 → iqm_pulla-11.0.0}/docs/_templates/autosummary-module-template.rst +0 -0
- {iqm_pulla-10.0.0 → iqm_pulla-11.0.0}/docs/authors.rst +0 -0
- {iqm_pulla-10.0.0 → iqm_pulla-11.0.0}/docs/changelog.rst +0 -0
- {iqm_pulla-10.0.0 → iqm_pulla-11.0.0}/docs/common_errors.rst +0 -0
- {iqm_pulla-10.0.0 → iqm_pulla-11.0.0}/docs/conf.py +0 -0
- {iqm_pulla-10.0.0 → iqm_pulla-11.0.0}/docs/examples.rst +0 -0
- {iqm_pulla-10.0.0 → iqm_pulla-11.0.0}/docs/index.rst +0 -0
- {iqm_pulla-10.0.0 → iqm_pulla-11.0.0}/docs/license.rst +0 -0
- {iqm_pulla-10.0.0 → iqm_pulla-11.0.0}/docs/migration_guide.rst +0 -0
- {iqm_pulla-10.0.0 → iqm_pulla-11.0.0}/docs/readme.rst +0 -0
- {iqm_pulla-10.0.0 → iqm_pulla-11.0.0}/docs/references.bib +0 -0
- {iqm_pulla-10.0.0 → iqm_pulla-11.0.0}/docs/references.rst +0 -0
- {iqm_pulla-10.0.0 → iqm_pulla-11.0.0}/docs/user_guides.rst +0 -0
- {iqm_pulla-10.0.0 → iqm_pulla-11.0.0}/pyproject.toml +0 -0
- {iqm_pulla-10.0.0 → iqm_pulla-11.0.0}/requirements/base.in +0 -0
- {iqm_pulla-10.0.0 → iqm_pulla-11.0.0}/requirements/base.in.internal +0 -0
- {iqm_pulla-10.0.0 → iqm_pulla-11.0.0}/requirements/notebook.in +0 -0
- {iqm_pulla-10.0.0 → iqm_pulla-11.0.0}/requirements/qir.in +0 -0
- {iqm_pulla-10.0.0 → iqm_pulla-11.0.0}/requirements/qiskit.in.internal +0 -0
- {iqm_pulla-10.0.0 → iqm_pulla-11.0.0}/setup.cfg +0 -0
- {iqm_pulla-10.0.0 → iqm_pulla-11.0.0}/setup.py +0 -0
- {iqm_pulla-10.0.0 → iqm_pulla-11.0.0}/src/iqm/cpc/__init__.py +0 -0
- {iqm_pulla-10.0.0 → iqm_pulla-11.0.0}/src/iqm/cpc/compiler/__init__.py +0 -0
- {iqm_pulla-10.0.0 → iqm_pulla-11.0.0}/src/iqm/cpc/compiler/compiler.py +0 -0
- {iqm_pulla-10.0.0 → iqm_pulla-11.0.0}/src/iqm/cpc/compiler/dd.py +0 -0
- {iqm_pulla-10.0.0 → iqm_pulla-11.0.0}/src/iqm/cpc/compiler/errors.py +0 -0
- {iqm_pulla-10.0.0 → iqm_pulla-11.0.0}/src/iqm/cpc/compiler/station_settings.py +0 -0
- {iqm_pulla-10.0.0 → iqm_pulla-11.0.0}/src/iqm/cpc/interface/__init__.py +0 -0
- {iqm_pulla-10.0.0 → iqm_pulla-11.0.0}/src/iqm/cpc/py.typed +0 -0
- {iqm_pulla-10.0.0 → iqm_pulla-11.0.0}/src/iqm/pulla/__init__.py +0 -0
- {iqm_pulla-10.0.0 → iqm_pulla-11.0.0}/src/iqm/pulla/calibration.py +0 -0
- {iqm_pulla-10.0.0 → iqm_pulla-11.0.0}/src/iqm/pulla/pulla.py +0 -0
- {iqm_pulla-10.0.0 → iqm_pulla-11.0.0}/src/iqm/pulla/py.typed +0 -0
- {iqm_pulla-10.0.0 → iqm_pulla-11.0.0}/src/iqm/pulla/quantum_architecture.py +0 -0
- {iqm_pulla-10.0.0 → iqm_pulla-11.0.0}/src/iqm/pulla/utils.py +0 -0
- {iqm_pulla-10.0.0 → iqm_pulla-11.0.0}/src/iqm/pulla/utils_cirq.py +0 -0
- {iqm_pulla-10.0.0 → iqm_pulla-11.0.0}/src/iqm/pulla/utils_dd.py +0 -0
- {iqm_pulla-10.0.0 → iqm_pulla-11.0.0}/src/iqm_pulla.egg-info/SOURCES.txt +0 -0
- {iqm_pulla-10.0.0 → iqm_pulla-11.0.0}/src/iqm_pulla.egg-info/dependency_links.txt +0 -0
- {iqm_pulla-10.0.0 → iqm_pulla-11.0.0}/src/iqm_pulla.egg-info/top_level.txt +0 -0
- {iqm_pulla-10.0.0 → iqm_pulla-11.0.0}/tests/.pylintrc +0 -0
- {iqm_pulla-10.0.0 → iqm_pulla-11.0.0}/tests/__init__.py +0 -0
- {iqm_pulla-10.0.0 → iqm_pulla-11.0.0}/tests/conftest.py +0 -0
|
@@ -2,6 +2,24 @@
|
|
|
2
2
|
Changelog
|
|
3
3
|
=========
|
|
4
4
|
|
|
5
|
+
Version 11.0.0 (2025-09-11)
|
|
6
|
+
===========================
|
|
7
|
+
|
|
8
|
+
Breaking changes
|
|
9
|
+
----------------
|
|
10
|
+
|
|
11
|
+
- Replace :class:`iqm.cpc.interface.compiler.Circuit` with :class:`iqm.pulse.Circuit`.
|
|
12
|
+
:issue:`SW-1663`
|
|
13
|
+
- Remove ``Instruction`` and ``Circuit`` models from ``iqm.pulla.interface``. :issue:`SW-1663`
|
|
14
|
+
|
|
15
|
+
Version 10.1.0 (2025-09-08)
|
|
16
|
+
===========================
|
|
17
|
+
|
|
18
|
+
Features
|
|
19
|
+
--------
|
|
20
|
+
|
|
21
|
+
- bump iqm-pulse version
|
|
22
|
+
|
|
5
23
|
Version 10.0.0 (2025-09-08)
|
|
6
24
|
===========================
|
|
7
25
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: iqm-pulla
|
|
3
|
-
Version:
|
|
3
|
+
Version: 11.0.0
|
|
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
|
|
@@ -218,29 +218,29 @@ License-File: LICENSE.txt
|
|
|
218
218
|
License-File: AUTHORS.rst
|
|
219
219
|
Requires-Dist: iqm-exa-common<27,>=26
|
|
220
220
|
Requires-Dist: iqm-station-control-client<10,>=9
|
|
221
|
-
Requires-Dist: iqm-pulse<12
|
|
221
|
+
Requires-Dist: iqm-pulse<13,>=12
|
|
222
222
|
Requires-Dist: iqm-data-definitions<3.0,>=2.13
|
|
223
223
|
Requires-Dist: pylatexenc==2.10
|
|
224
224
|
Requires-Dist: pydantic<3.0,>=2.10.4
|
|
225
225
|
Provides-Extra: notebook
|
|
226
226
|
Requires-Dist: iqm-exa-common<27,>=26; extra == "notebook"
|
|
227
227
|
Requires-Dist: iqm-station-control-client<10,>=9; extra == "notebook"
|
|
228
|
-
Requires-Dist: iqm-pulse<12
|
|
228
|
+
Requires-Dist: iqm-pulse<13,>=12; extra == "notebook"
|
|
229
229
|
Requires-Dist: notebook<7,>=6.4.11; extra == "notebook"
|
|
230
230
|
Requires-Dist: matplotlib<4,>=3.6.3; extra == "notebook"
|
|
231
231
|
Requires-Dist: nbclient~=0.5.10; extra == "notebook"
|
|
232
232
|
Provides-Extra: qir
|
|
233
233
|
Requires-Dist: iqm-exa-common<27,>=26; extra == "qir"
|
|
234
234
|
Requires-Dist: iqm-station-control-client<10,>=9; extra == "qir"
|
|
235
|
-
Requires-Dist: iqm-pulse<12
|
|
235
|
+
Requires-Dist: iqm-pulse<13,>=12; extra == "qir"
|
|
236
236
|
Requires-Dist: iqm-pyqir==0.12.0; extra == "qir"
|
|
237
237
|
Requires-Dist: iqm-qiskit-qir==0.8.0; extra == "qir"
|
|
238
238
|
Provides-Extra: qiskit
|
|
239
239
|
Requires-Dist: iqm-exa-common<27,>=26; extra == "qiskit"
|
|
240
240
|
Requires-Dist: iqm-station-control-client<10,>=9; extra == "qiskit"
|
|
241
|
-
Requires-Dist: iqm-pulse<12
|
|
242
|
-
Requires-Dist: iqm-client
|
|
243
|
-
Requires-Dist: iqm-client<31
|
|
241
|
+
Requires-Dist: iqm-pulse<13,>=12; extra == "qiskit"
|
|
242
|
+
Requires-Dist: iqm-client<32,>=31; extra == "qiskit"
|
|
243
|
+
Requires-Dist: iqm-client[qiskit]<32,>=31; extra == "qiskit"
|
|
244
244
|
|
|
245
245
|
IQM Pulla
|
|
246
246
|
#########
|
|
@@ -36,6 +36,7 @@
|
|
|
36
36
|
"outputs": [],
|
|
37
37
|
"source": [
|
|
38
38
|
"import os\n",
|
|
39
|
+
"from math import pi\n",
|
|
39
40
|
"from pprint import pprint\n",
|
|
40
41
|
"from qiskit import QuantumCircuit, visualization\n",
|
|
41
42
|
"from qiskit.compiler import transpile\n",
|
|
@@ -258,7 +259,7 @@
|
|
|
258
259
|
},
|
|
259
260
|
"outputs": [],
|
|
260
261
|
"source": [
|
|
261
|
-
"from iqm.
|
|
262
|
+
"from iqm.pulse import CircuitOperation\n",
|
|
262
263
|
"\n",
|
|
263
264
|
"\n",
|
|
264
265
|
"def add_leading_barrier(circuits, context):\n",
|
|
@@ -279,7 +280,7 @@
|
|
|
279
280
|
"source": [
|
|
280
281
|
"Note that the function takes data and context and returns data and context. It happens to neither use nor modify the context, but it should still provide it down to the next passes.\n",
|
|
281
282
|
"\n",
|
|
282
|
-
"Ok, let's define another pass: this one would increase the phase of each `prx` operation by `0.
|
|
283
|
+
"Ok, let's define another pass: this one would increase the phase of each `prx` operation by `0.5 * pi`. This may or may\n",
|
|
283
284
|
"not make practical sense, but bear with us for the purposes of illustration:"
|
|
284
285
|
]
|
|
285
286
|
},
|
|
@@ -296,12 +297,12 @@
|
|
|
296
297
|
"outputs": [],
|
|
297
298
|
"source": [
|
|
298
299
|
"def increase_phase(circuits, context):\n",
|
|
299
|
-
" \"\"\"Add 0.
|
|
300
|
+
" \"\"\"Add 0.5*pi to phase of each prx gate.\"\"\"\n",
|
|
300
301
|
" for circuit in circuits:\n",
|
|
301
302
|
" for instruction in circuit.instructions:\n",
|
|
302
303
|
" if instruction.name == 'prx':\n",
|
|
303
304
|
" print(instruction.args)\n",
|
|
304
|
-
" instruction.args['
|
|
305
|
+
" instruction.args['phase'] += 0.5 * pi\n",
|
|
305
306
|
" return circuits, context"
|
|
306
307
|
]
|
|
307
308
|
},
|
|
@@ -560,12 +560,9 @@
|
|
|
560
560
|
"class StretchedX(CompositeGate):\n",
|
|
561
561
|
" registered_gates = ('prx',) # use the standard prx as a building block\n",
|
|
562
562
|
"\n",
|
|
563
|
-
" def __call__(self,
|
|
563
|
+
" def __call__(self, angle: float, phase: float):\n",
|
|
564
564
|
" normal_prx = self.build(\"prx\", self.locus)\n",
|
|
565
|
-
"
|
|
566
|
-
" phase = phase_t * 2 * np.pi\n",
|
|
567
|
-
" angle = angle_t * 2 * np.pi\n",
|
|
568
|
-
" if angle_t != 0.5:\n",
|
|
565
|
+
" if angle != np.pi:\n",
|
|
569
566
|
" return normal_prx(angle, phase)\n",
|
|
570
567
|
"\n",
|
|
571
568
|
" half = normal_prx(np.pi / 2, phase)\n",
|
|
@@ -589,7 +586,7 @@
|
|
|
589
586
|
"outputs": [],
|
|
590
587
|
"source": [
|
|
591
588
|
"circuits, compiler = qiskit_to_pulla(p, backend, example_qiskit_circuit())\n",
|
|
592
|
-
"compiler.add_implementation('custom_x', 'StretchedX', StretchedX, quantum_op=QuantumOp('custom_x', params=
|
|
589
|
+
"compiler.add_implementation('custom_x', 'StretchedX', StretchedX, quantum_op=QuantumOp('custom_x', params={'angle': (float,), 'phase': (float,)}))\n",
|
|
593
590
|
"\n",
|
|
594
591
|
"c = circuits[0]\n",
|
|
595
592
|
"for inst in c.instructions:\n",
|
|
@@ -129,7 +129,8 @@
|
|
|
129
129
|
}
|
|
130
130
|
],
|
|
131
131
|
"source": [
|
|
132
|
-
"from iqm.
|
|
132
|
+
"from iqm.pulse import Circuit\n",
|
|
133
|
+
"from iqm.pulse import CircuitOperation as Op\n",
|
|
133
134
|
"import numpy as np\n",
|
|
134
135
|
"\n",
|
|
135
136
|
"time_axis = np.linspace(0.0, 300e-6, 51) # In seconds\n",
|
|
@@ -369,7 +369,7 @@
|
|
|
369
369
|
"\n",
|
|
370
370
|
"p = Pulla(quantum_computer_url, get_token_callback=lambda: f\"Bearer {api_token}\")\n",
|
|
371
371
|
"provider = IQMProvider(quantum_computer_url, token=api_token)\n",
|
|
372
|
-
"backend = provider.get_backend()\n",
|
|
372
|
+
"backend = provider.get_backend(use_metrics=False)\n",
|
|
373
373
|
"\n",
|
|
374
374
|
"# From now on, the usage is same as for direct station control usage \n",
|
|
375
375
|
"# qc = ...\n",
|
|
@@ -763,7 +763,7 @@ def clean_schedule(schedules: Iterable[Schedule], builder: ScheduleBuilder) -> l
|
|
|
763
763
|
@compiler_pass
|
|
764
764
|
def build_playlist(schedules: Iterable[Schedule], builder: ScheduleBuilder) -> tuple[Playlist, dict[str, Any]]:
|
|
765
765
|
"""Build the playlist from the schedules."""
|
|
766
|
-
playlist = builder.build_playlist(schedules)
|
|
766
|
+
playlist = builder.build_playlist(schedules)[0]
|
|
767
767
|
return playlist, {"schedules": schedules} # save the schedules for building settings, debugging, etc
|
|
768
768
|
|
|
769
769
|
|
|
@@ -19,20 +19,10 @@ from enum import StrEnum
|
|
|
19
19
|
from typing import TypeAlias
|
|
20
20
|
|
|
21
21
|
from exa.common.data.setting_node import SettingNode
|
|
22
|
-
from iqm.pulse
|
|
22
|
+
from iqm.pulse import Circuit
|
|
23
|
+
from iqm.pulse.builder import Locus
|
|
23
24
|
from iqm.pulse.playlist.playlist import Playlist
|
|
24
25
|
|
|
25
|
-
|
|
26
|
-
@dataclass
|
|
27
|
-
class Circuit:
|
|
28
|
-
"""Quantum circuit to be executed."""
|
|
29
|
-
|
|
30
|
-
name: str
|
|
31
|
-
"""name of the circuit"""
|
|
32
|
-
instructions: tuple[CircuitOperation, ...]
|
|
33
|
-
"""operations comprising the circuit"""
|
|
34
|
-
|
|
35
|
-
|
|
36
26
|
CircuitBatch: TypeAlias = list[Circuit]
|
|
37
27
|
"""Type that represents a list of quantum circuits to be executed together in a single batch."""
|
|
38
28
|
|
|
@@ -19,56 +19,11 @@ Many of these must be identical to those in iqm-client.
|
|
|
19
19
|
|
|
20
20
|
from dataclasses import dataclass
|
|
21
21
|
from enum import StrEnum
|
|
22
|
-
from typing import
|
|
22
|
+
from typing import TypeAlias
|
|
23
23
|
from uuid import UUID
|
|
24
24
|
|
|
25
|
-
from pydantic import BaseModel, Field
|
|
26
|
-
|
|
27
25
|
from exa.common.data.value import ObservationValue
|
|
28
|
-
from iqm.cpc.interface.compiler import
|
|
29
|
-
from iqm.cpc.interface.compiler import CircuitOperation, Locus
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
class Instruction(BaseModel):
|
|
33
|
-
"""An instruction in a quantum circuit."""
|
|
34
|
-
|
|
35
|
-
name: str = Field(..., description="name of the quantum operation", examples=["measurement"])
|
|
36
|
-
"""name of the quantum operation"""
|
|
37
|
-
implementation: str | None = Field(None, description="name of the implementation")
|
|
38
|
-
"""name of the implementation"""
|
|
39
|
-
qubits: tuple[str, ...] = Field(
|
|
40
|
-
...,
|
|
41
|
-
description="names of the logical qubits the operation acts on",
|
|
42
|
-
examples=[("alice",)],
|
|
43
|
-
)
|
|
44
|
-
"""names of the logical qubits the operation acts on"""
|
|
45
|
-
args: dict[str, Any] = Field(
|
|
46
|
-
...,
|
|
47
|
-
description="arguments for the operation",
|
|
48
|
-
examples=[{"key": "m"}],
|
|
49
|
-
)
|
|
50
|
-
"""arguments for the operation"""
|
|
51
|
-
|
|
52
|
-
def to_dataclass(self) -> CircuitOperation:
|
|
53
|
-
"""Convert the model to a dataclass."""
|
|
54
|
-
return CircuitOperation(name=self.name, implementation=self.implementation, locus=self.qubits, args=self.args)
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
class Circuit(BaseModel):
|
|
58
|
-
"""Quantum circuit to be executed."""
|
|
59
|
-
|
|
60
|
-
name: str = Field(..., description="name of the circuit", examples=["test circuit"])
|
|
61
|
-
"""name of the circuit"""
|
|
62
|
-
instructions: tuple[Instruction, ...] = Field(..., description="instructions comprising the circuit")
|
|
63
|
-
"""instructions comprising the circuit"""
|
|
64
|
-
metadata: dict[str, Any] | None = Field(None, description="arbitrary metadata associated with the circuit")
|
|
65
|
-
"""arbitrary metadata associated with the circuit"""
|
|
66
|
-
|
|
67
|
-
def to_dataclass(self) -> CPC_Circuit:
|
|
68
|
-
"""Convert the model to a dataclass."""
|
|
69
|
-
return CPC_Circuit(
|
|
70
|
-
name=self.name, instructions=tuple(instruction.to_dataclass() for instruction in self.instructions)
|
|
71
|
-
)
|
|
26
|
+
from iqm.cpc.interface.compiler import Locus
|
|
72
27
|
|
|
73
28
|
|
|
74
29
|
class CHADRetrievalException(Exception):
|
|
@@ -39,7 +39,7 @@ from qiskit.providers import BackendV2
|
|
|
39
39
|
|
|
40
40
|
from iqm.cpc.compiler.compiler import Compiler
|
|
41
41
|
from iqm.cpc.interface.compiler import Circuit as CPC_Circuit
|
|
42
|
-
from iqm.pulse
|
|
42
|
+
from iqm.pulse import CircuitOperation
|
|
43
43
|
|
|
44
44
|
qir_logger = logging.getLogger(__name__)
|
|
45
45
|
|
|
@@ -19,7 +19,6 @@ from collections import Counter
|
|
|
19
19
|
from collections.abc import Collection, Sequence
|
|
20
20
|
from typing import TYPE_CHECKING
|
|
21
21
|
|
|
22
|
-
from iqm.iqm_client import Circuit
|
|
23
22
|
from iqm.qiskit_iqm.iqm_backend import IQMBackendBase
|
|
24
23
|
from iqm.qiskit_iqm.iqm_job import IQMJob
|
|
25
24
|
from iqm.qiskit_iqm.qiskit_to_iqm import serialize_instructions
|
|
@@ -27,13 +26,10 @@ from qiskit import QuantumCircuit
|
|
|
27
26
|
from qiskit.providers import JobStatus, JobV1, Options
|
|
28
27
|
from qiskit.result import Counts, Result
|
|
29
28
|
|
|
30
|
-
from iqm.cpc.interface.compiler import Circuit
|
|
31
|
-
from iqm.cpc.interface.compiler import CircuitExecutionOptions, HeraldingMode
|
|
29
|
+
from iqm.cpc.interface.compiler import Circuit, CircuitExecutionOptions, HeraldingMode
|
|
32
30
|
from iqm.pulla.interface import StationControlResult, TaskStatus
|
|
33
|
-
from iqm.pulse.builder import CircuitOperation
|
|
34
31
|
|
|
35
32
|
if TYPE_CHECKING:
|
|
36
|
-
from iqm.iqm_client import Instruction
|
|
37
33
|
from iqm.qiskit_iqm.iqm_backend import DynamicQuantumArchitecture
|
|
38
34
|
from iqm.qiskit_iqm.iqm_provider import IQMBackend
|
|
39
35
|
|
|
@@ -41,29 +37,11 @@ if TYPE_CHECKING:
|
|
|
41
37
|
from iqm.pulla.pulla import Pulla
|
|
42
38
|
|
|
43
39
|
|
|
44
|
-
def _instruction_to_dataclass(instruction: Instruction) -> CircuitOperation:
|
|
45
|
-
"""Convert the iqm-client model to an iqm-pulse dataclass."""
|
|
46
|
-
return CircuitOperation(
|
|
47
|
-
name=instruction.name,
|
|
48
|
-
implementation=instruction.implementation,
|
|
49
|
-
locus=instruction.qubits,
|
|
50
|
-
args=instruction.args,
|
|
51
|
-
)
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
def _circuit_to_dataclass(circuit: Circuit) -> CPC_Circuit:
|
|
55
|
-
"""Convert the iqm-client model to a CPC dataclass."""
|
|
56
|
-
return CPC_Circuit(
|
|
57
|
-
name=circuit.name,
|
|
58
|
-
instructions=tuple(_instruction_to_dataclass(instruction) for instruction in circuit.instructions),
|
|
59
|
-
)
|
|
60
|
-
|
|
61
|
-
|
|
62
40
|
def qiskit_circuits_to_pulla(
|
|
63
41
|
qiskit_circuits: QuantumCircuit | Sequence[QuantumCircuit],
|
|
64
42
|
qubit_idx_to_name: dict[int, str],
|
|
65
43
|
custom_gates: Collection[str] = (),
|
|
66
|
-
) -> list[
|
|
44
|
+
) -> list[Circuit]:
|
|
67
45
|
"""Convert Qiskit quantum circuits into IQM Pulse quantum circuits.
|
|
68
46
|
|
|
69
47
|
Lower-level method, you may want to use :func:`qiskit_to_pulla` instead.
|
|
@@ -83,17 +61,14 @@ def qiskit_circuits_to_pulla(
|
|
|
83
61
|
qiskit_circuits = [qiskit_circuits]
|
|
84
62
|
|
|
85
63
|
return [
|
|
86
|
-
|
|
64
|
+
Circuit(
|
|
87
65
|
name=qiskit_circuit.name,
|
|
88
66
|
instructions=tuple(
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
custom_gates,
|
|
95
|
-
),
|
|
96
|
-
)
|
|
67
|
+
serialize_instructions(
|
|
68
|
+
qiskit_circuit,
|
|
69
|
+
qubit_idx_to_name,
|
|
70
|
+
custom_gates,
|
|
71
|
+
),
|
|
97
72
|
),
|
|
98
73
|
)
|
|
99
74
|
for qiskit_circuit in qiskit_circuits
|
|
@@ -104,7 +79,7 @@ def qiskit_to_pulla(
|
|
|
104
79
|
pulla: Pulla,
|
|
105
80
|
backend: IQMBackend,
|
|
106
81
|
qiskit_circuits: QuantumCircuit | Sequence[QuantumCircuit],
|
|
107
|
-
) -> tuple[list[
|
|
82
|
+
) -> tuple[list[Circuit], Compiler]:
|
|
108
83
|
"""Convert transpiled Qiskit quantum circuits to IQM Pulse quantum circuits.
|
|
109
84
|
|
|
110
85
|
Also provides the Compiler object for compiling them, with the correct
|
|
@@ -140,8 +115,7 @@ def qiskit_to_pulla(
|
|
|
140
115
|
|
|
141
116
|
# We can be certain run_request contains only Circuit objects, because we created it
|
|
142
117
|
# right in this method with qiskit.QuantumCircuit objects
|
|
143
|
-
|
|
144
|
-
circuits = [_circuit_to_dataclass(c) for c in run_request_iqm_circuits]
|
|
118
|
+
circuits: list[Circuit] = [c for c in run_request.circuits if isinstance(c, Circuit)]
|
|
145
119
|
return circuits, compiler
|
|
146
120
|
|
|
147
121
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: iqm-pulla
|
|
3
|
-
Version:
|
|
3
|
+
Version: 11.0.0
|
|
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
|
|
@@ -218,29 +218,29 @@ License-File: LICENSE.txt
|
|
|
218
218
|
License-File: AUTHORS.rst
|
|
219
219
|
Requires-Dist: iqm-exa-common<27,>=26
|
|
220
220
|
Requires-Dist: iqm-station-control-client<10,>=9
|
|
221
|
-
Requires-Dist: iqm-pulse<12
|
|
221
|
+
Requires-Dist: iqm-pulse<13,>=12
|
|
222
222
|
Requires-Dist: iqm-data-definitions<3.0,>=2.13
|
|
223
223
|
Requires-Dist: pylatexenc==2.10
|
|
224
224
|
Requires-Dist: pydantic<3.0,>=2.10.4
|
|
225
225
|
Provides-Extra: notebook
|
|
226
226
|
Requires-Dist: iqm-exa-common<27,>=26; extra == "notebook"
|
|
227
227
|
Requires-Dist: iqm-station-control-client<10,>=9; extra == "notebook"
|
|
228
|
-
Requires-Dist: iqm-pulse<12
|
|
228
|
+
Requires-Dist: iqm-pulse<13,>=12; extra == "notebook"
|
|
229
229
|
Requires-Dist: notebook<7,>=6.4.11; extra == "notebook"
|
|
230
230
|
Requires-Dist: matplotlib<4,>=3.6.3; extra == "notebook"
|
|
231
231
|
Requires-Dist: nbclient~=0.5.10; extra == "notebook"
|
|
232
232
|
Provides-Extra: qir
|
|
233
233
|
Requires-Dist: iqm-exa-common<27,>=26; extra == "qir"
|
|
234
234
|
Requires-Dist: iqm-station-control-client<10,>=9; extra == "qir"
|
|
235
|
-
Requires-Dist: iqm-pulse<12
|
|
235
|
+
Requires-Dist: iqm-pulse<13,>=12; extra == "qir"
|
|
236
236
|
Requires-Dist: iqm-pyqir==0.12.0; extra == "qir"
|
|
237
237
|
Requires-Dist: iqm-qiskit-qir==0.8.0; extra == "qir"
|
|
238
238
|
Provides-Extra: qiskit
|
|
239
239
|
Requires-Dist: iqm-exa-common<27,>=26; extra == "qiskit"
|
|
240
240
|
Requires-Dist: iqm-station-control-client<10,>=9; extra == "qiskit"
|
|
241
|
-
Requires-Dist: iqm-pulse<12
|
|
242
|
-
Requires-Dist: iqm-client
|
|
243
|
-
Requires-Dist: iqm-client<31
|
|
241
|
+
Requires-Dist: iqm-pulse<13,>=12; extra == "qiskit"
|
|
242
|
+
Requires-Dist: iqm-client<32,>=31; extra == "qiskit"
|
|
243
|
+
Requires-Dist: iqm-client[qiskit]<32,>=31; extra == "qiskit"
|
|
244
244
|
|
|
245
245
|
IQM Pulla
|
|
246
246
|
#########
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
iqm-exa-common<27,>=26
|
|
2
2
|
iqm-station-control-client<10,>=9
|
|
3
|
-
iqm-pulse<12
|
|
3
|
+
iqm-pulse<13,>=12
|
|
4
4
|
iqm-data-definitions<3.0,>=2.13
|
|
5
5
|
pylatexenc==2.10
|
|
6
6
|
pydantic<3.0,>=2.10.4
|
|
@@ -8,7 +8,7 @@ pydantic<3.0,>=2.10.4
|
|
|
8
8
|
[notebook]
|
|
9
9
|
iqm-exa-common<27,>=26
|
|
10
10
|
iqm-station-control-client<10,>=9
|
|
11
|
-
iqm-pulse<12
|
|
11
|
+
iqm-pulse<13,>=12
|
|
12
12
|
notebook<7,>=6.4.11
|
|
13
13
|
matplotlib<4,>=3.6.3
|
|
14
14
|
nbclient~=0.5.10
|
|
@@ -16,13 +16,13 @@ nbclient~=0.5.10
|
|
|
16
16
|
[qir]
|
|
17
17
|
iqm-exa-common<27,>=26
|
|
18
18
|
iqm-station-control-client<10,>=9
|
|
19
|
-
iqm-pulse<12
|
|
19
|
+
iqm-pulse<13,>=12
|
|
20
20
|
iqm-pyqir==0.12.0
|
|
21
21
|
iqm-qiskit-qir==0.8.0
|
|
22
22
|
|
|
23
23
|
[qiskit]
|
|
24
24
|
iqm-exa-common<27,>=26
|
|
25
25
|
iqm-station-control-client<10,>=9
|
|
26
|
-
iqm-pulse<12
|
|
27
|
-
iqm-client
|
|
28
|
-
iqm-client<31
|
|
26
|
+
iqm-pulse<13,>=12
|
|
27
|
+
iqm-client<32,>=31
|
|
28
|
+
iqm-client[qiskit]<32,>=31
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
11.0.0
|
iqm_pulla-10.0.0/version.txt
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
10.0.0
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{iqm_pulla-10.0.0 → iqm_pulla-11.0.0}/docs/Example - Compilation With Local Calibration Set.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
|
|
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
|