iqm-pulla 11.8.0__tar.gz → 11.10.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-11.8.0 → iqm_pulla-11.10.0}/CHANGELOG.rst +19 -0
- {iqm_pulla-11.8.0 → iqm_pulla-11.10.0}/PKG-INFO +2 -2
- {iqm_pulla-11.8.0 → iqm_pulla-11.10.0}/requirements/base.in +1 -1
- {iqm_pulla-11.8.0 → iqm_pulla-11.10.0}/requirements/base.txt +1 -1
- {iqm_pulla-11.8.0 → iqm_pulla-11.10.0}/src/iqm/cpc/compiler/compiler.py +1 -1
- {iqm_pulla-11.8.0 → iqm_pulla-11.10.0}/src/iqm/pulla/interface.py +4 -4
- {iqm_pulla-11.8.0 → iqm_pulla-11.10.0}/src/iqm/pulla/quantum_architecture.py +3 -1
- {iqm_pulla-11.8.0 → iqm_pulla-11.10.0}/src/iqm/pulla/utils.py +86 -32
- {iqm_pulla-11.8.0 → iqm_pulla-11.10.0}/src/iqm_pulla.egg-info/PKG-INFO +2 -2
- {iqm_pulla-11.8.0 → iqm_pulla-11.10.0}/src/iqm_pulla.egg-info/requires.txt +1 -1
- iqm_pulla-11.10.0/version.txt +1 -0
- iqm_pulla-11.8.0/version.txt +0 -1
- {iqm_pulla-11.8.0 → iqm_pulla-11.10.0}/AUTHORS.rst +0 -0
- {iqm_pulla-11.8.0 → iqm_pulla-11.10.0}/LICENSE.txt +0 -0
- {iqm_pulla-11.8.0 → iqm_pulla-11.10.0}/MANIFEST.in +0 -0
- {iqm_pulla-11.8.0 → iqm_pulla-11.10.0}/README.rst +0 -0
- {iqm_pulla-11.8.0 → iqm_pulla-11.10.0}/docs/API.rst +0 -0
- {iqm_pulla-11.8.0 → iqm_pulla-11.10.0}/docs/Compilation Stages.ipynb +0 -0
- {iqm_pulla-11.8.0 → iqm_pulla-11.10.0}/docs/Configuration and Usage.ipynb +0 -0
- {iqm_pulla-11.8.0 → iqm_pulla-11.10.0}/docs/Custom Gates and Implementations.ipynb +0 -0
- {iqm_pulla-11.8.0 → iqm_pulla-11.10.0}/docs/Example - Compilation With Local Calibration Set.ipynb +0 -0
- {iqm_pulla-11.8.0 → iqm_pulla-11.10.0}/docs/Example - Executing QIR programs.ipynb +0 -0
- {iqm_pulla-11.8.0 → iqm_pulla-11.10.0}/docs/Example - Measuring T1.ipynb +0 -0
- {iqm_pulla-11.8.0 → iqm_pulla-11.10.0}/docs/Example - Randomized Benchmarking.ipynb +0 -0
- {iqm_pulla-11.8.0 → iqm_pulla-11.10.0}/docs/Example - Simple Dynamical Decoupling.ipynb +0 -0
- {iqm_pulla-11.8.0 → iqm_pulla-11.10.0}/docs/Quick Start.ipynb +0 -0
- {iqm_pulla-11.8.0 → iqm_pulla-11.10.0}/docs/_static/images/favicon.ico +0 -0
- {iqm_pulla-11.8.0 → iqm_pulla-11.10.0}/docs/_static/images/logo.png +0 -0
- {iqm_pulla-11.8.0 → iqm_pulla-11.10.0}/docs/_templates/autosummary-class-template.rst +0 -0
- {iqm_pulla-11.8.0 → iqm_pulla-11.10.0}/docs/_templates/autosummary-module-template.rst +0 -0
- {iqm_pulla-11.8.0 → iqm_pulla-11.10.0}/docs/authors.rst +0 -0
- {iqm_pulla-11.8.0 → iqm_pulla-11.10.0}/docs/changelog.rst +0 -0
- {iqm_pulla-11.8.0 → iqm_pulla-11.10.0}/docs/common_errors.rst +0 -0
- {iqm_pulla-11.8.0 → iqm_pulla-11.10.0}/docs/conf.py +0 -0
- {iqm_pulla-11.8.0 → iqm_pulla-11.10.0}/docs/examples.rst +0 -0
- {iqm_pulla-11.8.0 → iqm_pulla-11.10.0}/docs/index.rst +0 -0
- {iqm_pulla-11.8.0 → iqm_pulla-11.10.0}/docs/license.rst +0 -0
- {iqm_pulla-11.8.0 → iqm_pulla-11.10.0}/docs/migration_guide.rst +0 -0
- {iqm_pulla-11.8.0 → iqm_pulla-11.10.0}/docs/readme.rst +0 -0
- {iqm_pulla-11.8.0 → iqm_pulla-11.10.0}/docs/references.bib +0 -0
- {iqm_pulla-11.8.0 → iqm_pulla-11.10.0}/docs/references.rst +0 -0
- {iqm_pulla-11.8.0 → iqm_pulla-11.10.0}/docs/user_guides.rst +0 -0
- {iqm_pulla-11.8.0 → iqm_pulla-11.10.0}/pyproject.toml +0 -0
- {iqm_pulla-11.8.0 → iqm_pulla-11.10.0}/requirements/base.in.internal +0 -0
- {iqm_pulla-11.8.0 → iqm_pulla-11.10.0}/requirements/notebook.in +0 -0
- {iqm_pulla-11.8.0 → iqm_pulla-11.10.0}/requirements/notebook.txt +0 -0
- {iqm_pulla-11.8.0 → iqm_pulla-11.10.0}/requirements/qir.in +0 -0
- {iqm_pulla-11.8.0 → iqm_pulla-11.10.0}/requirements/qir.txt +0 -0
- {iqm_pulla-11.8.0 → iqm_pulla-11.10.0}/requirements/qiskit.in.internal +0 -0
- {iqm_pulla-11.8.0 → iqm_pulla-11.10.0}/requirements/qiskit.txt +0 -0
- {iqm_pulla-11.8.0 → iqm_pulla-11.10.0}/setup.cfg +0 -0
- {iqm_pulla-11.8.0 → iqm_pulla-11.10.0}/setup.py +0 -0
- {iqm_pulla-11.8.0 → iqm_pulla-11.10.0}/src/iqm/cpc/__init__.py +0 -0
- {iqm_pulla-11.8.0 → iqm_pulla-11.10.0}/src/iqm/cpc/compiler/__init__.py +0 -0
- {iqm_pulla-11.8.0 → iqm_pulla-11.10.0}/src/iqm/cpc/compiler/dd.py +0 -0
- {iqm_pulla-11.8.0 → iqm_pulla-11.10.0}/src/iqm/cpc/compiler/errors.py +0 -0
- {iqm_pulla-11.8.0 → iqm_pulla-11.10.0}/src/iqm/cpc/compiler/standard_stages.py +0 -0
- {iqm_pulla-11.8.0 → iqm_pulla-11.10.0}/src/iqm/cpc/compiler/station_settings.py +0 -0
- {iqm_pulla-11.8.0 → iqm_pulla-11.10.0}/src/iqm/cpc/interface/__init__.py +0 -0
- {iqm_pulla-11.8.0 → iqm_pulla-11.10.0}/src/iqm/cpc/interface/compiler.py +0 -0
- {iqm_pulla-11.8.0 → iqm_pulla-11.10.0}/src/iqm/cpc/py.typed +0 -0
- {iqm_pulla-11.8.0 → iqm_pulla-11.10.0}/src/iqm/pulla/__init__.py +0 -0
- {iqm_pulla-11.8.0 → iqm_pulla-11.10.0}/src/iqm/pulla/calibration.py +0 -0
- {iqm_pulla-11.8.0 → iqm_pulla-11.10.0}/src/iqm/pulla/pulla.py +0 -0
- {iqm_pulla-11.8.0 → iqm_pulla-11.10.0}/src/iqm/pulla/py.typed +0 -0
- {iqm_pulla-11.8.0 → iqm_pulla-11.10.0}/src/iqm/pulla/utils_cirq.py +0 -0
- {iqm_pulla-11.8.0 → iqm_pulla-11.10.0}/src/iqm/pulla/utils_dd.py +0 -0
- {iqm_pulla-11.8.0 → iqm_pulla-11.10.0}/src/iqm/pulla/utils_qir.py +0 -0
- {iqm_pulla-11.8.0 → iqm_pulla-11.10.0}/src/iqm/pulla/utils_qiskit.py +0 -0
- {iqm_pulla-11.8.0 → iqm_pulla-11.10.0}/src/iqm_pulla.egg-info/SOURCES.txt +0 -0
- {iqm_pulla-11.8.0 → iqm_pulla-11.10.0}/src/iqm_pulla.egg-info/dependency_links.txt +0 -0
- {iqm_pulla-11.8.0 → iqm_pulla-11.10.0}/src/iqm_pulla.egg-info/top_level.txt +0 -0
- {iqm_pulla-11.8.0 → iqm_pulla-11.10.0}/tests/.pylintrc +0 -0
- {iqm_pulla-11.8.0 → iqm_pulla-11.10.0}/tests/__init__.py +0 -0
- {iqm_pulla-11.8.0 → iqm_pulla-11.10.0}/tests/conftest.py +0 -0
|
@@ -2,6 +2,25 @@
|
|
|
2
2
|
Changelog
|
|
3
3
|
=========
|
|
4
4
|
|
|
5
|
+
Version 11.10.0 (2025-10-08)
|
|
6
|
+
============================
|
|
7
|
+
|
|
8
|
+
Features
|
|
9
|
+
--------
|
|
10
|
+
|
|
11
|
+
- Added more efficient result converters to :mod:`iqm.pulla.utils`. :issue:`SW-1733`
|
|
12
|
+
- Deprecated :func:`convert_sweep_spot` and :func:`convert_sweep_spot_with_heralding_mode_zero` in
|
|
13
|
+
favor of the more efficient ones.
|
|
14
|
+
|
|
15
|
+
Version 11.9.0 (2025-10-06)
|
|
16
|
+
===========================
|
|
17
|
+
|
|
18
|
+
Features
|
|
19
|
+
--------
|
|
20
|
+
|
|
21
|
+
- Add ``dut_label`` to :class:`StaticQuantumArchitecture`.
|
|
22
|
+
- Update dependencies.
|
|
23
|
+
|
|
5
24
|
Version 11.8.0 (2025-10-03)
|
|
6
25
|
===========================
|
|
7
26
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: iqm-pulla
|
|
3
|
-
Version: 11.
|
|
3
|
+
Version: 11.10.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
|
|
@@ -219,7 +219,7 @@ License-File: AUTHORS.rst
|
|
|
219
219
|
Requires-Dist: iqm-exa-common<28,>=27
|
|
220
220
|
Requires-Dist: iqm-station-control-client<12,>=11
|
|
221
221
|
Requires-Dist: iqm-pulse<13,>=12
|
|
222
|
-
Requires-Dist: iqm-data-definitions<3.0,>=2.
|
|
222
|
+
Requires-Dist: iqm-data-definitions<3.0,>=2.18
|
|
223
223
|
Requires-Dist: pylatexenc==2.10
|
|
224
224
|
Requires-Dist: pydantic<3.0,>=2.10.4
|
|
225
225
|
Provides-Extra: notebook
|
|
@@ -364,7 +364,7 @@ class Compiler:
|
|
|
364
364
|
)
|
|
365
365
|
self._refresh()
|
|
366
366
|
|
|
367
|
-
@deprecated(format_deprecated(old="`ready`", new=None, since="12
|
|
367
|
+
@deprecated(format_deprecated(old="`ready`", new=None, since="2025-08-12"))
|
|
368
368
|
def ready(self) -> bool:
|
|
369
369
|
"""Check if the compiler is ready to compile circuits. The compiler is ready if at least one stage is defined, and
|
|
370
370
|
all the stages are non-empty.
|
|
@@ -58,15 +58,15 @@ class TaskStatus(StrEnum):
|
|
|
58
58
|
"""Task is waiting to be executed"""
|
|
59
59
|
|
|
60
60
|
|
|
61
|
-
CalibrationSet = dict[str, ObservationValue]
|
|
62
|
-
CalibrationSetId = UUID
|
|
61
|
+
CalibrationSet: TypeAlias = dict[str, ObservationValue]
|
|
62
|
+
CalibrationSetId: TypeAlias = UUID
|
|
63
63
|
|
|
64
|
-
CircuitMeasurementResults = dict[str, list[list[int]]]
|
|
64
|
+
CircuitMeasurementResults: TypeAlias = dict[str, list[list[int]]]
|
|
65
65
|
"""Measurement results from a single circuit/schedule. For each measurement operation in the circuit,
|
|
66
66
|
maps the measurement key to the corresponding results. The outer list elements correspond to shots,
|
|
67
67
|
and the inner list elements to the qubits measured in the measurement operation."""
|
|
68
68
|
|
|
69
|
-
CircuitMeasurementResultsBatch = list[CircuitMeasurementResults]
|
|
69
|
+
CircuitMeasurementResultsBatch: TypeAlias = list[CircuitMeasurementResults]
|
|
70
70
|
"""Type that represents measurement results for a batch of circuits."""
|
|
71
71
|
|
|
72
72
|
|
|
@@ -18,10 +18,11 @@ from iqm.station_control.interface.models import (
|
|
|
18
18
|
logger = logging.getLogger(__name__)
|
|
19
19
|
|
|
20
20
|
|
|
21
|
-
def create_static_quantum_architecture(chip_topology: ChipTopology) -> StaticQuantumArchitecture:
|
|
21
|
+
def create_static_quantum_architecture(dut_label: str, chip_topology: ChipTopology) -> StaticQuantumArchitecture:
|
|
22
22
|
"""Creates a static quantum architecture (SQA) for the given chip topology.
|
|
23
23
|
|
|
24
24
|
Args:
|
|
25
|
+
dut_label: Identifies the QPU that ``chip_topology`` describes.
|
|
25
26
|
chip_topology: The chip topology.
|
|
26
27
|
|
|
27
28
|
Returns:
|
|
@@ -40,6 +41,7 @@ def create_static_quantum_architecture(chip_topology: ChipTopology) -> StaticQua
|
|
|
40
41
|
# The components in each connection are already sorted, now we sort the connections
|
|
41
42
|
connectivity = sorted(unsorted_connections, key=sort_key)
|
|
42
43
|
return StaticQuantumArchitecture(
|
|
44
|
+
dut_label=dut_label,
|
|
43
45
|
qubits=chip_topology.qubits_sorted, # type: ignore[arg-type]
|
|
44
46
|
computational_resonators=chip_topology.computational_resonators_sorted, # type: ignore[arg-type]
|
|
45
47
|
connectivity=connectivity,
|
|
@@ -15,15 +15,17 @@
|
|
|
15
15
|
"""Utility functions for IQM Pulla."""
|
|
16
16
|
|
|
17
17
|
from collections import namedtuple
|
|
18
|
-
from collections.abc import Hashable, Iterable, Sequence, Set
|
|
18
|
+
from collections.abc import Hashable, Iterable, Iterator, Sequence, Set
|
|
19
19
|
from dataclasses import replace
|
|
20
20
|
from itertools import chain
|
|
21
|
-
from typing import Any
|
|
21
|
+
from typing import Any, TypeAlias
|
|
22
22
|
|
|
23
23
|
import numpy as np
|
|
24
|
+
from typing_extensions import deprecated
|
|
24
25
|
|
|
25
26
|
from exa.common.data.setting_node import SettingNode
|
|
26
27
|
from exa.common.data.value import ObservationValue
|
|
28
|
+
from exa.common.helpers.deprecation import format_deprecated
|
|
27
29
|
from exa.common.qcm_data.chip_topology import ChipTopology
|
|
28
30
|
from iqm.cpc.compiler.errors import CalibrationError, InsufficientContextError, UnknownCircuitExecutionOptionError
|
|
29
31
|
from iqm.cpc.compiler.station_settings import build_station_settings
|
|
@@ -42,9 +44,14 @@ from iqm.pulse.playlist.channel import ChannelProperties
|
|
|
42
44
|
from iqm.pulse.playlist.instructions import Instruction
|
|
43
45
|
from iqm.pulse.playlist.schedule import Schedule, Segment
|
|
44
46
|
from iqm.pulse.timebox import TimeBox
|
|
47
|
+
from iqm.station_control.client.qon import locus_str_to_locus
|
|
45
48
|
from iqm.station_control.interface.models.observation import ObservationBase
|
|
46
49
|
|
|
47
|
-
|
|
50
|
+
_CircuitMeasurementResultsNew: TypeAlias = dict[str, np.ndarray]
|
|
51
|
+
"""Measurement results from a single circuit/schedule. For each measurement operation in the circuit,
|
|
52
|
+
maps the measurement key to an array of results, where the first dimension correspond to shots,
|
|
53
|
+
and the second dimension to the qubits measured in the measurement operation."""
|
|
54
|
+
# TODO should replace CircuitMeasurementResults in the API
|
|
48
55
|
|
|
49
56
|
|
|
50
57
|
def circuit_operations_to_cpc(circ_ops: tuple[CircuitOperation], name: str | None = None) -> CPC_Circuit:
|
|
@@ -132,10 +139,11 @@ def _result_idx(label: str, circuit_idx: int, labels_for_circuit: list[list[str]
|
|
|
132
139
|
return len([circuit_labels for circuit_labels in labels_for_circuit[:circuit_idx] if label in circuit_labels])
|
|
133
140
|
|
|
134
141
|
|
|
142
|
+
@deprecated(format_deprecated("convert_sweep_spot", "convert_sweep_spot_to_arrays", "2025-09-25"))
|
|
135
143
|
def convert_sweep_spot(
|
|
136
144
|
results: dict[str, np.ndarray], readout_mappings: ReadoutMappingBatch
|
|
137
145
|
) -> CircuitMeasurementResultsBatch:
|
|
138
|
-
"""
|
|
146
|
+
"""Deprecated. Same as :func:`.convert_sweep_spot_to_arrays` but returns a less efficient format.
|
|
139
147
|
|
|
140
148
|
Args:
|
|
141
149
|
results: mapping of acquisition labels to 1D arrays of readout results with the length
|
|
@@ -146,31 +154,74 @@ def convert_sweep_spot(
|
|
|
146
154
|
Returns:
|
|
147
155
|
converted measurement results
|
|
148
156
|
|
|
157
|
+
"""
|
|
158
|
+
circuit_results_iter = convert_sweep_spot_to_arrays(results, readout_mappings)
|
|
159
|
+
return [{mk: array.tolist() for mk, array in circuit_res.items()} for circuit_res in circuit_results_iter]
|
|
160
|
+
|
|
161
|
+
|
|
162
|
+
def convert_sweep_spot_to_arrays(
|
|
163
|
+
results: dict[str, np.ndarray], readout_mappings: ReadoutMappingBatch
|
|
164
|
+
) -> Iterator[_CircuitMeasurementResultsNew]:
|
|
165
|
+
"""Convert the sweep measurement results from Station Control into circuit batch measurement results.
|
|
166
|
+
|
|
167
|
+
Args:
|
|
168
|
+
results: mapping of acquisition labels to 1D arrays of readout results with the length
|
|
169
|
+
``num_shots * num_triggers_for_label_in_batch``
|
|
170
|
+
readout_mappings: for each circuit in the batch, a mapping of measurement keys to corresponding
|
|
171
|
+
tuples of acquisition labels
|
|
172
|
+
|
|
173
|
+
Yields:
|
|
174
|
+
Converted measurement results for each circuit in the batch.
|
|
175
|
+
|
|
149
176
|
"""
|
|
150
177
|
num_triggers_for_label, labels_for_circuit = _get_trigger_indexing_for(readout_mappings)
|
|
151
178
|
first_key = next(iter(results))
|
|
152
179
|
num_shots = len(results[first_key]) // num_triggers_for_label[first_key] # num shots equal for all labels
|
|
153
|
-
|
|
154
180
|
results = {
|
|
155
|
-
label: measurements.reshape((num_shots, num_triggers_for_label[label]))
|
|
181
|
+
label: measurements.reshape((num_shots, num_triggers_for_label[label])).astype(np.uint8)
|
|
156
182
|
for label, measurements in results.items()
|
|
157
183
|
}
|
|
158
|
-
|
|
159
|
-
{
|
|
184
|
+
for circuit_idx, readout_mapping in enumerate(readout_mappings):
|
|
185
|
+
yield {
|
|
160
186
|
mk: np.stack(
|
|
161
187
|
[results[label][:, _result_idx(label, circuit_idx, labels_for_circuit)] for label in result_labels],
|
|
162
188
|
axis=1,
|
|
163
|
-
)
|
|
189
|
+
)
|
|
164
190
|
for mk, result_labels in readout_mapping.items()
|
|
165
191
|
}
|
|
166
|
-
for circuit_idx, readout_mapping in enumerate(readout_mappings)
|
|
167
|
-
]
|
|
168
192
|
|
|
169
193
|
|
|
194
|
+
@deprecated(
|
|
195
|
+
format_deprecated(
|
|
196
|
+
"convert_sweep_spot_with_heralding_mode_zero",
|
|
197
|
+
"convert_sweep_spot_to_arrays_with_heralding_mode_zero",
|
|
198
|
+
"2025-09-25",
|
|
199
|
+
)
|
|
200
|
+
)
|
|
170
201
|
def convert_sweep_spot_with_heralding_mode_zero(
|
|
171
202
|
results: dict[str, np.ndarray], readout_mappings: ReadoutMappingBatch
|
|
172
203
|
) -> CircuitMeasurementResultsBatch:
|
|
173
|
-
"""
|
|
204
|
+
"""Deprecated. Same as :func:`.convert_sweep_spot_to_arrays` but returns a less efficient format.
|
|
205
|
+
|
|
206
|
+
Args:
|
|
207
|
+
results: Mapping of acquisition labels to 1D arrays of readout results with the length
|
|
208
|
+
``num_shots * num_triggers_for_label_in_batch``. The herald
|
|
209
|
+
results are found under ``HERALDING_KEY``.
|
|
210
|
+
readout_mappings: For each circuit in the batch, a mapping of measurement keys to corresponding
|
|
211
|
+
tuples of acquisition labels.
|
|
212
|
+
|
|
213
|
+
Returns:
|
|
214
|
+
converted, filtered measurement results, with the heralding measurement data removed
|
|
215
|
+
|
|
216
|
+
"""
|
|
217
|
+
circuit_results_iter = convert_sweep_spot_to_arrays_with_heralding_mode_zero(results, readout_mappings)
|
|
218
|
+
return [{mk: array.tolist() for mk, array in circuit_res.items()} for circuit_res in circuit_results_iter]
|
|
219
|
+
|
|
220
|
+
|
|
221
|
+
def convert_sweep_spot_to_arrays_with_heralding_mode_zero(
|
|
222
|
+
results: dict[str, np.ndarray], readout_mappings: ReadoutMappingBatch
|
|
223
|
+
) -> Iterator[_CircuitMeasurementResultsNew]:
|
|
224
|
+
"""Like :func:`convert_sweep_spot_to_arrays`, but for results that contain heralding measurements.
|
|
174
225
|
|
|
175
226
|
* For each circuit we only keep the shots for which the heralding result is zero for all the
|
|
176
227
|
qubits used in the circuit.
|
|
@@ -182,16 +233,16 @@ def convert_sweep_spot_with_heralding_mode_zero(
|
|
|
182
233
|
readout_mappings: For each circuit in the batch, a mapping of measurement keys to corresponding
|
|
183
234
|
tuples of acquisition labels.
|
|
184
235
|
|
|
185
|
-
|
|
186
|
-
|
|
236
|
+
Yields:
|
|
237
|
+
Converted measurement results for each circuit in the batch, filtered based on the result of
|
|
238
|
+
the heralding measurement, , with the heralding measurement data removed.
|
|
187
239
|
|
|
188
240
|
"""
|
|
189
241
|
num_triggers_for_label, labels_for_circuit = _get_trigger_indexing_for(readout_mappings)
|
|
190
242
|
first_key = next(iter(results.keys()))
|
|
191
243
|
num_shots = len(results[first_key]) // num_triggers_for_label[first_key] # num shots equal for all labels
|
|
192
|
-
transformed_results: CircuitMeasurementResultsBatch = []
|
|
193
244
|
results = {
|
|
194
|
-
label: measurements.reshape((num_shots, num_triggers_for_label[label]))
|
|
245
|
+
label: measurements.reshape((num_shots, num_triggers_for_label[label])).astype(np.uint8)
|
|
195
246
|
for label, measurements in results.items()
|
|
196
247
|
}
|
|
197
248
|
for circuit_idx, readout_mapping in enumerate(readout_mappings):
|
|
@@ -210,17 +261,14 @@ def convert_sweep_spot_with_heralding_mode_zero(
|
|
|
210
261
|
raise RuntimeError(
|
|
211
262
|
f'Execution of circuit {circuit_idx} in heralding mode "{HeraldingMode.ZEROS}" discarded all the shots.'
|
|
212
263
|
)
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
}
|
|
222
|
-
)
|
|
223
|
-
return transformed_results
|
|
264
|
+
yield {
|
|
265
|
+
mk: np.stack(
|
|
266
|
+
[results[label][mask, _result_idx(label, circuit_idx, labels_for_circuit)] for label in labels],
|
|
267
|
+
axis=1,
|
|
268
|
+
)
|
|
269
|
+
for mk, labels in readout_mapping.items()
|
|
270
|
+
if mk != HERALDING_KEY
|
|
271
|
+
}
|
|
224
272
|
|
|
225
273
|
|
|
226
274
|
def extract_readout_controller_result_names(readout_mappings: ReadoutMappingBatch) -> set[str]:
|
|
@@ -238,10 +286,10 @@ def map_sweep_results_to_logical_qubits(
|
|
|
238
286
|
array of readout results, with ``shots * num_triggers_for_label`` elements.
|
|
239
287
|
readout_mappings: for each circuit in the batch, a mapping of measurement keys to corresponding
|
|
240
288
|
tuples of result parameter names.
|
|
241
|
-
heralding_mode:
|
|
289
|
+
heralding_mode: Whether we use heralded readout or not.
|
|
242
290
|
|
|
243
291
|
Returns:
|
|
244
|
-
|
|
292
|
+
Converted, filtered measurement results, with the heralding measurement data removed.
|
|
245
293
|
|
|
246
294
|
"""
|
|
247
295
|
# TODO the SC return data format should be rationalized, for example list[dict[str, np.ndarray]]
|
|
@@ -251,8 +299,14 @@ def map_sweep_results_to_logical_qubits(
|
|
|
251
299
|
# circuit execution uses just one soft sweep spot
|
|
252
300
|
results = {k: v[0] for k, v in sweep_results.items()}
|
|
253
301
|
if heralding_mode == HeraldingMode.NONE:
|
|
254
|
-
|
|
255
|
-
|
|
302
|
+
circuit_results_iter = convert_sweep_spot_to_arrays(results, readout_mappings)
|
|
303
|
+
else:
|
|
304
|
+
circuit_results_iter = convert_sweep_spot_to_arrays_with_heralding_mode_zero(results, readout_mappings)
|
|
305
|
+
|
|
306
|
+
# TODO 99% of the time in this function is spent in the tolist() converting the arrays to ints.
|
|
307
|
+
# For large datasets, it is several seconds.
|
|
308
|
+
# To rectify this, we should change CircuitMeasurementResultsBatch of the public API.
|
|
309
|
+
return [{mk: array.tolist() for mk, array in circuit_res.items()} for circuit_res in circuit_results_iter]
|
|
256
310
|
|
|
257
311
|
|
|
258
312
|
InstructionLocation = namedtuple("InstructionLocation", ["channel_name", "index", "duration"])
|
|
@@ -418,7 +472,7 @@ def calset_to_cal_data_tree(calibration_set: CalibrationSet) -> OpCalibrationDat
|
|
|
418
472
|
if len(path) < 5:
|
|
419
473
|
raise CalibrationError(f"Calibration observation name '{key}' is malformed.")
|
|
420
474
|
# treat the locus specially
|
|
421
|
-
locus =
|
|
475
|
+
locus = locus_str_to_locus(path[3])
|
|
422
476
|
locus = () if locus == ("",) else locus
|
|
423
477
|
# mypy likes this
|
|
424
478
|
set_path(tree.setdefault(path[1], {}).setdefault(path[2], {}).setdefault(locus, {}), path[4:], value) # type: ignore[arg-type]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: iqm-pulla
|
|
3
|
-
Version: 11.
|
|
3
|
+
Version: 11.10.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
|
|
@@ -219,7 +219,7 @@ License-File: AUTHORS.rst
|
|
|
219
219
|
Requires-Dist: iqm-exa-common<28,>=27
|
|
220
220
|
Requires-Dist: iqm-station-control-client<12,>=11
|
|
221
221
|
Requires-Dist: iqm-pulse<13,>=12
|
|
222
|
-
Requires-Dist: iqm-data-definitions<3.0,>=2.
|
|
222
|
+
Requires-Dist: iqm-data-definitions<3.0,>=2.18
|
|
223
223
|
Requires-Dist: pylatexenc==2.10
|
|
224
224
|
Requires-Dist: pydantic<3.0,>=2.10.4
|
|
225
225
|
Provides-Extra: notebook
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
11.10.0
|
iqm_pulla-11.8.0/version.txt
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
11.8.0
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{iqm_pulla-11.8.0 → iqm_pulla-11.10.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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|