boulder-opal-scale-up-sdk 1.0.0__py3-none-any.whl → 1.0.1__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.
- boulder_opal_scale_up_sdk-1.0.1.dist-info/LICENSE +805 -0
- {boulder_opal_scale_up_sdk-1.0.0.dist-info → boulder_opal_scale_up_sdk-1.0.1.dist-info}/METADATA +17 -7
- boulder_opal_scale_up_sdk-1.0.1.dist-info/RECORD +60 -0
- boulderopalscaleupsdk/agent/worker.py +22 -11
- boulderopalscaleupsdk/common/dtypes.py +68 -111
- boulderopalscaleupsdk/device/__init__.py +5 -1
- boulderopalscaleupsdk/device/config_loader.py +10 -8
- boulderopalscaleupsdk/device/controller/__init__.py +17 -14
- boulderopalscaleupsdk/device/controller/base.py +12 -3
- boulderopalscaleupsdk/device/controller/qblox.py +43 -17
- boulderopalscaleupsdk/device/controller/quantum_machines.py +60 -59
- boulderopalscaleupsdk/device/controller/resolver.py +117 -0
- boulderopalscaleupsdk/device/defcal.py +61 -0
- boulderopalscaleupsdk/device/device.py +8 -2
- boulderopalscaleupsdk/device/processor/__init__.py +9 -1
- boulderopalscaleupsdk/device/processor/common.py +129 -20
- boulderopalscaleupsdk/device/processor/superconducting_processor.py +59 -13
- boulderopalscaleupsdk/experiments/__init__.py +8 -0
- boulderopalscaleupsdk/experiments/common.py +8 -4
- boulderopalscaleupsdk/experiments/power_rabi.py +3 -3
- boulderopalscaleupsdk/experiments/ramsey.py +13 -6
- boulderopalscaleupsdk/experiments/readout_classifier_calibration.py +24 -0
- boulderopalscaleupsdk/experiments/resonator_spectroscopy.py +3 -3
- boulderopalscaleupsdk/experiments/resonator_spectroscopy_by_bias.py +10 -10
- boulderopalscaleupsdk/experiments/resonator_spectroscopy_by_power.py +3 -3
- boulderopalscaleupsdk/experiments/transmon_anharmonicity.py +68 -0
- boulderopalscaleupsdk/experiments/transmon_resonator_chi_scan.py +56 -0
- boulderopalscaleupsdk/experiments/transmon_spectroscopy.py +69 -0
- boulderopalscaleupsdk/grpc_interceptors/auth.py +5 -2
- boulderopalscaleupsdk/plotting/__init__.py +20 -2
- boulderopalscaleupsdk/plotting/dtypes.py +81 -117
- boulderopalscaleupsdk/protobuf/v1/agent_pb2.py +17 -17
- boulderopalscaleupsdk/protobuf/v1/agent_pb2.pyi +8 -6
- boulderopalscaleupsdk/protobuf/v1/agent_pb2_grpc.py +13 -13
- boulderopalscaleupsdk/protobuf/v1/device_pb2.py +35 -17
- boulderopalscaleupsdk/protobuf/v1/device_pb2.pyi +40 -6
- boulderopalscaleupsdk/protobuf/v1/device_pb2_grpc.py +116 -14
- boulderopalscaleupsdk/routines/__init__.py +1 -4
- boulderopalscaleupsdk/routines/resonator_mapping.py +8 -2
- boulderopalscaleupsdk/stubs/__init__.py +12 -0
- boulderopalscaleupsdk/stubs/dtypes.py +47 -0
- boulderopalscaleupsdk/stubs/maps.py +9 -0
- boulderopalscaleupsdk/third_party/quantum_machines/__init__.py +32 -0
- boulderopalscaleupsdk/third_party/quantum_machines/config.py +30 -9
- boulder_opal_scale_up_sdk-1.0.0.dist-info/RECORD +0 -50
- {boulder_opal_scale_up_sdk-1.0.0.dist-info → boulder_opal_scale_up_sdk-1.0.1.dist-info}/WHEEL +0 -0
@@ -0,0 +1,56 @@
|
|
1
|
+
# Copyright 2025 Q-CTRL. All rights reserved.
|
2
|
+
#
|
3
|
+
# Licensed under the Q-CTRL Terms of service (the "License"). Unauthorized
|
4
|
+
# copying or use of this file, via any medium, is strictly prohibited.
|
5
|
+
# Proprietary and confidential. You may not use this file except in compliance
|
6
|
+
# with the License. You may obtain a copy of the License at
|
7
|
+
#
|
8
|
+
# https://q-ctrl.com/terms
|
9
|
+
#
|
10
|
+
# Unless required by applicable law or agreed to in writing, software
|
11
|
+
# distributed under the License is distributed on an "AS IS" BASIS. See the
|
12
|
+
# License for the specific language.
|
13
|
+
|
14
|
+
from pydantic import PrivateAttr
|
15
|
+
|
16
|
+
from boulderopalscaleupsdk.experiments.common import (
|
17
|
+
CWSIterable,
|
18
|
+
Experiment,
|
19
|
+
HypIterable,
|
20
|
+
LinspaceIterable,
|
21
|
+
RangeIterable,
|
22
|
+
)
|
23
|
+
|
24
|
+
DEFAULT_RECYCLE_DELAY_NS = 10_000
|
25
|
+
DEFAULT_SHOT_COUNT = 100
|
26
|
+
|
27
|
+
|
28
|
+
class TransmonResonatorChiScan(Experiment):
|
29
|
+
"""
|
30
|
+
Parameters for running an experiment to find the dispersive shift for a transmon
|
31
|
+
resonator pair.
|
32
|
+
|
33
|
+
Attributes
|
34
|
+
----------
|
35
|
+
transmon : str
|
36
|
+
The reference for the transmon to target in the experiment.
|
37
|
+
frequencies : list[int] or LinspaceIterable or RangeIterable or CWSIterable
|
38
|
+
or HypIterable or None, optional
|
39
|
+
The frequencies at which to scan.
|
40
|
+
If None, frequencies around the readout frequency will be used.
|
41
|
+
recycle_delay_ns : int, optional
|
42
|
+
The delay time between consecutive shots of the experiment, in nanoseconds.
|
43
|
+
Defaults to 10000 ns.
|
44
|
+
shot_count : int, optional
|
45
|
+
The number of shots to be taken in the experiment.
|
46
|
+
Defaults to 100.
|
47
|
+
"""
|
48
|
+
|
49
|
+
_experiment_name: str = PrivateAttr("transmon_resonator_chi_scan")
|
50
|
+
|
51
|
+
transmon: str
|
52
|
+
frequencies: list[int] | LinspaceIterable | RangeIterable | CWSIterable | HypIterable | None = (
|
53
|
+
None
|
54
|
+
)
|
55
|
+
recycle_delay_ns: int = DEFAULT_RECYCLE_DELAY_NS
|
56
|
+
shot_count: int = DEFAULT_SHOT_COUNT
|
@@ -0,0 +1,69 @@
|
|
1
|
+
# Copyright 2025 Q-CTRL. All rights reserved.
|
2
|
+
#
|
3
|
+
# Licensed under the Q-CTRL Terms of service (the "License"). Unauthorized
|
4
|
+
# copying or use of this file, via any medium, is strictly prohibited.
|
5
|
+
# Proprietary and confidential. You may not use this file except in compliance
|
6
|
+
# with the License. You may obtain a copy of the License at
|
7
|
+
#
|
8
|
+
# https://q-ctrl.com/terms
|
9
|
+
#
|
10
|
+
# Unless required by applicable law or agreed to in writing, software
|
11
|
+
# distributed under the License is distributed on an "AS IS" BASIS. See the
|
12
|
+
# License for the specific language.
|
13
|
+
|
14
|
+
from pydantic import PrivateAttr
|
15
|
+
|
16
|
+
from .common import (
|
17
|
+
CWSIterable,
|
18
|
+
Experiment,
|
19
|
+
HypIterable,
|
20
|
+
LinspaceIterable,
|
21
|
+
RangeIterable,
|
22
|
+
)
|
23
|
+
|
24
|
+
DEFAULT_DURATION_NS = 2000 # ns
|
25
|
+
DEFAULT_RECYCLE_DELAY_NS = 1000 # ns
|
26
|
+
DEFAULT_SHOT_COUNT = 100
|
27
|
+
|
28
|
+
|
29
|
+
class TransmonSpectroscopy(Experiment):
|
30
|
+
"""
|
31
|
+
Parameters for running a transmon spectroscopy experiment.
|
32
|
+
|
33
|
+
Parameters
|
34
|
+
----------
|
35
|
+
transmon : str
|
36
|
+
The reference for the transmon to target in the experiment.
|
37
|
+
frequencies : list[int] or LinspaceIterable or RangeIterable or CWSIterable
|
38
|
+
or HypIterable or None, optional
|
39
|
+
The frequencies at which to scan.
|
40
|
+
If None, frequencies around the readout frequency will be used.
|
41
|
+
spec_amplitude : float
|
42
|
+
The amplitude of the spectroscopy pulse.
|
43
|
+
spec_duration : int
|
44
|
+
The duration of the spectroscopy pulse, in nanoseconds.
|
45
|
+
readout_amplitude : float
|
46
|
+
The amplitude of the readout pulse.
|
47
|
+
duration_ns : int, optional
|
48
|
+
The duration of the readout pulse, in nanoseconds.
|
49
|
+
Defaults to 2000 ns.
|
50
|
+
recycle_delay_ns : int, optional
|
51
|
+
The delay time between consecutive shots of the experiment, in nanoseconds.
|
52
|
+
Defaults to 1000 ns.
|
53
|
+
shot_count : int, optional
|
54
|
+
The number of shots to be taken in the experiment.
|
55
|
+
Defaults to 100.
|
56
|
+
"""
|
57
|
+
|
58
|
+
_experiment_name: str = PrivateAttr("transmon_spectroscopy")
|
59
|
+
|
60
|
+
transmon: str
|
61
|
+
frequencies: list[int] | LinspaceIterable | RangeIterable | CWSIterable | HypIterable | None = (
|
62
|
+
None
|
63
|
+
)
|
64
|
+
spec_amplitude: float
|
65
|
+
spec_duration: int
|
66
|
+
readout_amplitude: float
|
67
|
+
duration_ns: int = DEFAULT_DURATION_NS
|
68
|
+
recycle_delay_ns: int = DEFAULT_RECYCLE_DELAY_NS
|
69
|
+
shot_count: int = DEFAULT_SHOT_COUNT
|
@@ -12,10 +12,13 @@
|
|
12
12
|
# License for the specific language.
|
13
13
|
|
14
14
|
import inspect
|
15
|
+
from typing import TYPE_CHECKING
|
15
16
|
|
16
17
|
import grpc
|
17
18
|
import grpc.aio
|
18
|
-
|
19
|
+
|
20
|
+
if TYPE_CHECKING:
|
21
|
+
from qctrlclient import ApiKeyAuth # pyright: ignore[reportMissingImports]
|
19
22
|
|
20
23
|
|
21
24
|
class AuthInterceptor(
|
@@ -28,7 +31,7 @@ class AuthInterceptor(
|
|
28
31
|
grpc.aio.StreamUnaryClientInterceptor,
|
29
32
|
grpc.aio.StreamStreamClientInterceptor,
|
30
33
|
):
|
31
|
-
def __init__(self, auth: ApiKeyAuth):
|
34
|
+
def __init__(self, auth: "ApiKeyAuth"):
|
32
35
|
self.auth = auth
|
33
36
|
|
34
37
|
def _add_auth_metadata(self, client_call_details):
|
@@ -14,11 +14,29 @@
|
|
14
14
|
"""Plotting library."""
|
15
15
|
|
16
16
|
__all__ = [
|
17
|
+
"HeatmapData",
|
18
|
+
"HistogramData",
|
19
|
+
"HistogramPlot",
|
20
|
+
"LinePlot",
|
17
21
|
"Marker",
|
18
22
|
"Plot",
|
23
|
+
"PlotConfig",
|
19
24
|
"PlotData1D",
|
20
|
-
"
|
25
|
+
"PlotReport",
|
26
|
+
"Ticks",
|
21
27
|
"VLine",
|
22
28
|
]
|
23
29
|
|
24
|
-
from .dtypes import
|
30
|
+
from .dtypes import (
|
31
|
+
HeatmapData,
|
32
|
+
HistogramData,
|
33
|
+
HistogramPlot,
|
34
|
+
LinePlot,
|
35
|
+
Marker,
|
36
|
+
Plot,
|
37
|
+
PlotConfig,
|
38
|
+
PlotData1D,
|
39
|
+
PlotReport,
|
40
|
+
Ticks,
|
41
|
+
VLine,
|
42
|
+
)
|
@@ -19,9 +19,9 @@ from pydantic import (
|
|
19
19
|
BaseModel,
|
20
20
|
BeforeValidator,
|
21
21
|
ConfigDict,
|
22
|
+
Field,
|
22
23
|
PlainSerializer,
|
23
24
|
ValidationError,
|
24
|
-
model_validator,
|
25
25
|
)
|
26
26
|
from pydantic.dataclasses import dataclass
|
27
27
|
|
@@ -35,17 +35,13 @@ def _array_validator(value: Any) -> np.ndarray:
|
|
35
35
|
array = np.asarray(value, order="C")
|
36
36
|
|
37
37
|
if array.dtype == np.dtypes.ObjectDType:
|
38
|
-
raise ValidationError("Invalid array.")
|
38
|
+
raise ValidationError("Invalid array type.")
|
39
39
|
|
40
40
|
return array
|
41
41
|
|
42
42
|
|
43
43
|
def _array_serializer(array: np.ndarray) -> dict[str, Any]:
|
44
|
-
return {
|
45
|
-
"data": base64.b64encode(array),
|
46
|
-
"dtype": str(array.dtype),
|
47
|
-
"shape": array.shape,
|
48
|
-
}
|
44
|
+
return {"data": base64.b64encode(array), "dtype": str(array.dtype), "shape": array.shape}
|
49
45
|
|
50
46
|
|
51
47
|
_SerializableArray = Annotated[
|
@@ -55,29 +51,51 @@ _SerializableArray = Annotated[
|
|
55
51
|
]
|
56
52
|
|
57
53
|
|
54
|
+
@dataclass
|
55
|
+
class PlotReport:
|
56
|
+
text: str
|
57
|
+
title: str = "Report"
|
58
|
+
|
59
|
+
|
60
|
+
@dataclass
|
61
|
+
class Ticks:
|
62
|
+
values: list[float]
|
63
|
+
labels: list[str]
|
64
|
+
|
65
|
+
def __post_init__(self):
|
66
|
+
if len(self.values) != len(self.labels):
|
67
|
+
raise ValueError("Ticks values and labels must have the same length.")
|
68
|
+
|
69
|
+
|
70
|
+
class PlotConfig(BaseModel):
|
71
|
+
model_config = ConfigDict(extra="forbid")
|
72
|
+
|
73
|
+
title: str
|
74
|
+
|
75
|
+
x_label: str
|
76
|
+
y_label: str
|
77
|
+
|
78
|
+
x_bounds: tuple[float, float] | None = None
|
79
|
+
y_bounds: tuple[float, float] | None = None
|
80
|
+
|
81
|
+
x_ticks: Ticks | None = None
|
82
|
+
y_ticks: Ticks | None = None
|
83
|
+
|
84
|
+
reverse_yaxis: bool = False
|
85
|
+
|
86
|
+
report: PlotReport | None = None
|
87
|
+
|
88
|
+
|
58
89
|
@dataclass(config=ConfigDict(arbitrary_types_allowed=True))
|
59
90
|
class PlotData1D:
|
60
|
-
"""
|
61
|
-
A class to represent 1D plot data with optional error bars.
|
62
|
-
|
63
|
-
Attributes
|
64
|
-
----------
|
65
|
-
x : np.ndarray
|
66
|
-
The x-coordinates of the data points.
|
67
|
-
y : np.ndarray
|
68
|
-
The y-coordinates of the data points.
|
69
|
-
x_error : np.ndarray or None, optional
|
70
|
-
The errors in the x-coordinates. Defaults to None.
|
71
|
-
y_error : np.ndarray or None, optional
|
72
|
-
The errors in the y-coordinates. Defaults to None.
|
73
|
-
label : str or None, optional
|
74
|
-
The label for the data to display in the legend. Defaults to None.
|
75
|
-
"""
|
76
|
-
|
77
91
|
x: _SerializableArray
|
78
92
|
y: _SerializableArray
|
93
|
+
|
94
|
+
style: Literal["dash", "solid", "scatter"]
|
95
|
+
|
79
96
|
x_error: _SerializableArray | None = None
|
80
97
|
y_error: _SerializableArray | None = None
|
98
|
+
|
81
99
|
label: str | None = None
|
82
100
|
|
83
101
|
def __post_init__(self):
|
@@ -87,7 +105,6 @@ class PlotData1D:
|
|
87
105
|
raise ValueError("y must be 1D.")
|
88
106
|
if len(self.x) != len(self.y):
|
89
107
|
raise ValueError("The length of x and y must match.")
|
90
|
-
|
91
108
|
if self.x_error is not None and self.x_error.shape != self.x.shape:
|
92
109
|
raise ValueError("The shapes of x and x_error must match.")
|
93
110
|
if self.y_error is not None and self.y_error.shape != self.y.shape:
|
@@ -95,27 +112,16 @@ class PlotData1D:
|
|
95
112
|
|
96
113
|
|
97
114
|
@dataclass(config=ConfigDict(arbitrary_types_allowed=True))
|
98
|
-
class
|
99
|
-
"""
|
100
|
-
A class to represent 2D plot data.
|
101
|
-
|
102
|
-
Attributes
|
103
|
-
----------
|
104
|
-
x : np.ndarray
|
105
|
-
The x-coordinates of the data points.
|
106
|
-
y : np.ndarray
|
107
|
-
The y-coordinates of the data points.
|
108
|
-
z : np.ndarray
|
109
|
-
The z-values corresponding to each (x, y) pair.
|
110
|
-
label : str or None, optional
|
111
|
-
The label for the data to display in the legend. Defaults to None.
|
112
|
-
"""
|
113
|
-
|
115
|
+
class HeatmapData:
|
114
116
|
x: _SerializableArray
|
115
117
|
y: _SerializableArray
|
116
118
|
z: _SerializableArray
|
119
|
+
|
117
120
|
label: str | None = None
|
118
121
|
|
122
|
+
# Whether to display the heatmap values as text.
|
123
|
+
heatmap_text: bool = False
|
124
|
+
|
119
125
|
def __post_init__(self):
|
120
126
|
if self.x.ndim != 1:
|
121
127
|
raise ValueError("x must be 1D.")
|
@@ -143,79 +149,37 @@ class VLine:
|
|
143
149
|
color: str | None = None
|
144
150
|
|
145
151
|
|
146
|
-
class
|
147
|
-
""
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
heatmap
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
The values at which y-ticks are placed.
|
181
|
-
Must be specified alongside yticklabels. Defaults to None.
|
182
|
-
yticklabels : list[str] or None, optional
|
183
|
-
The labels for the y-ticks.
|
184
|
-
Must be specified alongside xticks. Defaults to None.
|
185
|
-
x_label : str, optional
|
186
|
-
The label for the x-axis. Defaults to "X-axis".
|
187
|
-
y_label : str, optional
|
188
|
-
The label for the y-axis. Defaults to "Y-axis".
|
189
|
-
reverse_yaxis : bool, optional
|
190
|
-
If True, the y-axis is reversed. Defaults to False.
|
191
|
-
fit_report : str or None, optional
|
192
|
-
An optional report for the fit.
|
193
|
-
"""
|
194
|
-
|
195
|
-
heatmap: PlotData2D | None = None
|
196
|
-
heatmap_text: bool = False
|
197
|
-
points: PlotData1D | None = None
|
198
|
-
best_fit: PlotData1D | None = None
|
199
|
-
reference_fit: PlotData1D | None = None
|
200
|
-
markers: list[Marker] | None = None
|
201
|
-
vlines: list[VLine] | None = None
|
202
|
-
title: str | None = None
|
203
|
-
xticks: list[float] | None = None
|
204
|
-
xticklabels: list[str] | None = None
|
205
|
-
yticks: list[float] | None = None
|
206
|
-
yticklabels: list[str] | None = None
|
207
|
-
x_label: str = "X-axis"
|
208
|
-
y_label: str = "Y-axis"
|
209
|
-
reverse_yaxis: bool | None = False
|
210
|
-
fit_report: str | None = None
|
211
|
-
|
212
|
-
@model_validator(mode="after")
|
213
|
-
def validate_ticks(self) -> "Plot":
|
214
|
-
# Check ticks and ticklabels consistency.
|
215
|
-
if not ((self.xticks is not None) ^ (self.xticklabels is None)):
|
216
|
-
raise ValueError("Both xticks and xticklabels must be provided together.")
|
217
|
-
|
218
|
-
if not ((self.yticks is not None) ^ (self.yticklabels is None)):
|
219
|
-
raise ValueError("Both yticks and yticklabels must be provided together.")
|
220
|
-
|
221
|
-
return self
|
152
|
+
class LinePlot(BaseModel):
|
153
|
+
model_config = ConfigDict(extra="forbid")
|
154
|
+
|
155
|
+
plot_type: Literal["line_plot"] = "line_plot"
|
156
|
+
|
157
|
+
config: PlotConfig
|
158
|
+
heatmap: HeatmapData | None = None
|
159
|
+
lines: Annotated[list[PlotData1D], Field(min_length=1)]
|
160
|
+
markers: list[Marker] = []
|
161
|
+
vlines: list[VLine] = []
|
162
|
+
|
163
|
+
|
164
|
+
@dataclass(config=ConfigDict(arbitrary_types_allowed=True))
|
165
|
+
class HistogramData:
|
166
|
+
data: _SerializableArray
|
167
|
+
label: str | None = None
|
168
|
+
opacity: float = 0.7
|
169
|
+
|
170
|
+
def __post_init__(self):
|
171
|
+
if self.data.ndim != 1:
|
172
|
+
raise ValueError("data must be 1D.")
|
173
|
+
|
174
|
+
|
175
|
+
class HistogramPlot(BaseModel):
|
176
|
+
model_config = ConfigDict(extra="forbid")
|
177
|
+
|
178
|
+
plot_type: Literal["histogram"] = "histogram"
|
179
|
+
|
180
|
+
config: PlotConfig
|
181
|
+
histograms: list[HistogramData]
|
182
|
+
vlines: list[VLine] = []
|
183
|
+
|
184
|
+
|
185
|
+
Plot = LinePlot | HistogramPlot
|
@@ -17,7 +17,7 @@ from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2
|
|
17
17
|
from google.protobuf import struct_pb2 as google_dot_protobuf_dot_struct__pb2
|
18
18
|
|
19
19
|
|
20
|
-
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n-boulderopalscaleupsdk/protobuf/v1/agent.proto\x12!boulderopalscaleupsdk.protobuf.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a\x1cgoogle/protobuf/struct.proto\"
|
20
|
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n-boulderopalscaleupsdk/protobuf/v1/agent.proto\x12!boulderopalscaleupsdk.protobuf.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a\x1cgoogle/protobuf/struct.proto\"\x85\x01\n\x11RunProgramRequest\x12\'\n\x0f\x63ontroller_type\x18\x01 \x01(\tR\x0e\x63ontrollerType\x12\x18\n\x07program\x18\x02 \x01(\tR\x07program\x12-\n\x12\x63\x61librate_elements\x18\x03 \x03(\tR\x11\x63\x61librateElements\"H\n\x12RunProgramResponse\x12\x32\n\x08raw_data\x18\x01 \x01(\x0b\x32\x17.google.protobuf.StructR\x07rawData\"_\n)RunQuantumMachinesMixerCalibrationRequest\x12\x1a\n\x08\x65lements\x18\x01 \x03(\tR\x08\x65lements\x12\x16\n\x06\x63onfig\x18\x02 \x01(\tR\x06\x63onfig\"k\n*RunQuantumMachinesMixerCalibrationResponse\x12\x18\n\x07success\x18\x01 \x01(\x08R\x07success\x12\x19\n\x05\x65rror\x18\x02 \x01(\tH\x00R\x05\x65rror\x88\x01\x01\x42\x08\n\x06_error\"G\n\x15\x44isplayResultsRequest\x12\x18\n\x07message\x18\x01 \x01(\tR\x07message\x12\x14\n\x05plots\x18\x02 \x03(\tR\x05plots\"F\n\x16\x44isplayResultsResponse\x12,\n\x05\x65mpty\x18\x01 \x01(\x0b\x32\x16.google.protobuf.EmptyR\x05\x65mpty2\xd0\x04\n\x0c\x41gentService\x12\x9b\x01\n\nRunProgram\x12\x34.boulderopalscaleupsdk.protobuf.v1.RunProgramRequest\x1a\x35.boulderopalscaleupsdk.protobuf.v1.RunProgramResponse\" \x82\xd3\xe4\x93\x02\x1a\"\x15/v1/agent/run_program:\x01*\x12\xf3\x01\n\"RunQuantumMachinesMixerCalibration\x12L.boulderopalscaleupsdk.protobuf.v1.RunQuantumMachinesMixerCalibrationRequest\x1aM.boulderopalscaleupsdk.protobuf.v1.RunQuantumMachinesMixerCalibrationResponse\"0\x82\xd3\xe4\x93\x02*\"%/v1/agent/run_qua_calibration_program:\x01*\x12\xab\x01\n\x0e\x44isplayResults\x12\x38.boulderopalscaleupsdk.protobuf.v1.DisplayResultsRequest\x1a\x39.boulderopalscaleupsdk.protobuf.v1.DisplayResultsResponse\"$\x82\xd3\xe4\x93\x02\x1e\"\x19/v1/agent/display_results:\x01*B\xa9\x02\n%com.boulderopalscaleupsdk.protobuf.v1B\nAgentProtoP\x01ZNgithub.com/qctrl/boulder-opal-scale-up/proto/boulderopalscaleupsdk/protobuf/v1\xa2\x02\x03\x42PX\xaa\x02!Boulderopalscaleupsdk.Protobuf.V1\xca\x02!Boulderopalscaleupsdk\\Protobuf\\V1\xe2\x02-Boulderopalscaleupsdk\\Protobuf\\V1\\GPBMetadata\xea\x02#Boulderopalscaleupsdk::Protobuf::V1b\x06proto3')
|
21
21
|
|
22
22
|
_globals = globals()
|
23
23
|
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
@@ -25,24 +25,24 @@ _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'boulderopalscaleupsdk.proto
|
|
25
25
|
if not _descriptor._USE_C_DESCRIPTORS:
|
26
26
|
_globals['DESCRIPTOR']._loaded_options = None
|
27
27
|
_globals['DESCRIPTOR']._serialized_options = b'\n%com.boulderopalscaleupsdk.protobuf.v1B\nAgentProtoP\001ZNgithub.com/qctrl/boulder-opal-scale-up/proto/boulderopalscaleupsdk/protobuf/v1\242\002\003BPX\252\002!Boulderopalscaleupsdk.Protobuf.V1\312\002!Boulderopalscaleupsdk\\Protobuf\\V1\342\002-Boulderopalscaleupsdk\\Protobuf\\V1\\GPBMetadata\352\002#Boulderopalscaleupsdk::Protobuf::V1'
|
28
|
-
_globals['_AGENTSERVICE'].methods_by_name['
|
29
|
-
_globals['_AGENTSERVICE'].methods_by_name['
|
28
|
+
_globals['_AGENTSERVICE'].methods_by_name['RunProgram']._loaded_options = None
|
29
|
+
_globals['_AGENTSERVICE'].methods_by_name['RunProgram']._serialized_options = b'\202\323\344\223\002\032\"\025/v1/agent/run_program:\001*'
|
30
30
|
_globals['_AGENTSERVICE'].methods_by_name['RunQuantumMachinesMixerCalibration']._loaded_options = None
|
31
31
|
_globals['_AGENTSERVICE'].methods_by_name['RunQuantumMachinesMixerCalibration']._serialized_options = b'\202\323\344\223\002*\"%/v1/agent/run_qua_calibration_program:\001*'
|
32
32
|
_globals['_AGENTSERVICE'].methods_by_name['DisplayResults']._loaded_options = None
|
33
33
|
_globals['_AGENTSERVICE'].methods_by_name['DisplayResults']._serialized_options = b'\202\323\344\223\002\036\"\031/v1/agent/display_results:\001*'
|
34
|
-
_globals['
|
35
|
-
_globals['
|
36
|
-
_globals['
|
37
|
-
_globals['
|
38
|
-
_globals['_RUNQUANTUMMACHINESMIXERCALIBRATIONREQUEST']._serialized_start=
|
39
|
-
_globals['_RUNQUANTUMMACHINESMIXERCALIBRATIONREQUEST']._serialized_end=
|
40
|
-
_globals['_RUNQUANTUMMACHINESMIXERCALIBRATIONRESPONSE']._serialized_start=
|
41
|
-
_globals['_RUNQUANTUMMACHINESMIXERCALIBRATIONRESPONSE']._serialized_end=
|
42
|
-
_globals['_DISPLAYRESULTSREQUEST']._serialized_start=
|
43
|
-
_globals['_DISPLAYRESULTSREQUEST']._serialized_end=
|
44
|
-
_globals['_DISPLAYRESULTSRESPONSE']._serialized_start=
|
45
|
-
_globals['_DISPLAYRESULTSRESPONSE']._serialized_end=
|
46
|
-
_globals['_AGENTSERVICE']._serialized_start=
|
47
|
-
_globals['_AGENTSERVICE']._serialized_end=
|
34
|
+
_globals['_RUNPROGRAMREQUEST']._serialized_start=174
|
35
|
+
_globals['_RUNPROGRAMREQUEST']._serialized_end=307
|
36
|
+
_globals['_RUNPROGRAMRESPONSE']._serialized_start=309
|
37
|
+
_globals['_RUNPROGRAMRESPONSE']._serialized_end=381
|
38
|
+
_globals['_RUNQUANTUMMACHINESMIXERCALIBRATIONREQUEST']._serialized_start=383
|
39
|
+
_globals['_RUNQUANTUMMACHINESMIXERCALIBRATIONREQUEST']._serialized_end=478
|
40
|
+
_globals['_RUNQUANTUMMACHINESMIXERCALIBRATIONRESPONSE']._serialized_start=480
|
41
|
+
_globals['_RUNQUANTUMMACHINESMIXERCALIBRATIONRESPONSE']._serialized_end=587
|
42
|
+
_globals['_DISPLAYRESULTSREQUEST']._serialized_start=589
|
43
|
+
_globals['_DISPLAYRESULTSREQUEST']._serialized_end=660
|
44
|
+
_globals['_DISPLAYRESULTSRESPONSE']._serialized_start=662
|
45
|
+
_globals['_DISPLAYRESULTSRESPONSE']._serialized_end=732
|
46
|
+
_globals['_AGENTSERVICE']._serialized_start=735
|
47
|
+
_globals['_AGENTSERVICE']._serialized_end=1327
|
48
48
|
# @@protoc_insertion_point(module_scope)
|
@@ -8,15 +8,17 @@ from typing import ClassVar as _ClassVar, Iterable as _Iterable, Mapping as _Map
|
|
8
8
|
|
9
9
|
DESCRIPTOR: _descriptor.FileDescriptor
|
10
10
|
|
11
|
-
class
|
12
|
-
__slots__ = ("program", "
|
11
|
+
class RunProgramRequest(_message.Message):
|
12
|
+
__slots__ = ("controller_type", "program", "calibrate_elements")
|
13
|
+
CONTROLLER_TYPE_FIELD_NUMBER: _ClassVar[int]
|
13
14
|
PROGRAM_FIELD_NUMBER: _ClassVar[int]
|
14
|
-
|
15
|
+
CALIBRATE_ELEMENTS_FIELD_NUMBER: _ClassVar[int]
|
16
|
+
controller_type: str
|
15
17
|
program: str
|
16
|
-
|
17
|
-
def __init__(self, program: _Optional[str] = ...,
|
18
|
+
calibrate_elements: _containers.RepeatedScalarFieldContainer[str]
|
19
|
+
def __init__(self, controller_type: _Optional[str] = ..., program: _Optional[str] = ..., calibrate_elements: _Optional[_Iterable[str]] = ...) -> None: ...
|
18
20
|
|
19
|
-
class
|
21
|
+
class RunProgramResponse(_message.Message):
|
20
22
|
__slots__ = ("raw_data",)
|
21
23
|
RAW_DATA_FIELD_NUMBER: _ClassVar[int]
|
22
24
|
raw_data: _struct_pb2.Struct
|
@@ -15,10 +15,10 @@ class AgentServiceStub(object):
|
|
15
15
|
Args:
|
16
16
|
channel: A grpc.Channel.
|
17
17
|
"""
|
18
|
-
self.
|
19
|
-
'/boulderopalscaleupsdk.protobuf.v1.AgentService/
|
20
|
-
request_serializer=boulderopalscaleupsdk_dot_protobuf_dot_v1_dot_agent__pb2.
|
21
|
-
response_deserializer=boulderopalscaleupsdk_dot_protobuf_dot_v1_dot_agent__pb2.
|
18
|
+
self.RunProgram = channel.unary_unary(
|
19
|
+
'/boulderopalscaleupsdk.protobuf.v1.AgentService/RunProgram',
|
20
|
+
request_serializer=boulderopalscaleupsdk_dot_protobuf_dot_v1_dot_agent__pb2.RunProgramRequest.SerializeToString,
|
21
|
+
response_deserializer=boulderopalscaleupsdk_dot_protobuf_dot_v1_dot_agent__pb2.RunProgramResponse.FromString,
|
22
22
|
)
|
23
23
|
self.RunQuantumMachinesMixerCalibration = channel.unary_unary(
|
24
24
|
'/boulderopalscaleupsdk.protobuf.v1.AgentService/RunQuantumMachinesMixerCalibration',
|
@@ -36,7 +36,7 @@ class AgentServiceServicer(object):
|
|
36
36
|
"""Defines the Agent service running locally.
|
37
37
|
"""
|
38
38
|
|
39
|
-
def
|
39
|
+
def RunProgram(self, request, context):
|
40
40
|
"""Run a program on physical hardware.
|
41
41
|
"""
|
42
42
|
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
@@ -60,10 +60,10 @@ class AgentServiceServicer(object):
|
|
60
60
|
|
61
61
|
def add_AgentServiceServicer_to_server(servicer, server):
|
62
62
|
rpc_method_handlers = {
|
63
|
-
'
|
64
|
-
servicer.
|
65
|
-
request_deserializer=boulderopalscaleupsdk_dot_protobuf_dot_v1_dot_agent__pb2.
|
66
|
-
response_serializer=boulderopalscaleupsdk_dot_protobuf_dot_v1_dot_agent__pb2.
|
63
|
+
'RunProgram': grpc.unary_unary_rpc_method_handler(
|
64
|
+
servicer.RunProgram,
|
65
|
+
request_deserializer=boulderopalscaleupsdk_dot_protobuf_dot_v1_dot_agent__pb2.RunProgramRequest.FromString,
|
66
|
+
response_serializer=boulderopalscaleupsdk_dot_protobuf_dot_v1_dot_agent__pb2.RunProgramResponse.SerializeToString,
|
67
67
|
),
|
68
68
|
'RunQuantumMachinesMixerCalibration': grpc.unary_unary_rpc_method_handler(
|
69
69
|
servicer.RunQuantumMachinesMixerCalibration,
|
@@ -87,7 +87,7 @@ class AgentService(object):
|
|
87
87
|
"""
|
88
88
|
|
89
89
|
@staticmethod
|
90
|
-
def
|
90
|
+
def RunProgram(request,
|
91
91
|
target,
|
92
92
|
options=(),
|
93
93
|
channel_credentials=None,
|
@@ -97,9 +97,9 @@ class AgentService(object):
|
|
97
97
|
wait_for_ready=None,
|
98
98
|
timeout=None,
|
99
99
|
metadata=None):
|
100
|
-
return grpc.experimental.unary_unary(request, target, '/boulderopalscaleupsdk.protobuf.v1.AgentService/
|
101
|
-
boulderopalscaleupsdk_dot_protobuf_dot_v1_dot_agent__pb2.
|
102
|
-
boulderopalscaleupsdk_dot_protobuf_dot_v1_dot_agent__pb2.
|
100
|
+
return grpc.experimental.unary_unary(request, target, '/boulderopalscaleupsdk.protobuf.v1.AgentService/RunProgram',
|
101
|
+
boulderopalscaleupsdk_dot_protobuf_dot_v1_dot_agent__pb2.RunProgramRequest.SerializeToString,
|
102
|
+
boulderopalscaleupsdk_dot_protobuf_dot_v1_dot_agent__pb2.RunProgramResponse.FromString,
|
103
103
|
options, channel_credentials,
|
104
104
|
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
|
105
105
|
|