iqm-pulla 8.0.0__py3-none-any.whl → 8.2.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -16,7 +16,7 @@
16
16
  from collections import Counter
17
17
  from dataclasses import dataclass, field
18
18
  from enum import StrEnum
19
- from typing import Final, TypeAlias
19
+ from typing import TypeAlias
20
20
 
21
21
  from exa.common.data.setting_node import SettingNode
22
22
  from iqm.pulse.builder import CircuitOperation, Locus
@@ -44,10 +44,10 @@ class MeasurementMode(StrEnum):
44
44
  Measurement results which are not required by the circuits to be executed are discarded.
45
45
  """
46
46
 
47
- CIRCUIT: Final[str] = "circuit"
47
+ CIRCUIT = "circuit"
48
48
  """In each circuit separately, measure only the components that have final measurement
49
49
  operations on them."""
50
- ALL: Final[str] = "all"
50
+ ALL = "all"
51
51
  """Measure all the components on the QPU that have measurement data in the calset.
52
52
  This is typically how measurement is calibrated."""
53
53
 
@@ -55,9 +55,9 @@ class MeasurementMode(StrEnum):
55
55
  class HeraldingMode(StrEnum):
56
56
  """Heralding mode for circuit execution."""
57
57
 
58
- NONE: Final[str] = "none"
58
+ NONE = "none"
59
59
  """Do not do any heralding."""
60
- ZEROS: Final[str] = "zeros"
60
+ ZEROS = "zeros"
61
61
  """Perform a heralding measurement on all the components used in each circuit (if they have
62
62
  measurement data available in the calset), only retain shots where all the components
63
63
  are measured to be in the zero state."""
@@ -66,9 +66,9 @@ class HeraldingMode(StrEnum):
66
66
  class DDMode(StrEnum):
67
67
  """Dynamical Decoupling (DD) mode for circuit execution."""
68
68
 
69
- DISABLED: Final[str] = "disabled"
69
+ DISABLED = "disabled"
70
70
  """Do not apply dynamical decoupling."""
71
- ENABLED: Final[str] = "enabled"
71
+ ENABLED = "enabled"
72
72
  """Apply dynamical decoupling."""
73
73
 
74
74
 
@@ -127,7 +127,7 @@ class DDStrategy:
127
127
  class CircuitBoundaryMode(StrEnum):
128
128
  """Circuit boundary mode for circuit compilation."""
129
129
 
130
- NEIGHBOUR: Final[str] = "neighbour"
130
+ NEIGHBOUR = "neighbour"
131
131
  """
132
132
  Circuit boundary consists of those QPU elements (qubits and couplers) that
133
133
  are adjacent to the qubits and couplers used by the circuit, but do not belong to them.
@@ -136,33 +136,33 @@ class CircuitBoundaryMode(StrEnum):
136
136
  * Boundary qubits are connected to a circuit qubit by any coupler, but are not circuit qubits themselves.
137
137
  * Boundary couplers are connected to at least one circuit qubit, but are not used in the circuit themselves.
138
138
  """
139
- ALL: Final[str] = "all"
139
+ ALL = "all"
140
140
  """Circuit boundary consists of all the QPU elements that are not used in the circuit."""
141
141
 
142
142
 
143
143
  class MoveGateValidationMode(StrEnum):
144
144
  """MOVE gate validation mode for circuit compilation."""
145
145
 
146
- STRICT: Final[str] = "strict"
146
+ STRICT = "strict"
147
147
  """Perform standard MOVE gate validation: MOVE(qubit, resonator) gates must only
148
148
  appear in sandwiches (pairs). Inside a sandwich there must be no gates acting on the
149
149
  MOVE qubit, and no other MOVE gates acting on the resonator."""
150
- ALLOW_PRX: Final[str] = "allow_prx"
150
+ ALLOW_PRX = "allow_prx"
151
151
  """Allow PRX gates on the MOVE qubit inside MOVE sandwiches during validation."""
152
- NONE: Final[str] = "none"
152
+ NONE = "none"
153
153
  """Do not perform any MOVE gate validation."""
154
154
 
155
155
 
156
156
  class MoveGateFrameTrackingMode(StrEnum):
157
157
  """MOVE gate frame tracking mode for circuit compilation."""
158
158
 
159
- FULL: Final[str] = "full"
159
+ FULL = "full"
160
160
  """Perform complete MOVE gate frame tracking, applying both the explicit z rotations
161
161
  on the resonator and the dynamic phase correction due to qubit-resonator detuning to
162
162
  the qubit at the end of a MOVE sandwich."""
163
- NO_DETUNING_CORRECTION: Final[str] = "no_detuning_correction"
163
+ NO_DETUNING_CORRECTION = "no_detuning_correction"
164
164
  """Do not apply the detuning correction at the end of a MOVE sandwich."""
165
- NONE: Final[str] = "none"
165
+ NONE = "none"
166
166
  """Do not perform any MOVE gate frame tracking."""
167
167
 
168
168
 
iqm/pulla/calibration.py CHANGED
@@ -18,7 +18,6 @@ from copy import deepcopy
18
18
  import logging
19
19
  import uuid
20
20
 
21
- from exa.common.data.value import ObservationValue
22
21
  from iqm.pulla.interface import CalibrationSet, CalibrationSetId
23
22
  from iqm.pulla.utils import calset_from_observations
24
23
  from iqm.station_control.client.iqm_server.iqm_server_client import IqmServerClient
@@ -38,7 +37,7 @@ class CalibrationDataProvider:
38
37
  self._calibration_sets: dict[CalibrationSetId, CalibrationSet] = {}
39
38
 
40
39
  def get_calibration_set(self, cal_set_id: CalibrationSetId) -> CalibrationSet:
41
- """Get the calibration set from the database and cache it."""
40
+ """Get the calibration set contents from the database and cache it."""
42
41
  logger.debug("Get the calibration set from the database: cal_set_id=%s", cal_set_id)
43
42
  try:
44
43
  if cal_set_id not in self._calibration_sets:
@@ -48,20 +47,21 @@ class CalibrationDataProvider:
48
47
  except Exception as e:
49
48
  raise CalibrationDataFetchException("Could not fetch calibration set from the database.") from e
50
49
 
51
- def get_latest_calibration_set(self, chip_label) -> tuple[CalibrationSet, CalibrationSetId]:
52
- """Get the latest calibration set id for chip label from the database."""
50
+ def get_latest_calibration_set(self, chip_label: str) -> tuple[CalibrationSet, CalibrationSetId]:
51
+ """Get the latest calibration set id for ``chip_label`` from the database, return it and the set contents."""
53
52
  logger.debug("Get the latest calibration set for chip label: chip_label=%s", chip_label)
54
53
  try:
55
54
  if isinstance(self._station_control, IqmServerClient):
56
55
  latest_cal_set_id = self._station_control.get_latest_calibration_set_id(chip_label)
57
- latest_calibration_set = self.get_calibration_set(latest_cal_set_id), latest_cal_set_id
58
56
  else:
59
57
  latest_calibration_set = self._get_latest_calibration_set(chip_label)
58
+ latest_cal_set_id = latest_calibration_set.observation_set_id
59
+ calset = self.get_calibration_set(latest_cal_set_id)
60
60
  except Exception as e:
61
61
  raise CalibrationDataFetchException(
62
62
  f"Could not fetch latest calibration set id from the database: {e}"
63
63
  ) from e
64
- return latest_calibration_set, latest_calibration_set.observation_set_id
64
+ return calset, latest_cal_set_id
65
65
 
66
66
  def _get_latest_calibration_set(self, dut_label: str) -> ObservationSetData:
67
67
  observation_sets = self._station_control.query_observation_sets(
@@ -74,8 +74,8 @@ class CalibrationDataProvider:
74
74
  )
75
75
  return observation_sets[0]
76
76
 
77
- def get_calibration_set_values(self, calibration_set_id: uuid.UUID) -> dict[str, ObservationValue]:
78
- """Get saved calibration set observations by UUID
77
+ def get_calibration_set_values(self, calibration_set_id: uuid.UUID) -> CalibrationSet:
78
+ """Get saved calibration set observations by UUID.
79
79
 
80
80
  Args:
81
81
  calibration_set_id: UUID of the calibration set to retrieve.
iqm/pulla/utils.py CHANGED
@@ -15,7 +15,7 @@
15
15
  """Utility functions for IQM Pulla."""
16
16
 
17
17
  from collections import namedtuple
18
- from collections.abc import Hashable, Iterable, Sequence
18
+ from collections.abc import Hashable, Iterable, Sequence, Set
19
19
  from dataclasses import replace
20
20
  from itertools import chain
21
21
  from typing import Any
@@ -493,7 +493,7 @@ def find_circuit_boundary(
493
493
  circuit_components: set[str] | frozenset[str],
494
494
  circuit_couplers: set[str],
495
495
  device: ChipTopology,
496
- ) -> tuple[set[str], set[str]]:
496
+ ) -> tuple[Set[str], Set[str]]:
497
497
  """Determine the boundary of a circuit executed on the QPU.
498
498
 
499
499
  See :class:`.CircuitBoundaryMode` for the definitions of the circuit boundaries.
iqm/pulla/utils_qir.py CHANGED
@@ -147,7 +147,7 @@ def _parse_double(value: str) -> float:
147
147
 
148
148
 
149
149
  def qir_to_pulla( # noqa: PLR0915, PLR0912
150
- pulla: Pulla, qir: str | bytes, qubit_mapping: dict[int:str] | None = None
150
+ pulla: Pulla, qir: str | bytes, qubit_mapping: dict[int, str] | None = None
151
151
  ) -> tuple[list[CPC_Circuit], Compiler]:
152
152
  """Convert a QIR module to a CPC circuit.
153
153
 
iqm/pulla/utils_qiskit.py CHANGED
@@ -32,8 +32,9 @@ from iqm.pulla.interface import StationControlResult, TaskStatus
32
32
  from iqm.pulse.builder import CircuitOperation
33
33
 
34
34
  if TYPE_CHECKING:
35
+ from iqm.iqm_client import Circuit, Instruction
35
36
  from iqm.qiskit_iqm.iqm_backend import DynamicQuantumArchitecture
36
- from iqm.qiskit_iqm.iqm_provider import Circuit, Instruction, IQMBackend
37
+ from iqm.qiskit_iqm.iqm_provider import IQMBackend
37
38
 
38
39
  from iqm.cpc.compiler.compiler import Compiler
39
40
  from iqm.pulla.pulla import Pulla
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: iqm-pulla
3
- Version: 8.0.0
3
+ Version: 8.2.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
@@ -239,8 +239,8 @@ 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
241
  Requires-Dist: iqm-pulse <10,>=9 ; extra == 'qiskit'
242
- Requires-Dist: iqm-client[qiskit] <30,>=29 ; extra == 'qiskit'
243
242
  Requires-Dist: iqm-client <30,>=29 ; extra == 'qiskit'
243
+ Requires-Dist: iqm-client[qiskit] <30,>=29 ; extra == 'qiskit'
244
244
 
245
245
  IQM Pulla
246
246
  #########
@@ -8,20 +8,20 @@ iqm/cpc/compiler/errors.py,sha256=tz-8g1QtDvCAPmAjjCYK3FoULrazkpSTmXIvyqukaT4,19
8
8
  iqm/cpc/compiler/standard_stages.py,sha256=eOPvdesEr-Oe469fil6ZyPUvzaWZHNjia5Vgkqr9jT8,33601
9
9
  iqm/cpc/compiler/station_settings.py,sha256=VuwD2TkraCXJql59nRE3RgiQXEmor8oCor1P1WC0rkk,16717
10
10
  iqm/cpc/interface/__init__.py,sha256=mvhNx1I9K5Sg40CwPntWj35M3Bni__23PWEw_qYaXtQ,611
11
- iqm/cpc/interface/compiler.py,sha256=VBIAU3J4_BvC4tPwapLEUNe6OSwIW7LID7RJ7yRWCHc,10036
11
+ iqm/cpc/interface/compiler.py,sha256=2x3ZhL4WcyjwlSoZ3KhlmRcLxboz_ptS0M_rdX1z0c8,9861
12
12
  iqm/pulla/__init__.py,sha256=fj5Qh8R9K-z6q5g9-CySBZsG8d33nU7hCHrqIIB8_-0,901
13
- iqm/pulla/calibration.py,sha256=tZJ_q9i1ndRxuPZIaDCyznxNu1LIUIwJ53Vf3t9VOkY,4537
13
+ iqm/pulla/calibration.py,sha256=c_SNlTxXC0y-ahDY7JY53N7SofU5WUWMrNBogtdfHl4,4523
14
14
  iqm/pulla/interface.py,sha256=yymQo4REHYcUOWgPxPYq9IixS9bBZ27LXLQgJhzET58,5400
15
15
  iqm/pulla/pulla.py,sha256=PTSU0ft0Q0gt4k6n_gj4sznxnT9cAgd37eGeDhu9S5A,14007
16
16
  iqm/pulla/quantum_architecture.py,sha256=T3rrv4sg1zD6bCY5Jb6Lp8yE3E0YVTh2nK0KZttjK6s,6208
17
- iqm/pulla/utils.py,sha256=ZIJCmdufUjV_OJnaKTGWy64rhPOPDS0PYt1LtYdpTIc,24618
17
+ iqm/pulla/utils.py,sha256=nzUg0ASAaNHtfoY3TRMEzy90dLyoX3LEIKGKybS7Gm8,24623
18
18
  iqm/pulla/utils_cirq.py,sha256=8SBy6w7cr4AmnCgKwh7dBWwBGfGKxnoEMv9-1yfKs0A,777
19
19
  iqm/pulla/utils_dd.py,sha256=SxYAuRBgvYELKjeXpFbP4mM0xCCivDk7WUHw7oEXfMo,1695
20
- iqm/pulla/utils_qir.py,sha256=6-VrdSXGZJnr2gNy9VEg449hIRv_P59iEvsFZPUlIn4,10018
21
- iqm/pulla/utils_qiskit.py,sha256=SG_YHHlQnmutlXiDayh-U1aYl4r2dJJHmAX0l5q0BdQ,10078
22
- iqm_pulla-8.0.0.dist-info/AUTHORS.rst,sha256=iCStz7WP5Jk7uMnn9jRA4ybS14X4yeUW2SsWE-OTaRk,328
23
- iqm_pulla-8.0.0.dist-info/LICENSE.txt,sha256=cCj_biRA4Q8A77vxR8AuvAf-DZ5G79yxR_3lYY6TrmA,11333
24
- iqm_pulla-8.0.0.dist-info/METADATA,sha256=1HJknYlgrrfOHwaq8LP659CX9lyMqICX5IJzO7hVp_Y,17691
25
- iqm_pulla-8.0.0.dist-info/WHEEL,sha256=y4mX-SOX4fYIkonsAGA5N0Oy-8_gI4FXw5HNI1xqvWg,91
26
- iqm_pulla-8.0.0.dist-info/top_level.txt,sha256=NB4XRfyDS6_wG9gMsyX-9LTU7kWnTQxNvkbzIxGv3-c,4
27
- iqm_pulla-8.0.0.dist-info/RECORD,,
20
+ iqm/pulla/utils_qir.py,sha256=s5igks5ctvmHiaFjT3eSAYyKWTbW-rPFE6NApN66CTE,10019
21
+ iqm/pulla/utils_qiskit.py,sha256=SyL9zz9xZ3mEi8t5uJVLxe3ipgNf4REZURMJQRr2E-E,10108
22
+ iqm_pulla-8.2.0.dist-info/AUTHORS.rst,sha256=iCStz7WP5Jk7uMnn9jRA4ybS14X4yeUW2SsWE-OTaRk,328
23
+ iqm_pulla-8.2.0.dist-info/LICENSE.txt,sha256=cCj_biRA4Q8A77vxR8AuvAf-DZ5G79yxR_3lYY6TrmA,11333
24
+ iqm_pulla-8.2.0.dist-info/METADATA,sha256=VyQtf3k3VffAd6PMsEkEAsNZXA4qLjcDilBm8p4azd0,17691
25
+ iqm_pulla-8.2.0.dist-info/WHEEL,sha256=y4mX-SOX4fYIkonsAGA5N0Oy-8_gI4FXw5HNI1xqvWg,91
26
+ iqm_pulla-8.2.0.dist-info/top_level.txt,sha256=NB4XRfyDS6_wG9gMsyX-9LTU7kWnTQxNvkbzIxGv3-c,4
27
+ iqm_pulla-8.2.0.dist-info/RECORD,,