boulder-opal-scale-up-sdk 1.0.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.
- boulder_opal_scale_up_sdk-1.0.0.dist-info/METADATA +38 -0
- boulder_opal_scale_up_sdk-1.0.0.dist-info/RECORD +50 -0
- boulder_opal_scale_up_sdk-1.0.0.dist-info/WHEEL +4 -0
- boulderopalscaleupsdk/__init__.py +14 -0
- boulderopalscaleupsdk/agent/__init__.py +29 -0
- boulderopalscaleupsdk/agent/worker.py +244 -0
- boulderopalscaleupsdk/common/__init__.py +12 -0
- boulderopalscaleupsdk/common/dtypes.py +353 -0
- boulderopalscaleupsdk/common/typeclasses.py +85 -0
- boulderopalscaleupsdk/device/__init__.py +16 -0
- boulderopalscaleupsdk/device/common.py +58 -0
- boulderopalscaleupsdk/device/config_loader.py +88 -0
- boulderopalscaleupsdk/device/controller/__init__.py +32 -0
- boulderopalscaleupsdk/device/controller/base.py +18 -0
- boulderopalscaleupsdk/device/controller/qblox.py +664 -0
- boulderopalscaleupsdk/device/controller/quantum_machines.py +139 -0
- boulderopalscaleupsdk/device/device.py +35 -0
- boulderopalscaleupsdk/device/processor/__init__.py +23 -0
- boulderopalscaleupsdk/device/processor/common.py +148 -0
- boulderopalscaleupsdk/device/processor/superconducting_processor.py +291 -0
- boulderopalscaleupsdk/experiments/__init__.py +44 -0
- boulderopalscaleupsdk/experiments/common.py +96 -0
- boulderopalscaleupsdk/experiments/power_rabi.py +60 -0
- boulderopalscaleupsdk/experiments/ramsey.py +55 -0
- boulderopalscaleupsdk/experiments/resonator_spectroscopy.py +64 -0
- boulderopalscaleupsdk/experiments/resonator_spectroscopy_by_bias.py +76 -0
- boulderopalscaleupsdk/experiments/resonator_spectroscopy_by_power.py +64 -0
- boulderopalscaleupsdk/grpc_interceptors/__init__.py +16 -0
- boulderopalscaleupsdk/grpc_interceptors/auth.py +101 -0
- boulderopalscaleupsdk/plotting/__init__.py +24 -0
- boulderopalscaleupsdk/plotting/dtypes.py +221 -0
- boulderopalscaleupsdk/protobuf/v1/agent_pb2.py +48 -0
- boulderopalscaleupsdk/protobuf/v1/agent_pb2.pyi +53 -0
- boulderopalscaleupsdk/protobuf/v1/agent_pb2_grpc.py +138 -0
- boulderopalscaleupsdk/protobuf/v1/device_pb2.py +71 -0
- boulderopalscaleupsdk/protobuf/v1/device_pb2.pyi +110 -0
- boulderopalscaleupsdk/protobuf/v1/device_pb2_grpc.py +274 -0
- boulderopalscaleupsdk/protobuf/v1/task_pb2.py +53 -0
- boulderopalscaleupsdk/protobuf/v1/task_pb2.pyi +118 -0
- boulderopalscaleupsdk/protobuf/v1/task_pb2_grpc.py +119 -0
- boulderopalscaleupsdk/py.typed +0 -0
- boulderopalscaleupsdk/routines/__init__.py +9 -0
- boulderopalscaleupsdk/routines/common.py +10 -0
- boulderopalscaleupsdk/routines/resonator_mapping.py +13 -0
- boulderopalscaleupsdk/third_party/__init__.py +14 -0
- boulderopalscaleupsdk/third_party/quantum_machines/__init__.py +51 -0
- boulderopalscaleupsdk/third_party/quantum_machines/config.py +597 -0
- boulderopalscaleupsdk/third_party/quantum_machines/constants.py +20 -0
- boulderopalscaleupsdk/utils/__init__.py +12 -0
- boulderopalscaleupsdk/utils/serial_utils.py +62 -0
@@ -0,0 +1,221 @@
|
|
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
|
+
import base64
|
15
|
+
from typing import Annotated, Any, Literal
|
16
|
+
|
17
|
+
import numpy as np
|
18
|
+
from pydantic import (
|
19
|
+
BaseModel,
|
20
|
+
BeforeValidator,
|
21
|
+
ConfigDict,
|
22
|
+
PlainSerializer,
|
23
|
+
ValidationError,
|
24
|
+
model_validator,
|
25
|
+
)
|
26
|
+
from pydantic.dataclasses import dataclass
|
27
|
+
|
28
|
+
|
29
|
+
def _array_validator(value: Any) -> np.ndarray:
|
30
|
+
if isinstance(value, dict):
|
31
|
+
array = np.frombuffer(base64.b64decode(value["data"]), dtype=value["dtype"]).reshape(
|
32
|
+
value["shape"],
|
33
|
+
)
|
34
|
+
else:
|
35
|
+
array = np.asarray(value, order="C")
|
36
|
+
|
37
|
+
if array.dtype == np.dtypes.ObjectDType:
|
38
|
+
raise ValidationError("Invalid array.")
|
39
|
+
|
40
|
+
return array
|
41
|
+
|
42
|
+
|
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
|
+
}
|
49
|
+
|
50
|
+
|
51
|
+
_SerializableArray = Annotated[
|
52
|
+
np.ndarray,
|
53
|
+
BeforeValidator(_array_validator),
|
54
|
+
PlainSerializer(_array_serializer),
|
55
|
+
]
|
56
|
+
|
57
|
+
|
58
|
+
@dataclass(config=ConfigDict(arbitrary_types_allowed=True))
|
59
|
+
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
|
+
x: _SerializableArray
|
78
|
+
y: _SerializableArray
|
79
|
+
x_error: _SerializableArray | None = None
|
80
|
+
y_error: _SerializableArray | None = None
|
81
|
+
label: str | None = None
|
82
|
+
|
83
|
+
def __post_init__(self):
|
84
|
+
if self.x.ndim != 1:
|
85
|
+
raise ValueError("x must be 1D.")
|
86
|
+
if self.y.ndim != 1:
|
87
|
+
raise ValueError("y must be 1D.")
|
88
|
+
if len(self.x) != len(self.y):
|
89
|
+
raise ValueError("The length of x and y must match.")
|
90
|
+
|
91
|
+
if self.x_error is not None and self.x_error.shape != self.x.shape:
|
92
|
+
raise ValueError("The shapes of x and x_error must match.")
|
93
|
+
if self.y_error is not None and self.y_error.shape != self.y.shape:
|
94
|
+
raise ValueError("The shapes of y and y_error must match.")
|
95
|
+
|
96
|
+
|
97
|
+
@dataclass(config=ConfigDict(arbitrary_types_allowed=True))
|
98
|
+
class PlotData2D:
|
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
|
+
|
114
|
+
x: _SerializableArray
|
115
|
+
y: _SerializableArray
|
116
|
+
z: _SerializableArray
|
117
|
+
label: str | None = None
|
118
|
+
|
119
|
+
def __post_init__(self):
|
120
|
+
if self.x.ndim != 1:
|
121
|
+
raise ValueError("x must be 1D.")
|
122
|
+
if self.y.ndim != 1:
|
123
|
+
raise ValueError("y must be 1D.")
|
124
|
+
if self.z.ndim != 2:
|
125
|
+
raise ValueError("z must be 2D.")
|
126
|
+
if self.z.shape != (len(self.x), len(self.y)):
|
127
|
+
raise ValueError("The shape of z must be (len(x), len(y)).")
|
128
|
+
|
129
|
+
|
130
|
+
@dataclass
|
131
|
+
class Marker:
|
132
|
+
x: float
|
133
|
+
y: float
|
134
|
+
label: str
|
135
|
+
color: str
|
136
|
+
symbol: Literal["star"]
|
137
|
+
|
138
|
+
|
139
|
+
@dataclass
|
140
|
+
class VLine:
|
141
|
+
value: float
|
142
|
+
line_dash: Literal["dash"]
|
143
|
+
color: str | None = None
|
144
|
+
|
145
|
+
|
146
|
+
class Plot(BaseModel):
|
147
|
+
"""
|
148
|
+
Data to plot the results of an experiment.
|
149
|
+
|
150
|
+
Parameters
|
151
|
+
----------
|
152
|
+
heatmap : PlotData2D or None, optional
|
153
|
+
The 2D experimental data.
|
154
|
+
If provided, it's plotted as a heatmap.
|
155
|
+
heatmap_text : bool, optional
|
156
|
+
If True, the heatmap displays the values as text.
|
157
|
+
Defaults to False.
|
158
|
+
points : PlotData1D or None, optional
|
159
|
+
The 1D experimental data.
|
160
|
+
If provided, it's plotted as a scatter plot.
|
161
|
+
best_fit : PlotData1D or None, optional
|
162
|
+
The best fit on the experimental data.
|
163
|
+
If provided, it's plotted as a line plot.
|
164
|
+
reference_fit : PlotData1D or None, optional
|
165
|
+
A reference fit on the experimental data.
|
166
|
+
If provided, it's plotted as a line plot.
|
167
|
+
markers : list[Markers] or None, optional
|
168
|
+
Markers to add to the plot.
|
169
|
+
vlines : list[VLine] or None, optional
|
170
|
+
Vertical lines to add to the plot.
|
171
|
+
title : str or None, optional
|
172
|
+
The title of the plot.
|
173
|
+
xticks : list[float] or None, optional
|
174
|
+
The values at which x-ticks are placed.
|
175
|
+
Must be specified alongside xticklabels. Defaults to None.
|
176
|
+
xticklabels : list[str] or None, optional
|
177
|
+
The labels for the x-ticks.
|
178
|
+
Must be specified alongside xticks. Defaults to None.
|
179
|
+
yticks : list[float] or None, optional
|
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
|
@@ -0,0 +1,48 @@
|
|
1
|
+
# -*- coding: utf-8 -*-
|
2
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
3
|
+
# source: boulderopalscaleupsdk/protobuf/v1/agent.proto
|
4
|
+
# Protobuf Python Version: 5.26.1
|
5
|
+
"""Generated protocol buffer code."""
|
6
|
+
from google.protobuf import descriptor as _descriptor
|
7
|
+
from google.protobuf import descriptor_pool as _descriptor_pool
|
8
|
+
from google.protobuf import symbol_database as _symbol_database
|
9
|
+
from google.protobuf.internal import builder as _builder
|
10
|
+
# @@protoc_insertion_point(imports)
|
11
|
+
|
12
|
+
_sym_db = _symbol_database.Default()
|
13
|
+
|
14
|
+
|
15
|
+
from google.api import annotations_pb2 as google_dot_api_dot_annotations__pb2
|
16
|
+
from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2
|
17
|
+
from google.protobuf import struct_pb2 as google_dot_protobuf_dot_struct__pb2
|
18
|
+
|
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\"H\n\x14RunQuaProgramRequest\x12\x18\n\x07program\x18\x01 \x01(\tR\x07program\x12\x16\n\x06\x63onfig\x18\x02 \x01(\tR\x06\x63onfig\"K\n\x15RunQuaProgramResponse\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\xdd\x04\n\x0c\x41gentService\x12\xa8\x01\n\rRunQuaProgram\x12\x37.boulderopalscaleupsdk.protobuf.v1.RunQuaProgramRequest\x1a\x38.boulderopalscaleupsdk.protobuf.v1.RunQuaProgramResponse\"$\x82\xd3\xe4\x93\x02\x1e\"\x19/v1/agent/run_qua_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
|
+
|
22
|
+
_globals = globals()
|
23
|
+
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
24
|
+
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'boulderopalscaleupsdk.protobuf.v1.agent_pb2', _globals)
|
25
|
+
if not _descriptor._USE_C_DESCRIPTORS:
|
26
|
+
_globals['DESCRIPTOR']._loaded_options = None
|
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['RunQuaProgram']._loaded_options = None
|
29
|
+
_globals['_AGENTSERVICE'].methods_by_name['RunQuaProgram']._serialized_options = b'\202\323\344\223\002\036\"\031/v1/agent/run_qua_program:\001*'
|
30
|
+
_globals['_AGENTSERVICE'].methods_by_name['RunQuantumMachinesMixerCalibration']._loaded_options = None
|
31
|
+
_globals['_AGENTSERVICE'].methods_by_name['RunQuantumMachinesMixerCalibration']._serialized_options = b'\202\323\344\223\002*\"%/v1/agent/run_qua_calibration_program:\001*'
|
32
|
+
_globals['_AGENTSERVICE'].methods_by_name['DisplayResults']._loaded_options = None
|
33
|
+
_globals['_AGENTSERVICE'].methods_by_name['DisplayResults']._serialized_options = b'\202\323\344\223\002\036\"\031/v1/agent/display_results:\001*'
|
34
|
+
_globals['_RUNQUAPROGRAMREQUEST']._serialized_start=173
|
35
|
+
_globals['_RUNQUAPROGRAMREQUEST']._serialized_end=245
|
36
|
+
_globals['_RUNQUAPROGRAMRESPONSE']._serialized_start=247
|
37
|
+
_globals['_RUNQUAPROGRAMRESPONSE']._serialized_end=322
|
38
|
+
_globals['_RUNQUANTUMMACHINESMIXERCALIBRATIONREQUEST']._serialized_start=324
|
39
|
+
_globals['_RUNQUANTUMMACHINESMIXERCALIBRATIONREQUEST']._serialized_end=419
|
40
|
+
_globals['_RUNQUANTUMMACHINESMIXERCALIBRATIONRESPONSE']._serialized_start=421
|
41
|
+
_globals['_RUNQUANTUMMACHINESMIXERCALIBRATIONRESPONSE']._serialized_end=528
|
42
|
+
_globals['_DISPLAYRESULTSREQUEST']._serialized_start=530
|
43
|
+
_globals['_DISPLAYRESULTSREQUEST']._serialized_end=601
|
44
|
+
_globals['_DISPLAYRESULTSRESPONSE']._serialized_start=603
|
45
|
+
_globals['_DISPLAYRESULTSRESPONSE']._serialized_end=673
|
46
|
+
_globals['_AGENTSERVICE']._serialized_start=676
|
47
|
+
_globals['_AGENTSERVICE']._serialized_end=1281
|
48
|
+
# @@protoc_insertion_point(module_scope)
|
@@ -0,0 +1,53 @@
|
|
1
|
+
from google.api import annotations_pb2 as _annotations_pb2
|
2
|
+
from google.protobuf import empty_pb2 as _empty_pb2
|
3
|
+
from google.protobuf import struct_pb2 as _struct_pb2
|
4
|
+
from google.protobuf.internal import containers as _containers
|
5
|
+
from google.protobuf import descriptor as _descriptor
|
6
|
+
from google.protobuf import message as _message
|
7
|
+
from typing import ClassVar as _ClassVar, Iterable as _Iterable, Mapping as _Mapping, Optional as _Optional, Union as _Union
|
8
|
+
|
9
|
+
DESCRIPTOR: _descriptor.FileDescriptor
|
10
|
+
|
11
|
+
class RunQuaProgramRequest(_message.Message):
|
12
|
+
__slots__ = ("program", "config")
|
13
|
+
PROGRAM_FIELD_NUMBER: _ClassVar[int]
|
14
|
+
CONFIG_FIELD_NUMBER: _ClassVar[int]
|
15
|
+
program: str
|
16
|
+
config: str
|
17
|
+
def __init__(self, program: _Optional[str] = ..., config: _Optional[str] = ...) -> None: ...
|
18
|
+
|
19
|
+
class RunQuaProgramResponse(_message.Message):
|
20
|
+
__slots__ = ("raw_data",)
|
21
|
+
RAW_DATA_FIELD_NUMBER: _ClassVar[int]
|
22
|
+
raw_data: _struct_pb2.Struct
|
23
|
+
def __init__(self, raw_data: _Optional[_Union[_struct_pb2.Struct, _Mapping]] = ...) -> None: ...
|
24
|
+
|
25
|
+
class RunQuantumMachinesMixerCalibrationRequest(_message.Message):
|
26
|
+
__slots__ = ("elements", "config")
|
27
|
+
ELEMENTS_FIELD_NUMBER: _ClassVar[int]
|
28
|
+
CONFIG_FIELD_NUMBER: _ClassVar[int]
|
29
|
+
elements: _containers.RepeatedScalarFieldContainer[str]
|
30
|
+
config: str
|
31
|
+
def __init__(self, elements: _Optional[_Iterable[str]] = ..., config: _Optional[str] = ...) -> None: ...
|
32
|
+
|
33
|
+
class RunQuantumMachinesMixerCalibrationResponse(_message.Message):
|
34
|
+
__slots__ = ("success", "error")
|
35
|
+
SUCCESS_FIELD_NUMBER: _ClassVar[int]
|
36
|
+
ERROR_FIELD_NUMBER: _ClassVar[int]
|
37
|
+
success: bool
|
38
|
+
error: str
|
39
|
+
def __init__(self, success: bool = ..., error: _Optional[str] = ...) -> None: ...
|
40
|
+
|
41
|
+
class DisplayResultsRequest(_message.Message):
|
42
|
+
__slots__ = ("message", "plots")
|
43
|
+
MESSAGE_FIELD_NUMBER: _ClassVar[int]
|
44
|
+
PLOTS_FIELD_NUMBER: _ClassVar[int]
|
45
|
+
message: str
|
46
|
+
plots: _containers.RepeatedScalarFieldContainer[str]
|
47
|
+
def __init__(self, message: _Optional[str] = ..., plots: _Optional[_Iterable[str]] = ...) -> None: ...
|
48
|
+
|
49
|
+
class DisplayResultsResponse(_message.Message):
|
50
|
+
__slots__ = ("empty",)
|
51
|
+
EMPTY_FIELD_NUMBER: _ClassVar[int]
|
52
|
+
empty: _empty_pb2.Empty
|
53
|
+
def __init__(self, empty: _Optional[_Union[_empty_pb2.Empty, _Mapping]] = ...) -> None: ...
|
@@ -0,0 +1,138 @@
|
|
1
|
+
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
|
2
|
+
"""Client and server classes corresponding to protobuf-defined services."""
|
3
|
+
import grpc
|
4
|
+
|
5
|
+
from boulderopalscaleupsdk.protobuf.v1 import agent_pb2 as boulderopalscaleupsdk_dot_protobuf_dot_v1_dot_agent__pb2
|
6
|
+
|
7
|
+
|
8
|
+
class AgentServiceStub(object):
|
9
|
+
"""Defines the Agent service running locally.
|
10
|
+
"""
|
11
|
+
|
12
|
+
def __init__(self, channel):
|
13
|
+
"""Constructor.
|
14
|
+
|
15
|
+
Args:
|
16
|
+
channel: A grpc.Channel.
|
17
|
+
"""
|
18
|
+
self.RunQuaProgram = channel.unary_unary(
|
19
|
+
'/boulderopalscaleupsdk.protobuf.v1.AgentService/RunQuaProgram',
|
20
|
+
request_serializer=boulderopalscaleupsdk_dot_protobuf_dot_v1_dot_agent__pb2.RunQuaProgramRequest.SerializeToString,
|
21
|
+
response_deserializer=boulderopalscaleupsdk_dot_protobuf_dot_v1_dot_agent__pb2.RunQuaProgramResponse.FromString,
|
22
|
+
)
|
23
|
+
self.RunQuantumMachinesMixerCalibration = channel.unary_unary(
|
24
|
+
'/boulderopalscaleupsdk.protobuf.v1.AgentService/RunQuantumMachinesMixerCalibration',
|
25
|
+
request_serializer=boulderopalscaleupsdk_dot_protobuf_dot_v1_dot_agent__pb2.RunQuantumMachinesMixerCalibrationRequest.SerializeToString,
|
26
|
+
response_deserializer=boulderopalscaleupsdk_dot_protobuf_dot_v1_dot_agent__pb2.RunQuantumMachinesMixerCalibrationResponse.FromString,
|
27
|
+
)
|
28
|
+
self.DisplayResults = channel.unary_unary(
|
29
|
+
'/boulderopalscaleupsdk.protobuf.v1.AgentService/DisplayResults',
|
30
|
+
request_serializer=boulderopalscaleupsdk_dot_protobuf_dot_v1_dot_agent__pb2.DisplayResultsRequest.SerializeToString,
|
31
|
+
response_deserializer=boulderopalscaleupsdk_dot_protobuf_dot_v1_dot_agent__pb2.DisplayResultsResponse.FromString,
|
32
|
+
)
|
33
|
+
|
34
|
+
|
35
|
+
class AgentServiceServicer(object):
|
36
|
+
"""Defines the Agent service running locally.
|
37
|
+
"""
|
38
|
+
|
39
|
+
def RunQuaProgram(self, request, context):
|
40
|
+
"""Run a program on physical hardware.
|
41
|
+
"""
|
42
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
43
|
+
context.set_details('Method not implemented!')
|
44
|
+
raise NotImplementedError('Method not implemented!')
|
45
|
+
|
46
|
+
def RunQuantumMachinesMixerCalibration(self, request, context):
|
47
|
+
"""Run mixer calibration for elements on physical controller.
|
48
|
+
"""
|
49
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
50
|
+
context.set_details('Method not implemented!')
|
51
|
+
raise NotImplementedError('Method not implemented!')
|
52
|
+
|
53
|
+
def DisplayResults(self, request, context):
|
54
|
+
"""Report the results of an experiment.
|
55
|
+
"""
|
56
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
57
|
+
context.set_details('Method not implemented!')
|
58
|
+
raise NotImplementedError('Method not implemented!')
|
59
|
+
|
60
|
+
|
61
|
+
def add_AgentServiceServicer_to_server(servicer, server):
|
62
|
+
rpc_method_handlers = {
|
63
|
+
'RunQuaProgram': grpc.unary_unary_rpc_method_handler(
|
64
|
+
servicer.RunQuaProgram,
|
65
|
+
request_deserializer=boulderopalscaleupsdk_dot_protobuf_dot_v1_dot_agent__pb2.RunQuaProgramRequest.FromString,
|
66
|
+
response_serializer=boulderopalscaleupsdk_dot_protobuf_dot_v1_dot_agent__pb2.RunQuaProgramResponse.SerializeToString,
|
67
|
+
),
|
68
|
+
'RunQuantumMachinesMixerCalibration': grpc.unary_unary_rpc_method_handler(
|
69
|
+
servicer.RunQuantumMachinesMixerCalibration,
|
70
|
+
request_deserializer=boulderopalscaleupsdk_dot_protobuf_dot_v1_dot_agent__pb2.RunQuantumMachinesMixerCalibrationRequest.FromString,
|
71
|
+
response_serializer=boulderopalscaleupsdk_dot_protobuf_dot_v1_dot_agent__pb2.RunQuantumMachinesMixerCalibrationResponse.SerializeToString,
|
72
|
+
),
|
73
|
+
'DisplayResults': grpc.unary_unary_rpc_method_handler(
|
74
|
+
servicer.DisplayResults,
|
75
|
+
request_deserializer=boulderopalscaleupsdk_dot_protobuf_dot_v1_dot_agent__pb2.DisplayResultsRequest.FromString,
|
76
|
+
response_serializer=boulderopalscaleupsdk_dot_protobuf_dot_v1_dot_agent__pb2.DisplayResultsResponse.SerializeToString,
|
77
|
+
),
|
78
|
+
}
|
79
|
+
generic_handler = grpc.method_handlers_generic_handler(
|
80
|
+
'boulderopalscaleupsdk.protobuf.v1.AgentService', rpc_method_handlers)
|
81
|
+
server.add_generic_rpc_handlers((generic_handler,))
|
82
|
+
|
83
|
+
|
84
|
+
# This class is part of an EXPERIMENTAL API.
|
85
|
+
class AgentService(object):
|
86
|
+
"""Defines the Agent service running locally.
|
87
|
+
"""
|
88
|
+
|
89
|
+
@staticmethod
|
90
|
+
def RunQuaProgram(request,
|
91
|
+
target,
|
92
|
+
options=(),
|
93
|
+
channel_credentials=None,
|
94
|
+
call_credentials=None,
|
95
|
+
insecure=False,
|
96
|
+
compression=None,
|
97
|
+
wait_for_ready=None,
|
98
|
+
timeout=None,
|
99
|
+
metadata=None):
|
100
|
+
return grpc.experimental.unary_unary(request, target, '/boulderopalscaleupsdk.protobuf.v1.AgentService/RunQuaProgram',
|
101
|
+
boulderopalscaleupsdk_dot_protobuf_dot_v1_dot_agent__pb2.RunQuaProgramRequest.SerializeToString,
|
102
|
+
boulderopalscaleupsdk_dot_protobuf_dot_v1_dot_agent__pb2.RunQuaProgramResponse.FromString,
|
103
|
+
options, channel_credentials,
|
104
|
+
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
|
105
|
+
|
106
|
+
@staticmethod
|
107
|
+
def RunQuantumMachinesMixerCalibration(request,
|
108
|
+
target,
|
109
|
+
options=(),
|
110
|
+
channel_credentials=None,
|
111
|
+
call_credentials=None,
|
112
|
+
insecure=False,
|
113
|
+
compression=None,
|
114
|
+
wait_for_ready=None,
|
115
|
+
timeout=None,
|
116
|
+
metadata=None):
|
117
|
+
return grpc.experimental.unary_unary(request, target, '/boulderopalscaleupsdk.protobuf.v1.AgentService/RunQuantumMachinesMixerCalibration',
|
118
|
+
boulderopalscaleupsdk_dot_protobuf_dot_v1_dot_agent__pb2.RunQuantumMachinesMixerCalibrationRequest.SerializeToString,
|
119
|
+
boulderopalscaleupsdk_dot_protobuf_dot_v1_dot_agent__pb2.RunQuantumMachinesMixerCalibrationResponse.FromString,
|
120
|
+
options, channel_credentials,
|
121
|
+
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
|
122
|
+
|
123
|
+
@staticmethod
|
124
|
+
def DisplayResults(request,
|
125
|
+
target,
|
126
|
+
options=(),
|
127
|
+
channel_credentials=None,
|
128
|
+
call_credentials=None,
|
129
|
+
insecure=False,
|
130
|
+
compression=None,
|
131
|
+
wait_for_ready=None,
|
132
|
+
timeout=None,
|
133
|
+
metadata=None):
|
134
|
+
return grpc.experimental.unary_unary(request, target, '/boulderopalscaleupsdk.protobuf.v1.AgentService/DisplayResults',
|
135
|
+
boulderopalscaleupsdk_dot_protobuf_dot_v1_dot_agent__pb2.DisplayResultsRequest.SerializeToString,
|
136
|
+
boulderopalscaleupsdk_dot_protobuf_dot_v1_dot_agent__pb2.DisplayResultsResponse.FromString,
|
137
|
+
options, channel_credentials,
|
138
|
+
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
|
@@ -0,0 +1,71 @@
|
|
1
|
+
# -*- coding: utf-8 -*-
|
2
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
3
|
+
# source: boulderopalscaleupsdk/protobuf/v1/device.proto
|
4
|
+
# Protobuf Python Version: 5.26.1
|
5
|
+
"""Generated protocol buffer code."""
|
6
|
+
from google.protobuf import descriptor as _descriptor
|
7
|
+
from google.protobuf import descriptor_pool as _descriptor_pool
|
8
|
+
from google.protobuf import symbol_database as _symbol_database
|
9
|
+
from google.protobuf.internal import builder as _builder
|
10
|
+
# @@protoc_insertion_point(imports)
|
11
|
+
|
12
|
+
_sym_db = _symbol_database.Default()
|
13
|
+
|
14
|
+
|
15
|
+
from google.api import annotations_pb2 as google_dot_api_dot_annotations__pb2
|
16
|
+
from google.protobuf import struct_pb2 as google_dot_protobuf_dot_struct__pb2
|
17
|
+
|
18
|
+
|
19
|
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n.boulderopalscaleupsdk/protobuf/v1/device.proto\x12!boulderopalscaleupsdk.protobuf.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x1cgoogle/protobuf/struct.proto\"-\n\x14GetJobSummaryRequest\x12\x15\n\x06job_id\x18\x01 \x01(\tR\x05jobId\"Z\n\x15GetJobSummaryResponse\x12\x41\n\x10job_summary_data\x18\x01 \x01(\x0b\x32\x17.google.protobuf.StructR\x0ejobSummaryData\"&\n\rGetJobRequest\x12\x15\n\x06job_id\x18\x01 \x01(\tR\x05jobId\"D\n\x0eGetJobResponse\x12\x32\n\x08job_data\x18\x01 \x01(\x0b\x32\x17.google.protobuf.StructR\x07jobData\"2\n\x0fListJobsRequest\x12\x1f\n\x0b\x64\x65vice_name\x18\x01 \x01(\tR\ndeviceName\"?\n\x10ListJobsResponse\x12+\n\x04jobs\x18\x01 \x03(\x0b\x32\x17.google.protobuf.StructR\x04jobs\"\x85\x01\n\rCreateRequest\x12\x19\n\x08\x61pp_name\x18\x01 \x01(\tR\x07\x61ppName\x12\x1f\n\x0b\x64\x65vice_name\x18\x02 \x01(\tR\ndeviceName\x12\x38\n\x0b\x64\x65vice_data\x18\x03 \x01(\x0b\x32\x17.google.protobuf.StructR\ndeviceData\"$\n\x0e\x43reateResponse\x12\x12\n\x04\x64one\x18\x01 \x01(\x08R\x04\x64one\"I\n\x0bLoadRequest\x12\x19\n\x08\x61pp_name\x18\x01 \x01(\tR\x07\x61ppName\x12\x1f\n\x0b\x64\x65vice_name\x18\x02 \x01(\tR\ndeviceName\"\x90\x01\n\x0cLoadResponse\x12>\n\x0eprocessor_data\x18\x02 \x01(\x0b\x32\x17.google.protobuf.StructR\rprocessorData\x12@\n\x0f\x63ontroller_data\x18\x03 \x01(\x0b\x32\x17.google.protobuf.StructR\x0e\x63ontrollerData\"\xcd\x01\n\rUpdateRequest\x12\x19\n\x08\x61pp_name\x18\x01 \x01(\tR\x07\x61ppName\x12\x1f\n\x0b\x64\x65vice_name\x18\x02 \x01(\tR\ndeviceName\x12>\n\x0eprocessor_data\x18\x03 \x01(\x0b\x32\x17.google.protobuf.StructR\rprocessorData\x12@\n\x0f\x63ontroller_data\x18\x04 \x01(\x0b\x32\x17.google.protobuf.StructR\x0e\x63ontrollerData\"\x92\x01\n\x0eUpdateResponse\x12>\n\x0eprocessor_data\x18\x03 \x01(\x0b\x32\x17.google.protobuf.StructR\rprocessorData\x12@\n\x0f\x63ontroller_data\x18\x04 \x01(\x0b\x32\x17.google.protobuf.StructR\x0e\x63ontrollerData\"K\n\rDeleteRequest\x12\x19\n\x08\x61pp_name\x18\x01 \x01(\tR\x07\x61ppName\x12\x1f\n\x0b\x64\x65vice_name\x18\x02 \x01(\tR\ndeviceName\"$\n\x0e\x44\x65leteResponse\x12\x12\n\x04\x64one\x18\x01 \x01(\x08R\x04\x64one2\x98\x08\n\x14\x44\x65viceManagerService\x12\x8b\x01\n\x06\x43reate\x12\x30.boulderopalscaleupsdk.protobuf.v1.CreateRequest\x1a\x31.boulderopalscaleupsdk.protobuf.v1.CreateResponse\"\x1c\x82\xd3\xe4\x93\x02\x16\"\x11/v1/device/create:\x01*\x12\x83\x01\n\x04Load\x12..boulderopalscaleupsdk.protobuf.v1.LoadRequest\x1a/.boulderopalscaleupsdk.protobuf.v1.LoadResponse\"\x1a\x82\xd3\xe4\x93\x02\x14\"\x0f/v1/device/load:\x01*\x12\x8b\x01\n\x06Update\x12\x30.boulderopalscaleupsdk.protobuf.v1.UpdateRequest\x1a\x31.boulderopalscaleupsdk.protobuf.v1.UpdateResponse\"\x1c\x82\xd3\xe4\x93\x02\x16\"\x11/v1/device/update:\x01*\x12\x8b\x01\n\x06\x44\x65lete\x12\x30.boulderopalscaleupsdk.protobuf.v1.DeleteRequest\x1a\x31.boulderopalscaleupsdk.protobuf.v1.DeleteResponse\"\x1c\x82\xd3\xe4\x93\x02\x16\"\x11/v1/device/delete:\x01*\x12\x94\x01\n\x08ListJobs\x12\x32.boulderopalscaleupsdk.protobuf.v1.ListJobsRequest\x1a\x33.boulderopalscaleupsdk.protobuf.v1.ListJobsResponse\"\x1f\x82\xd3\xe4\x93\x02\x19\"\x14/v1/device/list_jobs:\x01*\x12\x8c\x01\n\x06GetJob\x12\x30.boulderopalscaleupsdk.protobuf.v1.GetJobRequest\x1a\x31.boulderopalscaleupsdk.protobuf.v1.GetJobResponse\"\x1d\x82\xd3\xe4\x93\x02\x17\"\x12/v1/device/get_job:\x01*\x12\xa9\x01\n\rGetJobSummary\x12\x37.boulderopalscaleupsdk.protobuf.v1.GetJobSummaryRequest\x1a\x38.boulderopalscaleupsdk.protobuf.v1.GetJobSummaryResponse\"%\x82\xd3\xe4\x93\x02\x1f\"\x1a/v1/device/get_job_summary:\x01*B\xaa\x02\n%com.boulderopalscaleupsdk.protobuf.v1B\x0b\x44\x65viceProtoP\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')
|
20
|
+
|
21
|
+
_globals = globals()
|
22
|
+
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
23
|
+
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'boulderopalscaleupsdk.protobuf.v1.device_pb2', _globals)
|
24
|
+
if not _descriptor._USE_C_DESCRIPTORS:
|
25
|
+
_globals['DESCRIPTOR']._loaded_options = None
|
26
|
+
_globals['DESCRIPTOR']._serialized_options = b'\n%com.boulderopalscaleupsdk.protobuf.v1B\013DeviceProtoP\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'
|
27
|
+
_globals['_DEVICEMANAGERSERVICE'].methods_by_name['Create']._loaded_options = None
|
28
|
+
_globals['_DEVICEMANAGERSERVICE'].methods_by_name['Create']._serialized_options = b'\202\323\344\223\002\026\"\021/v1/device/create:\001*'
|
29
|
+
_globals['_DEVICEMANAGERSERVICE'].methods_by_name['Load']._loaded_options = None
|
30
|
+
_globals['_DEVICEMANAGERSERVICE'].methods_by_name['Load']._serialized_options = b'\202\323\344\223\002\024\"\017/v1/device/load:\001*'
|
31
|
+
_globals['_DEVICEMANAGERSERVICE'].methods_by_name['Update']._loaded_options = None
|
32
|
+
_globals['_DEVICEMANAGERSERVICE'].methods_by_name['Update']._serialized_options = b'\202\323\344\223\002\026\"\021/v1/device/update:\001*'
|
33
|
+
_globals['_DEVICEMANAGERSERVICE'].methods_by_name['Delete']._loaded_options = None
|
34
|
+
_globals['_DEVICEMANAGERSERVICE'].methods_by_name['Delete']._serialized_options = b'\202\323\344\223\002\026\"\021/v1/device/delete:\001*'
|
35
|
+
_globals['_DEVICEMANAGERSERVICE'].methods_by_name['ListJobs']._loaded_options = None
|
36
|
+
_globals['_DEVICEMANAGERSERVICE'].methods_by_name['ListJobs']._serialized_options = b'\202\323\344\223\002\031\"\024/v1/device/list_jobs:\001*'
|
37
|
+
_globals['_DEVICEMANAGERSERVICE'].methods_by_name['GetJob']._loaded_options = None
|
38
|
+
_globals['_DEVICEMANAGERSERVICE'].methods_by_name['GetJob']._serialized_options = b'\202\323\344\223\002\027\"\022/v1/device/get_job:\001*'
|
39
|
+
_globals['_DEVICEMANAGERSERVICE'].methods_by_name['GetJobSummary']._loaded_options = None
|
40
|
+
_globals['_DEVICEMANAGERSERVICE'].methods_by_name['GetJobSummary']._serialized_options = b'\202\323\344\223\002\037\"\032/v1/device/get_job_summary:\001*'
|
41
|
+
_globals['_GETJOBSUMMARYREQUEST']._serialized_start=145
|
42
|
+
_globals['_GETJOBSUMMARYREQUEST']._serialized_end=190
|
43
|
+
_globals['_GETJOBSUMMARYRESPONSE']._serialized_start=192
|
44
|
+
_globals['_GETJOBSUMMARYRESPONSE']._serialized_end=282
|
45
|
+
_globals['_GETJOBREQUEST']._serialized_start=284
|
46
|
+
_globals['_GETJOBREQUEST']._serialized_end=322
|
47
|
+
_globals['_GETJOBRESPONSE']._serialized_start=324
|
48
|
+
_globals['_GETJOBRESPONSE']._serialized_end=392
|
49
|
+
_globals['_LISTJOBSREQUEST']._serialized_start=394
|
50
|
+
_globals['_LISTJOBSREQUEST']._serialized_end=444
|
51
|
+
_globals['_LISTJOBSRESPONSE']._serialized_start=446
|
52
|
+
_globals['_LISTJOBSRESPONSE']._serialized_end=509
|
53
|
+
_globals['_CREATEREQUEST']._serialized_start=512
|
54
|
+
_globals['_CREATEREQUEST']._serialized_end=645
|
55
|
+
_globals['_CREATERESPONSE']._serialized_start=647
|
56
|
+
_globals['_CREATERESPONSE']._serialized_end=683
|
57
|
+
_globals['_LOADREQUEST']._serialized_start=685
|
58
|
+
_globals['_LOADREQUEST']._serialized_end=758
|
59
|
+
_globals['_LOADRESPONSE']._serialized_start=761
|
60
|
+
_globals['_LOADRESPONSE']._serialized_end=905
|
61
|
+
_globals['_UPDATEREQUEST']._serialized_start=908
|
62
|
+
_globals['_UPDATEREQUEST']._serialized_end=1113
|
63
|
+
_globals['_UPDATERESPONSE']._serialized_start=1116
|
64
|
+
_globals['_UPDATERESPONSE']._serialized_end=1262
|
65
|
+
_globals['_DELETEREQUEST']._serialized_start=1264
|
66
|
+
_globals['_DELETEREQUEST']._serialized_end=1339
|
67
|
+
_globals['_DELETERESPONSE']._serialized_start=1341
|
68
|
+
_globals['_DELETERESPONSE']._serialized_end=1377
|
69
|
+
_globals['_DEVICEMANAGERSERVICE']._serialized_start=1380
|
70
|
+
_globals['_DEVICEMANAGERSERVICE']._serialized_end=2428
|
71
|
+
# @@protoc_insertion_point(module_scope)
|
@@ -0,0 +1,110 @@
|
|
1
|
+
from google.api import annotations_pb2 as _annotations_pb2
|
2
|
+
from google.protobuf import struct_pb2 as _struct_pb2
|
3
|
+
from google.protobuf.internal import containers as _containers
|
4
|
+
from google.protobuf import descriptor as _descriptor
|
5
|
+
from google.protobuf import message as _message
|
6
|
+
from typing import ClassVar as _ClassVar, Iterable as _Iterable, Mapping as _Mapping, Optional as _Optional, Union as _Union
|
7
|
+
|
8
|
+
DESCRIPTOR: _descriptor.FileDescriptor
|
9
|
+
|
10
|
+
class GetJobSummaryRequest(_message.Message):
|
11
|
+
__slots__ = ("job_id",)
|
12
|
+
JOB_ID_FIELD_NUMBER: _ClassVar[int]
|
13
|
+
job_id: str
|
14
|
+
def __init__(self, job_id: _Optional[str] = ...) -> None: ...
|
15
|
+
|
16
|
+
class GetJobSummaryResponse(_message.Message):
|
17
|
+
__slots__ = ("job_summary_data",)
|
18
|
+
JOB_SUMMARY_DATA_FIELD_NUMBER: _ClassVar[int]
|
19
|
+
job_summary_data: _struct_pb2.Struct
|
20
|
+
def __init__(self, job_summary_data: _Optional[_Union[_struct_pb2.Struct, _Mapping]] = ...) -> None: ...
|
21
|
+
|
22
|
+
class GetJobRequest(_message.Message):
|
23
|
+
__slots__ = ("job_id",)
|
24
|
+
JOB_ID_FIELD_NUMBER: _ClassVar[int]
|
25
|
+
job_id: str
|
26
|
+
def __init__(self, job_id: _Optional[str] = ...) -> None: ...
|
27
|
+
|
28
|
+
class GetJobResponse(_message.Message):
|
29
|
+
__slots__ = ("job_data",)
|
30
|
+
JOB_DATA_FIELD_NUMBER: _ClassVar[int]
|
31
|
+
job_data: _struct_pb2.Struct
|
32
|
+
def __init__(self, job_data: _Optional[_Union[_struct_pb2.Struct, _Mapping]] = ...) -> None: ...
|
33
|
+
|
34
|
+
class ListJobsRequest(_message.Message):
|
35
|
+
__slots__ = ("device_name",)
|
36
|
+
DEVICE_NAME_FIELD_NUMBER: _ClassVar[int]
|
37
|
+
device_name: str
|
38
|
+
def __init__(self, device_name: _Optional[str] = ...) -> None: ...
|
39
|
+
|
40
|
+
class ListJobsResponse(_message.Message):
|
41
|
+
__slots__ = ("jobs",)
|
42
|
+
JOBS_FIELD_NUMBER: _ClassVar[int]
|
43
|
+
jobs: _containers.RepeatedCompositeFieldContainer[_struct_pb2.Struct]
|
44
|
+
def __init__(self, jobs: _Optional[_Iterable[_Union[_struct_pb2.Struct, _Mapping]]] = ...) -> None: ...
|
45
|
+
|
46
|
+
class CreateRequest(_message.Message):
|
47
|
+
__slots__ = ("app_name", "device_name", "device_data")
|
48
|
+
APP_NAME_FIELD_NUMBER: _ClassVar[int]
|
49
|
+
DEVICE_NAME_FIELD_NUMBER: _ClassVar[int]
|
50
|
+
DEVICE_DATA_FIELD_NUMBER: _ClassVar[int]
|
51
|
+
app_name: str
|
52
|
+
device_name: str
|
53
|
+
device_data: _struct_pb2.Struct
|
54
|
+
def __init__(self, app_name: _Optional[str] = ..., device_name: _Optional[str] = ..., device_data: _Optional[_Union[_struct_pb2.Struct, _Mapping]] = ...) -> None: ...
|
55
|
+
|
56
|
+
class CreateResponse(_message.Message):
|
57
|
+
__slots__ = ("done",)
|
58
|
+
DONE_FIELD_NUMBER: _ClassVar[int]
|
59
|
+
done: bool
|
60
|
+
def __init__(self, done: bool = ...) -> None: ...
|
61
|
+
|
62
|
+
class LoadRequest(_message.Message):
|
63
|
+
__slots__ = ("app_name", "device_name")
|
64
|
+
APP_NAME_FIELD_NUMBER: _ClassVar[int]
|
65
|
+
DEVICE_NAME_FIELD_NUMBER: _ClassVar[int]
|
66
|
+
app_name: str
|
67
|
+
device_name: str
|
68
|
+
def __init__(self, app_name: _Optional[str] = ..., device_name: _Optional[str] = ...) -> None: ...
|
69
|
+
|
70
|
+
class LoadResponse(_message.Message):
|
71
|
+
__slots__ = ("processor_data", "controller_data")
|
72
|
+
PROCESSOR_DATA_FIELD_NUMBER: _ClassVar[int]
|
73
|
+
CONTROLLER_DATA_FIELD_NUMBER: _ClassVar[int]
|
74
|
+
processor_data: _struct_pb2.Struct
|
75
|
+
controller_data: _struct_pb2.Struct
|
76
|
+
def __init__(self, processor_data: _Optional[_Union[_struct_pb2.Struct, _Mapping]] = ..., controller_data: _Optional[_Union[_struct_pb2.Struct, _Mapping]] = ...) -> None: ...
|
77
|
+
|
78
|
+
class UpdateRequest(_message.Message):
|
79
|
+
__slots__ = ("app_name", "device_name", "processor_data", "controller_data")
|
80
|
+
APP_NAME_FIELD_NUMBER: _ClassVar[int]
|
81
|
+
DEVICE_NAME_FIELD_NUMBER: _ClassVar[int]
|
82
|
+
PROCESSOR_DATA_FIELD_NUMBER: _ClassVar[int]
|
83
|
+
CONTROLLER_DATA_FIELD_NUMBER: _ClassVar[int]
|
84
|
+
app_name: str
|
85
|
+
device_name: str
|
86
|
+
processor_data: _struct_pb2.Struct
|
87
|
+
controller_data: _struct_pb2.Struct
|
88
|
+
def __init__(self, app_name: _Optional[str] = ..., device_name: _Optional[str] = ..., processor_data: _Optional[_Union[_struct_pb2.Struct, _Mapping]] = ..., controller_data: _Optional[_Union[_struct_pb2.Struct, _Mapping]] = ...) -> None: ...
|
89
|
+
|
90
|
+
class UpdateResponse(_message.Message):
|
91
|
+
__slots__ = ("processor_data", "controller_data")
|
92
|
+
PROCESSOR_DATA_FIELD_NUMBER: _ClassVar[int]
|
93
|
+
CONTROLLER_DATA_FIELD_NUMBER: _ClassVar[int]
|
94
|
+
processor_data: _struct_pb2.Struct
|
95
|
+
controller_data: _struct_pb2.Struct
|
96
|
+
def __init__(self, processor_data: _Optional[_Union[_struct_pb2.Struct, _Mapping]] = ..., controller_data: _Optional[_Union[_struct_pb2.Struct, _Mapping]] = ...) -> None: ...
|
97
|
+
|
98
|
+
class DeleteRequest(_message.Message):
|
99
|
+
__slots__ = ("app_name", "device_name")
|
100
|
+
APP_NAME_FIELD_NUMBER: _ClassVar[int]
|
101
|
+
DEVICE_NAME_FIELD_NUMBER: _ClassVar[int]
|
102
|
+
app_name: str
|
103
|
+
device_name: str
|
104
|
+
def __init__(self, app_name: _Optional[str] = ..., device_name: _Optional[str] = ...) -> None: ...
|
105
|
+
|
106
|
+
class DeleteResponse(_message.Message):
|
107
|
+
__slots__ = ("done",)
|
108
|
+
DONE_FIELD_NUMBER: _ClassVar[int]
|
109
|
+
done: bool
|
110
|
+
def __init__(self, done: bool = ...) -> None: ...
|