iqm-pulla 11.14.0__tar.gz → 11.16.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.14.0 → iqm_pulla-11.16.1}/CHANGELOG.rst +21 -0
- {iqm_pulla-11.14.0 → iqm_pulla-11.16.1}/PKG-INFO +2 -2
- {iqm_pulla-11.14.0 → iqm_pulla-11.16.1}/requirements/qiskit.txt +2 -2
- {iqm_pulla-11.14.0 → iqm_pulla-11.16.1}/src/iqm/cpc/compiler/dd.py +10 -5
- {iqm_pulla-11.14.0 → iqm_pulla-11.16.1}/src/iqm/pulla/utils.py +31 -9
- {iqm_pulla-11.14.0 → iqm_pulla-11.16.1}/src/iqm_pulla.egg-info/PKG-INFO +2 -2
- iqm_pulla-11.16.1/version.txt +1 -0
- iqm_pulla-11.14.0/version.txt +0 -1
- {iqm_pulla-11.14.0 → iqm_pulla-11.16.1}/AUTHORS.rst +0 -0
- {iqm_pulla-11.14.0 → iqm_pulla-11.16.1}/LICENSE.txt +0 -0
- {iqm_pulla-11.14.0 → iqm_pulla-11.16.1}/MANIFEST.in +0 -0
- {iqm_pulla-11.14.0 → iqm_pulla-11.16.1}/README.rst +0 -0
- {iqm_pulla-11.14.0 → iqm_pulla-11.16.1}/docs/API.rst +0 -0
- {iqm_pulla-11.14.0 → iqm_pulla-11.16.1}/docs/Compilation Stages.ipynb +0 -0
- {iqm_pulla-11.14.0 → iqm_pulla-11.16.1}/docs/Configuration and Usage.ipynb +0 -0
- {iqm_pulla-11.14.0 → iqm_pulla-11.16.1}/docs/Custom Gates and Implementations.ipynb +0 -0
- {iqm_pulla-11.14.0 → iqm_pulla-11.16.1}/docs/Example - Compilation With Local Calibration Set.ipynb +0 -0
- {iqm_pulla-11.14.0 → iqm_pulla-11.16.1}/docs/Example - Executing QIR programs.ipynb +0 -0
- {iqm_pulla-11.14.0 → iqm_pulla-11.16.1}/docs/Example - Measuring T1.ipynb +0 -0
- {iqm_pulla-11.14.0 → iqm_pulla-11.16.1}/docs/Example - Randomized Benchmarking.ipynb +0 -0
- {iqm_pulla-11.14.0 → iqm_pulla-11.16.1}/docs/Example - Simple Dynamical Decoupling.ipynb +0 -0
- {iqm_pulla-11.14.0 → iqm_pulla-11.16.1}/docs/Quick Start.ipynb +0 -0
- {iqm_pulla-11.14.0 → iqm_pulla-11.16.1}/docs/_static/images/favicon.ico +0 -0
- {iqm_pulla-11.14.0 → iqm_pulla-11.16.1}/docs/_static/images/logo.png +0 -0
- {iqm_pulla-11.14.0 → iqm_pulla-11.16.1}/docs/_templates/autosummary-class-template.rst +0 -0
- {iqm_pulla-11.14.0 → iqm_pulla-11.16.1}/docs/_templates/autosummary-module-template.rst +0 -0
- {iqm_pulla-11.14.0 → iqm_pulla-11.16.1}/docs/authors.rst +0 -0
- {iqm_pulla-11.14.0 → iqm_pulla-11.16.1}/docs/changelog.rst +0 -0
- {iqm_pulla-11.14.0 → iqm_pulla-11.16.1}/docs/common_errors.rst +0 -0
- {iqm_pulla-11.14.0 → iqm_pulla-11.16.1}/docs/conf.py +0 -0
- {iqm_pulla-11.14.0 → iqm_pulla-11.16.1}/docs/examples.rst +0 -0
- {iqm_pulla-11.14.0 → iqm_pulla-11.16.1}/docs/index.rst +0 -0
- {iqm_pulla-11.14.0 → iqm_pulla-11.16.1}/docs/license.rst +0 -0
- {iqm_pulla-11.14.0 → iqm_pulla-11.16.1}/docs/migration_guide.rst +0 -0
- {iqm_pulla-11.14.0 → iqm_pulla-11.16.1}/docs/readme.rst +0 -0
- {iqm_pulla-11.14.0 → iqm_pulla-11.16.1}/docs/references.bib +0 -0
- {iqm_pulla-11.14.0 → iqm_pulla-11.16.1}/docs/references.rst +0 -0
- {iqm_pulla-11.14.0 → iqm_pulla-11.16.1}/docs/user_guides.rst +0 -0
- {iqm_pulla-11.14.0 → iqm_pulla-11.16.1}/pyproject.toml +0 -0
- {iqm_pulla-11.14.0 → iqm_pulla-11.16.1}/requirements/base.in +0 -0
- {iqm_pulla-11.14.0 → iqm_pulla-11.16.1}/requirements/base.in.internal +0 -0
- {iqm_pulla-11.14.0 → iqm_pulla-11.16.1}/requirements/base.txt +0 -0
- {iqm_pulla-11.14.0 → iqm_pulla-11.16.1}/requirements/notebook.in +0 -0
- {iqm_pulla-11.14.0 → iqm_pulla-11.16.1}/requirements/notebook.txt +0 -0
- {iqm_pulla-11.14.0 → iqm_pulla-11.16.1}/requirements/qir.in +0 -0
- {iqm_pulla-11.14.0 → iqm_pulla-11.16.1}/requirements/qir.txt +0 -0
- {iqm_pulla-11.14.0 → iqm_pulla-11.16.1}/requirements/qiskit.in.internal +0 -0
- {iqm_pulla-11.14.0 → iqm_pulla-11.16.1}/setup.cfg +0 -0
- {iqm_pulla-11.14.0 → iqm_pulla-11.16.1}/setup.py +0 -0
- {iqm_pulla-11.14.0 → iqm_pulla-11.16.1}/src/iqm/cpc/__init__.py +0 -0
- {iqm_pulla-11.14.0 → iqm_pulla-11.16.1}/src/iqm/cpc/compiler/__init__.py +0 -0
- {iqm_pulla-11.14.0 → iqm_pulla-11.16.1}/src/iqm/cpc/compiler/compiler.py +0 -0
- {iqm_pulla-11.14.0 → iqm_pulla-11.16.1}/src/iqm/cpc/compiler/errors.py +0 -0
- {iqm_pulla-11.14.0 → iqm_pulla-11.16.1}/src/iqm/cpc/compiler/standard_stages.py +0 -0
- {iqm_pulla-11.14.0 → iqm_pulla-11.16.1}/src/iqm/cpc/compiler/station_settings.py +0 -0
- {iqm_pulla-11.14.0 → iqm_pulla-11.16.1}/src/iqm/cpc/interface/__init__.py +0 -0
- {iqm_pulla-11.14.0 → iqm_pulla-11.16.1}/src/iqm/cpc/interface/compiler.py +0 -0
- {iqm_pulla-11.14.0 → iqm_pulla-11.16.1}/src/iqm/cpc/py.typed +0 -0
- {iqm_pulla-11.14.0 → iqm_pulla-11.16.1}/src/iqm/pulla/__init__.py +0 -0
- {iqm_pulla-11.14.0 → iqm_pulla-11.16.1}/src/iqm/pulla/calibration.py +0 -0
- {iqm_pulla-11.14.0 → iqm_pulla-11.16.1}/src/iqm/pulla/interface.py +0 -0
- {iqm_pulla-11.14.0 → iqm_pulla-11.16.1}/src/iqm/pulla/pulla.py +0 -0
- {iqm_pulla-11.14.0 → iqm_pulla-11.16.1}/src/iqm/pulla/py.typed +0 -0
- {iqm_pulla-11.14.0 → iqm_pulla-11.16.1}/src/iqm/pulla/quantum_architecture.py +0 -0
- {iqm_pulla-11.14.0 → iqm_pulla-11.16.1}/src/iqm/pulla/utils_cirq.py +0 -0
- {iqm_pulla-11.14.0 → iqm_pulla-11.16.1}/src/iqm/pulla/utils_dd.py +0 -0
- {iqm_pulla-11.14.0 → iqm_pulla-11.16.1}/src/iqm/pulla/utils_qir.py +0 -0
- {iqm_pulla-11.14.0 → iqm_pulla-11.16.1}/src/iqm/pulla/utils_qiskit.py +0 -0
- {iqm_pulla-11.14.0 → iqm_pulla-11.16.1}/src/iqm_pulla.egg-info/SOURCES.txt +0 -0
- {iqm_pulla-11.14.0 → iqm_pulla-11.16.1}/src/iqm_pulla.egg-info/dependency_links.txt +0 -0
- {iqm_pulla-11.14.0 → iqm_pulla-11.16.1}/src/iqm_pulla.egg-info/requires.txt +1 -1
- {iqm_pulla-11.14.0 → iqm_pulla-11.16.1}/src/iqm_pulla.egg-info/top_level.txt +0 -0
- {iqm_pulla-11.14.0 → iqm_pulla-11.16.1}/tests/.pylintrc +0 -0
- {iqm_pulla-11.14.0 → iqm_pulla-11.16.1}/tests/__init__.py +0 -0
- {iqm_pulla-11.14.0 → iqm_pulla-11.16.1}/tests/conftest.py +0 -0
|
@@ -2,6 +2,27 @@
|
|
|
2
2
|
Changelog
|
|
3
3
|
=========
|
|
4
4
|
|
|
5
|
+
Version 11.16.1 (2025-10-27)
|
|
6
|
+
============================
|
|
7
|
+
|
|
8
|
+
- Bump version for 4.3.1 release. No functional changes.
|
|
9
|
+
|
|
10
|
+
Version 11.16.0 (2025-10-22)
|
|
11
|
+
============================
|
|
12
|
+
|
|
13
|
+
Bug fixes
|
|
14
|
+
---------
|
|
15
|
+
|
|
16
|
+
- Complex return data is processed correctly
|
|
17
|
+
|
|
18
|
+
Version 11.15.0 (2025-10-15)
|
|
19
|
+
============================
|
|
20
|
+
|
|
21
|
+
Bug fixes
|
|
22
|
+
---------
|
|
23
|
+
|
|
24
|
+
- Correctly skips the addition of DD pulses if leading and trailing waits are flagged as True
|
|
25
|
+
|
|
5
26
|
Version 11.14.0 (2025-10-10)
|
|
6
27
|
============================
|
|
7
28
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: iqm-pulla
|
|
3
|
-
Version: 11.
|
|
3
|
+
Version: 11.16.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
|
|
@@ -239,8 +239,8 @@ Provides-Extra: qiskit
|
|
|
239
239
|
Requires-Dist: iqm-exa-common<28,>=27; extra == "qiskit"
|
|
240
240
|
Requires-Dist: iqm-station-control-client<12,>=11; extra == "qiskit"
|
|
241
241
|
Requires-Dist: iqm-pulse<13,>=12; extra == "qiskit"
|
|
242
|
-
Requires-Dist: iqm-client[qiskit]<33,>=32; extra == "qiskit"
|
|
243
242
|
Requires-Dist: iqm-client<33,>=32; extra == "qiskit"
|
|
243
|
+
Requires-Dist: iqm-client[qiskit]<33,>=32; extra == "qiskit"
|
|
244
244
|
|
|
245
245
|
IQM Pulla
|
|
246
246
|
#########
|
|
@@ -19,7 +19,11 @@ import math
|
|
|
19
19
|
|
|
20
20
|
from iqm.cpc.compiler.errors import ClientError
|
|
21
21
|
from iqm.cpc.interface.compiler import DDStrategy, PRXSequence
|
|
22
|
-
from iqm.pulla.utils import
|
|
22
|
+
from iqm.pulla.utils import (
|
|
23
|
+
InstructionLocation,
|
|
24
|
+
locate_instructions,
|
|
25
|
+
replace_instruction_in_place,
|
|
26
|
+
)
|
|
23
27
|
from iqm.pulse.builder import ScheduleBuilder
|
|
24
28
|
from iqm.pulse.gate_implementation import GateImplementation
|
|
25
29
|
from iqm.pulse.playlist.instructions import Instruction, Wait
|
|
@@ -193,10 +197,11 @@ def _find_wait_instructions_on_channels(
|
|
|
193
197
|
|
|
194
198
|
for wait in all_waits:
|
|
195
199
|
# Check if leading and/or trailing instruction should be excluded
|
|
196
|
-
if skip_leading_wait and wait.index ==
|
|
200
|
+
if skip_leading_wait and wait.index == 1:
|
|
197
201
|
continue
|
|
198
|
-
|
|
199
|
-
|
|
202
|
+
if skip_trailing_wait and wait.index == len(schedule[wait.channel_name]) - 3: # third last index
|
|
203
|
+
continue
|
|
204
|
+
if skip_trailing_wait and wait.index == len(schedule[wait.channel_name]) - 1: # last index
|
|
200
205
|
continue
|
|
201
206
|
filtered_waits.append(wait)
|
|
202
207
|
|
|
@@ -490,7 +495,7 @@ def insert_dd_sequences(
|
|
|
490
495
|
dd_sequences: list[tuple[int, PRXSequence, str]] = [
|
|
491
496
|
(
|
|
492
497
|
ratio,
|
|
493
|
-
_gate_pattern_to_prx_sequence(pattern) if isinstance(pattern, str) else pattern,
|
|
498
|
+
(_gate_pattern_to_prx_sequence(pattern) if isinstance(pattern, str) else pattern),
|
|
494
499
|
alignment,
|
|
495
500
|
)
|
|
496
501
|
for ratio, pattern, alignment in dd_sequences_sorted
|
|
@@ -18,6 +18,7 @@ from collections import namedtuple
|
|
|
18
18
|
from collections.abc import Hashable, Iterable, Iterator, Sequence, Set
|
|
19
19
|
from dataclasses import replace
|
|
20
20
|
from itertools import chain
|
|
21
|
+
import logging
|
|
21
22
|
from typing import Any, TypeAlias
|
|
22
23
|
|
|
23
24
|
import numpy as np
|
|
@@ -47,6 +48,8 @@ from iqm.pulse.timebox import TimeBox
|
|
|
47
48
|
from iqm.station_control.client.qon import locus_str_to_locus
|
|
48
49
|
from iqm.station_control.interface.models.observation import ObservationBase
|
|
49
50
|
|
|
51
|
+
logger = logging.getLogger(__name__)
|
|
52
|
+
|
|
50
53
|
_CircuitMeasurementResultsNew: TypeAlias = dict[str, np.ndarray]
|
|
51
54
|
"""Measurement results from a single circuit/schedule. For each measurement operation in the circuit,
|
|
52
55
|
maps the measurement key to an array of results, where the first dimension correspond to shots,
|
|
@@ -54,6 +57,10 @@ and the second dimension to the qubits measured in the measurement operation."""
|
|
|
54
57
|
# TODO should replace CircuitMeasurementResults in the API
|
|
55
58
|
|
|
56
59
|
|
|
60
|
+
class PostSelectionError(Exception):
|
|
61
|
+
"""Error in performing post selection via heralded results"""
|
|
62
|
+
|
|
63
|
+
|
|
57
64
|
def circuit_operations_to_cpc(circ_ops: tuple[CircuitOperation], name: str | None = None) -> CPC_Circuit:
|
|
58
65
|
"""Convert a list of CircuitOperations to an IQM CPC Circuit.
|
|
59
66
|
|
|
@@ -174,11 +181,18 @@ def convert_sweep_spot_to_arrays(
|
|
|
174
181
|
Converted measurement results for each circuit in the batch.
|
|
175
182
|
|
|
176
183
|
"""
|
|
184
|
+
|
|
185
|
+
def _fix_typing(arr: np.ndarray) -> np.ndarray:
|
|
186
|
+
"""Cast thresholded (int) results into np.uint8"""
|
|
187
|
+
if np.iscomplex(arr).any():
|
|
188
|
+
return arr
|
|
189
|
+
return arr.astype(np.uint8)
|
|
190
|
+
|
|
177
191
|
num_triggers_for_label, labels_for_circuit = _get_trigger_indexing_for(readout_mappings)
|
|
178
192
|
first_key = next(iter(results))
|
|
179
193
|
num_shots = len(results[first_key]) // num_triggers_for_label[first_key] # num shots equal for all labels
|
|
180
194
|
results = {
|
|
181
|
-
label: measurements.reshape((num_shots, num_triggers_for_label[label]))
|
|
195
|
+
label: _fix_typing(measurements.reshape((num_shots, num_triggers_for_label[label])))
|
|
182
196
|
for label, measurements in results.items()
|
|
183
197
|
}
|
|
184
198
|
for circuit_idx, readout_mapping in enumerate(readout_mappings):
|
|
@@ -238,6 +252,9 @@ def convert_sweep_spot_to_arrays_with_heralding_mode_zero(
|
|
|
238
252
|
the heralding measurement, , with the heralding measurement data removed.
|
|
239
253
|
|
|
240
254
|
"""
|
|
255
|
+
for data in results.values():
|
|
256
|
+
if np.iscomplex(data).any():
|
|
257
|
+
raise PostSelectionError("Complex readout results are not supported in post-selection.")
|
|
241
258
|
num_triggers_for_label, labels_for_circuit = _get_trigger_indexing_for(readout_mappings)
|
|
242
259
|
first_key = next(iter(results.keys()))
|
|
243
260
|
num_shots = len(results[first_key]) // num_triggers_for_label[first_key] # num shots equal for all labels
|
|
@@ -298,14 +315,19 @@ def map_sweep_results_to_logical_qubits(
|
|
|
298
315
|
|
|
299
316
|
# circuit execution uses just one soft sweep spot
|
|
300
317
|
results = {k: v[0] for k, v in sweep_results.items()}
|
|
301
|
-
if heralding_mode
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
318
|
+
if heralding_mode != HeraldingMode.NONE:
|
|
319
|
+
try:
|
|
320
|
+
# TODO 99% of the time in this function is spent in the tolist() converting the arrays to ints.
|
|
321
|
+
# For large datasets, it is several seconds.
|
|
322
|
+
# To rectify this, we should change CircuitMeasurementResultsBatch of the public API.
|
|
323
|
+
circuit_results_iter = convert_sweep_spot_to_arrays_with_heralding_mode_zero(results, readout_mappings)
|
|
324
|
+
return [{mk: array.tolist() for mk, array in circuit_res.items()} for circuit_res in circuit_results_iter]
|
|
325
|
+
except PostSelectionError:
|
|
326
|
+
logger.warning(
|
|
327
|
+
"Cannot perform post-selection based on herald measurement results in complex readout mode. "
|
|
328
|
+
"Returning all results."
|
|
329
|
+
)
|
|
330
|
+
circuit_results_iter = convert_sweep_spot_to_arrays(results, readout_mappings)
|
|
309
331
|
return [{mk: array.tolist() for mk, array in circuit_res.items()} for circuit_res in circuit_results_iter]
|
|
310
332
|
|
|
311
333
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: iqm-pulla
|
|
3
|
-
Version: 11.
|
|
3
|
+
Version: 11.16.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
|
|
@@ -239,8 +239,8 @@ Provides-Extra: qiskit
|
|
|
239
239
|
Requires-Dist: iqm-exa-common<28,>=27; extra == "qiskit"
|
|
240
240
|
Requires-Dist: iqm-station-control-client<12,>=11; extra == "qiskit"
|
|
241
241
|
Requires-Dist: iqm-pulse<13,>=12; extra == "qiskit"
|
|
242
|
-
Requires-Dist: iqm-client[qiskit]<33,>=32; extra == "qiskit"
|
|
243
242
|
Requires-Dist: iqm-client<33,>=32; extra == "qiskit"
|
|
243
|
+
Requires-Dist: iqm-client[qiskit]<33,>=32; extra == "qiskit"
|
|
244
244
|
|
|
245
245
|
IQM Pulla
|
|
246
246
|
#########
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
11.16.1
|
iqm_pulla-11.14.0/version.txt
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
11.14.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.14.0 → iqm_pulla-11.16.1}/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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|