iqm-client 29.10.0__py3-none-any.whl → 29.11.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/iqm_client/iqm_client.py +31 -0
- iqm/iqm_client/models.py +14 -0
- {iqm_client-29.10.0.dist-info → iqm_client-29.11.0.dist-info}/METADATA +1 -1
- {iqm_client-29.10.0.dist-info → iqm_client-29.11.0.dist-info}/RECORD +9 -9
- {iqm_client-29.10.0.dist-info → iqm_client-29.11.0.dist-info}/AUTHORS.rst +0 -0
- {iqm_client-29.10.0.dist-info → iqm_client-29.11.0.dist-info}/LICENSE.txt +0 -0
- {iqm_client-29.10.0.dist-info → iqm_client-29.11.0.dist-info}/WHEEL +0 -0
- {iqm_client-29.10.0.dist-info → iqm_client-29.11.0.dist-info}/entry_points.txt +0 -0
- {iqm_client-29.10.0.dist-info → iqm_client-29.11.0.dist-info}/top_level.txt +0 -0
iqm/iqm_client/iqm_client.py
CHANGED
|
@@ -65,6 +65,7 @@ import requests
|
|
|
65
65
|
from requests import HTTPError
|
|
66
66
|
|
|
67
67
|
from iqm.station_control.client.iqm_server.iqm_server_client import IqmServerClient
|
|
68
|
+
from iqm.station_control.client.qon import ObservationFinder
|
|
68
69
|
from iqm.station_control.client.utils import init_station_control
|
|
69
70
|
from iqm.station_control.interface.models import ObservationLite
|
|
70
71
|
from iqm.station_control.interface.station_control import StationControlInterface
|
|
@@ -907,3 +908,33 @@ class IQMClient:
|
|
|
907
908
|
except json.decoder.JSONDecodeError as e:
|
|
908
909
|
raise EndpointRequestError(f"Invalid response: {response.text}, {e!r}") from e
|
|
909
910
|
return model
|
|
911
|
+
|
|
912
|
+
def get_structured_metrics(self, calibration_set_id: UUID | None = None) -> ObservationFinder:
|
|
913
|
+
"""Retrieve the given calibration set and related quality metrics from the server.
|
|
914
|
+
|
|
915
|
+
Args:
|
|
916
|
+
calibration_set_id: ID of the calibration set to retrieve.
|
|
917
|
+
If ``None``, the current default calibration set is retrieved.
|
|
918
|
+
|
|
919
|
+
Returns:
|
|
920
|
+
Requested calibration set and related quality metrics in a searchable structure.
|
|
921
|
+
|
|
922
|
+
Raises:
|
|
923
|
+
EndpointRequestError: did not understand the endpoint response
|
|
924
|
+
ClientAuthenticationError: no valid authentication provided
|
|
925
|
+
HTTPException: HTTP exceptions
|
|
926
|
+
|
|
927
|
+
"""
|
|
928
|
+
if isinstance(self._station_control, IqmServerClient):
|
|
929
|
+
raise ValueError("The get_structured_metrics method is not supported by IqmServerClient.")
|
|
930
|
+
|
|
931
|
+
if not calibration_set_id:
|
|
932
|
+
# find out the default calset id
|
|
933
|
+
default_calset = self._station_control.get_default_calibration_set()
|
|
934
|
+
calibration_set_id = default_calset.observation_set_id
|
|
935
|
+
|
|
936
|
+
calset_obs = self._station_control.get_observation_set_observations(calibration_set_id)
|
|
937
|
+
quality_metrics = self._station_control.get_calibration_set_quality_metrics(calibration_set_id)
|
|
938
|
+
qm_obs = quality_metrics.observations
|
|
939
|
+
|
|
940
|
+
return ObservationFinder(list(calset_obs) + qm_obs)
|
iqm/iqm_client/models.py
CHANGED
|
@@ -714,6 +714,20 @@ class GateInfo(BaseModel):
|
|
|
714
714
|
loci_sorted = sorted(loci_set, key=lambda locus: tuple(map(_component_sort_key, locus)))
|
|
715
715
|
return tuple(loci_sorted)
|
|
716
716
|
|
|
717
|
+
def get_default_implementation(self, locus: Locus) -> str:
|
|
718
|
+
"""Default implementation of this gate for the given locus.
|
|
719
|
+
|
|
720
|
+
Args:
|
|
721
|
+
locus: gate locus
|
|
722
|
+
|
|
723
|
+
Returns:
|
|
724
|
+
Name of the default implementation of this gate for ``locus``.
|
|
725
|
+
|
|
726
|
+
"""
|
|
727
|
+
if (impl := self.override_default_implementation.get(locus)) is not None:
|
|
728
|
+
return impl
|
|
729
|
+
return self.default_implementation
|
|
730
|
+
|
|
717
731
|
|
|
718
732
|
class DynamicQuantumArchitecture(BaseModel):
|
|
719
733
|
"""Dynamic quantum architecture as returned by server.
|
|
@@ -21,8 +21,8 @@ iqm/iqm_client/__init__.py,sha256=D-8W54EcQIxk_1JZo_86GYlR1YitHhPIiFwwLJ2IfGE,14
|
|
|
21
21
|
iqm/iqm_client/api.py,sha256=_c6OVuv2dyzBF7J2XlK_qxisTSPyOiI4gYokZPsuaJY,3083
|
|
22
22
|
iqm/iqm_client/authentication.py,sha256=kHFqPI6w3OAk9k5ioPxi-FrD2EP-vjn8Z_wZYccJVyE,12259
|
|
23
23
|
iqm/iqm_client/errors.py,sha256=ty2P-sg80zlAoL3_kC3PlprgDUv4PI-KFhmmxaaapS0,1429
|
|
24
|
-
iqm/iqm_client/iqm_client.py,sha256=
|
|
25
|
-
iqm/iqm_client/models.py,sha256=
|
|
24
|
+
iqm/iqm_client/iqm_client.py,sha256=yrrpJlSW4N9TCp5zeokHk2lU8N5guYpU643HCMX5oOI,40994
|
|
25
|
+
iqm/iqm_client/models.py,sha256=Sdx_J7wBCM7E_arusU3eC6dQfqu5dpADywr-9JmFvsY,51597
|
|
26
26
|
iqm/iqm_client/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
27
27
|
iqm/iqm_client/transpile.py,sha256=eEv9eY5QG94Lke7Xp6BkQapl1rvlmlVQ_IkQFopPNQ8,36981
|
|
28
28
|
iqm/iqm_client/util.py,sha256=FLRUhhi0YDxomVtilCVPJLixyijFtU10PVefIx-eelw,1516
|
|
@@ -56,10 +56,10 @@ iqm/qiskit_iqm/fake_backends/fake_apollo.py,sha256=eT2vd3kQBi1rrvxCpePymBCfFK84d
|
|
|
56
56
|
iqm/qiskit_iqm/fake_backends/fake_deneb.py,sha256=RzQXmLXmBARDiMKVxk5Aw9fVbc6IYlW0A5jibk9iYD0,3156
|
|
57
57
|
iqm/qiskit_iqm/fake_backends/fake_garnet.py,sha256=GI0xafTCj1Um09qVuccO6GPOGBm6ygul_O40Wu220Ys,5555
|
|
58
58
|
iqm/qiskit_iqm/fake_backends/iqm_fake_backend.py,sha256=wJtfsxjPYbDKmzaz5R4AuaXvvPHa21WyPtRgNctL9eY,16785
|
|
59
|
-
iqm_client-29.
|
|
60
|
-
iqm_client-29.
|
|
61
|
-
iqm_client-29.
|
|
62
|
-
iqm_client-29.
|
|
63
|
-
iqm_client-29.
|
|
64
|
-
iqm_client-29.
|
|
65
|
-
iqm_client-29.
|
|
59
|
+
iqm_client-29.11.0.dist-info/AUTHORS.rst,sha256=qsxeK5A3-B_xK3hNbhFHEIkoHNpo7sdzYyRTs7Bdtm8,795
|
|
60
|
+
iqm_client-29.11.0.dist-info/LICENSE.txt,sha256=2DXrmQtVVUV9Fc9RBFJidMiTEaQlG2oAtlC9PMrEwTk,11333
|
|
61
|
+
iqm_client-29.11.0.dist-info/METADATA,sha256=yvcSPUwsECazAvq9XipwpCL511HB2NGswPmSdlflKn4,17591
|
|
62
|
+
iqm_client-29.11.0.dist-info/WHEEL,sha256=y4mX-SOX4fYIkonsAGA5N0Oy-8_gI4FXw5HNI1xqvWg,91
|
|
63
|
+
iqm_client-29.11.0.dist-info/entry_points.txt,sha256=Kk2qfRwk8vbIJ7qCAvmaUogfRRn6t92_hBFhe6kqAE4,1317
|
|
64
|
+
iqm_client-29.11.0.dist-info/top_level.txt,sha256=NB4XRfyDS6_wG9gMsyX-9LTU7kWnTQxNvkbzIxGv3-c,4
|
|
65
|
+
iqm_client-29.11.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|