iqm-pulla 8.0.0__py3-none-any.whl → 8.1.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.
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.1.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
@@ -10,18 +10,18 @@ iqm/cpc/compiler/station_settings.py,sha256=VuwD2TkraCXJql59nRE3RgiQXEmor8oCor1P
10
10
  iqm/cpc/interface/__init__.py,sha256=mvhNx1I9K5Sg40CwPntWj35M3Bni__23PWEw_qYaXtQ,611
11
11
  iqm/cpc/interface/compiler.py,sha256=VBIAU3J4_BvC4tPwapLEUNe6OSwIW7LID7RJ7yRWCHc,10036
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.1.0.dist-info/AUTHORS.rst,sha256=iCStz7WP5Jk7uMnn9jRA4ybS14X4yeUW2SsWE-OTaRk,328
23
+ iqm_pulla-8.1.0.dist-info/LICENSE.txt,sha256=cCj_biRA4Q8A77vxR8AuvAf-DZ5G79yxR_3lYY6TrmA,11333
24
+ iqm_pulla-8.1.0.dist-info/METADATA,sha256=1GPHbmxl6V-2ZXRz1PWWwYpbLCKCacC13S2aqnSOiHE,17691
25
+ iqm_pulla-8.1.0.dist-info/WHEEL,sha256=y4mX-SOX4fYIkonsAGA5N0Oy-8_gI4FXw5HNI1xqvWg,91
26
+ iqm_pulla-8.1.0.dist-info/top_level.txt,sha256=NB4XRfyDS6_wG9gMsyX-9LTU7kWnTQxNvkbzIxGv3-c,4
27
+ iqm_pulla-8.1.0.dist-info/RECORD,,