iqm-station-control-client 9.2.0__py3-none-any.whl → 9.4.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.
@@ -145,7 +145,7 @@ class _StationControlClientBase(StationControlInterface):
145
145
  params: dict[str, Any] | None = None,
146
146
  json_str: str | None = None,
147
147
  octets: bytes | None = None,
148
- timeout: int = 120,
148
+ timeout: int = 600,
149
149
  ) -> requests.Response:
150
150
  """Send an HTTP request.
151
151
 
@@ -159,6 +159,7 @@ class _StationControlClientBase(StationControlInterface):
159
159
  params: HTTP query parameters to store in the query string of the request URL.
160
160
  json_str: JSON string to store in the body, may contain arbitrary Unicode characters.
161
161
  octets: Pre-serialized binary data to store in the body.
162
+ timeout: Timeout for the request in seconds.
162
163
 
163
164
  Returns:
164
165
  Response to the request.
@@ -13,9 +13,10 @@
13
13
  # limitations under the License.
14
14
  """Dynamic quantum architecture (DQA) related interface models."""
15
15
 
16
+ from typing import Any
16
17
  from uuid import UUID
17
18
 
18
- from pydantic import Field, StrictStr
19
+ from pydantic import Field, StrictStr, field_validator
19
20
 
20
21
  from iqm.station_control.interface.pydantic_base import PydanticBase
21
22
 
@@ -59,6 +60,26 @@ class GateInfo(PydanticBase):
59
60
  )
60
61
  """Mapping of loci to implementation names that override ``default_implementation`` for those loci."""
61
62
 
63
+ @field_validator("override_default_implementation", mode="before")
64
+ @classmethod
65
+ def override_default_implementation_validator(cls, value: Any) -> dict[Locus, str]:
66
+ """Converts locus keys to tuples if they are encoded as strings."""
67
+ new_value = {}
68
+ if isinstance(value, dict):
69
+ for k, v in value.items():
70
+ if isinstance(k, tuple):
71
+ new_value[k] = v
72
+ # When Pydantic serializes a dict with tuple keys into JSON, the keys are turned into
73
+ # comma-separated strings (because JSON only supports string keys). Here we convert
74
+ # them back into tuples.
75
+ elif isinstance(k, str):
76
+ new_k = tuple(k.split(","))
77
+ new_value[new_k] = v
78
+ else:
79
+ raise ValueError("'override_default_implementation' keys must be strings or tuples.")
80
+ return new_value
81
+ raise ValueError("'override_default_implementation' must be a dict.")
82
+
62
83
 
63
84
  class DynamicQuantumArchitecture(PydanticBase):
64
85
  """The dynamic quantum architecture (DQA).
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: iqm-station-control-client
3
- Version: 9.2.0
3
+ Version: 9.4.0
4
4
  Summary: Python client for communicating with Station Control Service
5
5
  Author-email: IQM Finland Oy <info@meetiqm.com>
6
6
  License: Apache License
@@ -1,6 +1,6 @@
1
1
  iqm/station_control/client/__init__.py,sha256=1ND-AkIE9xLGIscH3WN44eyll9nlFhXeyCm-8EDFGQ4,942
2
2
  iqm/station_control/client/list_models.py,sha256=7JJyn5jCBOvMBJWdsVsPRLhtChMxqLa6O9hElpeXEt8,2701
3
- iqm/station_control/client/station_control.py,sha256=S-0YdGLKla0v98ntABbij7sXXxP-CwkynbzqQRf21s0,28167
3
+ iqm/station_control/client/station_control.py,sha256=tEvqS1KFrF6auNuF-UwFF-DfikWga6iC35HvnLMmTPw,28224
4
4
  iqm/station_control/client/utils.py,sha256=-6K4KgOgA4iyUCqX-w26JvFxlwlGBehGj4tIWCEbn74,3360
5
5
  iqm/station_control/client/iqm_server/__init__.py,sha256=nLsRHN1rnOKXwuzaq_liUpAYV3sis5jkyHccSdacV7U,624
6
6
  iqm/station_control/client/iqm_server/error.py,sha256=a8l7UTnzfbD8KDHP-uOve77S6LR1ai9uM_J_xHbLs0Y,1175
@@ -39,7 +39,7 @@ iqm/station_control/interface/pydantic_base.py,sha256=pQCa-8SRgBKMSwG-KyXA1HcIxE
39
39
  iqm/station_control/interface/station_control.py,sha256=Uh9bDEZjc9M5KOYsGjPMYVhnYsfVQfjT05sUjUSoDXA,20303
40
40
  iqm/station_control/interface/models/__init__.py,sha256=Kg-XRLuU7G4Zjtu8LhYD-v3zkCYHzLFaNvC_nukezlQ,1968
41
41
  iqm/station_control/interface/models/dut.py,sha256=Hc_0XllXeIPGWhHsY7PC_jMpi7swpqo3jQQEQVnF3AM,1216
42
- iqm/station_control/interface/models/dynamic_quantum_architecture.py,sha256=5W8e5oRNxvXm2nI36NipDrErg2vHdpC8zzpeGyqSNDQ,3621
42
+ iqm/station_control/interface/models/dynamic_quantum_architecture.py,sha256=3YlI9e1XxdbkBzlOdxmzYTccJ8AJRnRSIp-JoBf8Yyw,4698
43
43
  iqm/station_control/interface/models/jobs.py,sha256=4CVVGMsUOm_UO4w7UH-Shq7cbZe_5MkhGDpoBwHoHkc,5105
44
44
  iqm/station_control/interface/models/monitor.py,sha256=ItlgxtBup1hHg64uKeMKiFE7MaRRqSYdVRttsFD_XeU,1352
45
45
  iqm/station_control/interface/models/observation.py,sha256=FwhlI2xXZ_2-PA-LcDvscHuTbfdTWhw67zSNa9Buuvg,3261
@@ -49,8 +49,8 @@ iqm/station_control/interface/models/sequence.py,sha256=boWlMfP3woVgVObW3OaNbxsU
49
49
  iqm/station_control/interface/models/static_quantum_architecture.py,sha256=gsfJKlYsfZVEK3dqEKXkBSIHiY14DGwNbhPJdNHMtNM,1435
50
50
  iqm/station_control/interface/models/sweep.py,sha256=HFoFIrKhlYmHIBfGltY2O9_J28OvkkZILRbDHuqR0wc,2509
51
51
  iqm/station_control/interface/models/type_aliases.py,sha256=gEYJ8zOpV1m0NVyYUbAL43psp9Lxw_0t68mYlI65Sds,1262
52
- iqm_station_control_client-9.2.0.dist-info/LICENSE.txt,sha256=R6Q7eUrLyoCQgWYorQ8WJmVmWKYU3dxA3jYUp0wwQAw,11332
53
- iqm_station_control_client-9.2.0.dist-info/METADATA,sha256=d7_hAZoOPhfQwjy5oi76B6jXE6U5v2aZ5-Qj1EIugxA,14010
54
- iqm_station_control_client-9.2.0.dist-info/WHEEL,sha256=y4mX-SOX4fYIkonsAGA5N0Oy-8_gI4FXw5HNI1xqvWg,91
55
- iqm_station_control_client-9.2.0.dist-info/top_level.txt,sha256=NB4XRfyDS6_wG9gMsyX-9LTU7kWnTQxNvkbzIxGv3-c,4
56
- iqm_station_control_client-9.2.0.dist-info/RECORD,,
52
+ iqm_station_control_client-9.4.0.dist-info/LICENSE.txt,sha256=R6Q7eUrLyoCQgWYorQ8WJmVmWKYU3dxA3jYUp0wwQAw,11332
53
+ iqm_station_control_client-9.4.0.dist-info/METADATA,sha256=M4FFW1-VlPczAy4Y_ya3f59SQGxQ4zPkR2yVJX8Rnhg,14010
54
+ iqm_station_control_client-9.4.0.dist-info/WHEEL,sha256=y4mX-SOX4fYIkonsAGA5N0Oy-8_gI4FXw5HNI1xqvWg,91
55
+ iqm_station_control_client-9.4.0.dist-info/top_level.txt,sha256=NB4XRfyDS6_wG9gMsyX-9LTU7kWnTQxNvkbzIxGv3-c,4
56
+ iqm_station_control_client-9.4.0.dist-info/RECORD,,