azure-quantum 3.5.1.dev1__py3-none-any.whl → 3.6.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.
- azure/quantum/_client/__init__.py +2 -2
- azure/quantum/_client/_client.py +18 -57
- azure/quantum/_client/_configuration.py +13 -22
- azure/quantum/_client/_patch.py +7 -6
- azure/quantum/_client/_utils/__init__.py +6 -0
- azure/quantum/_client/{_model_base.py → _utils/model_base.py} +210 -45
- azure/quantum/_client/{_serialization.py → _utils/serialization.py} +74 -151
- azure/quantum/_client/_validation.py +66 -0
- azure/quantum/_client/_version.py +1 -1
- azure/quantum/_client/aio/__init__.py +29 -0
- azure/quantum/_client/aio/_client.py +110 -0
- azure/quantum/_client/aio/_configuration.py +75 -0
- azure/quantum/_client/aio/_patch.py +21 -0
- azure/quantum/_client/aio/operations/__init__.py +25 -0
- azure/quantum/_client/aio/operations/_operations.py +1988 -0
- azure/quantum/_client/aio/operations/_patch.py +21 -0
- azure/quantum/_client/models/__init__.py +8 -4
- azure/quantum/_client/models/_enums.py +28 -23
- azure/quantum/_client/models/_models.py +198 -106
- azure/quantum/_client/models/_patch.py +7 -6
- azure/quantum/_client/operations/__init__.py +2 -12
- azure/quantum/_client/operations/_operations.py +900 -715
- azure/quantum/_client/operations/_patch.py +7 -6
- azure/quantum/_constants.py +6 -1
- azure/quantum/_mgmt_client.py +19 -9
- azure/quantum/_workspace_connection_params.py +27 -2
- azure/quantum/job/base_job.py +8 -0
- azure/quantum/job/job.py +13 -4
- azure/quantum/job/session.py +11 -0
- azure/quantum/target/rigetti/target.py +1 -6
- azure/quantum/target/target.py +5 -1
- azure/quantum/target/target_factory.py +14 -7
- azure/quantum/version.py +1 -1
- azure/quantum/workspace.py +35 -31
- {azure_quantum-3.5.1.dev1.dist-info → azure_quantum-3.6.1.dist-info}/METADATA +2 -6
- azure_quantum-3.6.1.dist-info/RECORD +74 -0
- {azure_quantum-3.5.1.dev1.dist-info → azure_quantum-3.6.1.dist-info}/WHEEL +1 -1
- azure_quantum-3.5.1.dev1.dist-info/RECORD +0 -65
- {azure_quantum-3.5.1.dev1.dist-info → azure_quantum-3.6.1.dist-info}/top_level.txt +0 -0
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
# pylint: disable=line-too-long,useless-suppression
|
|
1
2
|
# coding=utf-8
|
|
2
3
|
# --------------------------------------------------------------------------
|
|
3
4
|
# Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -8,23 +9,20 @@
|
|
|
8
9
|
# pylint: disable=useless-super-delegation
|
|
9
10
|
|
|
10
11
|
import datetime
|
|
11
|
-
from typing import Any,
|
|
12
|
+
from typing import Any, Literal, Mapping, Optional, TYPE_CHECKING, Union, overload
|
|
12
13
|
|
|
13
14
|
from azure.core.exceptions import ODataV4Format
|
|
14
15
|
|
|
15
|
-
from .. import
|
|
16
|
-
from .._model_base import rest_discriminator, rest_field
|
|
16
|
+
from .._utils.model_base import Model as _Model, rest_discriminator, rest_field
|
|
17
17
|
from ._enums import ItemType
|
|
18
18
|
|
|
19
19
|
if TYPE_CHECKING:
|
|
20
20
|
from .. import models as _models
|
|
21
21
|
|
|
22
22
|
|
|
23
|
-
class BlobDetails(
|
|
23
|
+
class BlobDetails(_Model):
|
|
24
24
|
"""The details (name and container) of the blob to store or download data.
|
|
25
25
|
|
|
26
|
-
All required parameters must be populated in order to send to server.
|
|
27
|
-
|
|
28
26
|
:ivar container_name: The container name. Required.
|
|
29
27
|
:vartype container_name: str
|
|
30
28
|
:ivar blob_name: The blob name.
|
|
@@ -55,11 +53,10 @@ class BlobDetails(_model_base.Model):
|
|
|
55
53
|
super().__init__(*args, **kwargs)
|
|
56
54
|
|
|
57
55
|
|
|
58
|
-
class CostEstimate(
|
|
56
|
+
class CostEstimate(_Model):
|
|
59
57
|
"""The job cost billed by the provider. The final cost on your bill might be slightly different
|
|
60
58
|
due to added taxes and currency conversion rates.
|
|
61
59
|
|
|
62
|
-
|
|
63
60
|
:ivar currency_code: The currency code. Required.
|
|
64
61
|
:vartype currency_code: str
|
|
65
62
|
:ivar events: List of usage events.
|
|
@@ -68,11 +65,15 @@ class CostEstimate(_model_base.Model):
|
|
|
68
65
|
:vartype estimated_total: float
|
|
69
66
|
"""
|
|
70
67
|
|
|
71
|
-
currency_code: str = rest_field(name="currencyCode")
|
|
68
|
+
currency_code: str = rest_field(name="currencyCode", visibility=["read", "create", "update", "delete", "query"])
|
|
72
69
|
"""The currency code. Required."""
|
|
73
|
-
events: Optional[
|
|
70
|
+
events: Optional[list["_models.UsageEvent"]] = rest_field(
|
|
71
|
+
visibility=["read", "create", "update", "delete", "query"]
|
|
72
|
+
)
|
|
74
73
|
"""List of usage events."""
|
|
75
|
-
estimated_total: float = rest_field(
|
|
74
|
+
estimated_total: float = rest_field(
|
|
75
|
+
name="estimatedTotal", visibility=["read", "create", "update", "delete", "query"]
|
|
76
|
+
)
|
|
76
77
|
"""The estimated total. Required."""
|
|
77
78
|
|
|
78
79
|
@overload
|
|
@@ -81,7 +82,7 @@ class CostEstimate(_model_base.Model):
|
|
|
81
82
|
*,
|
|
82
83
|
currency_code: str,
|
|
83
84
|
estimated_total: float,
|
|
84
|
-
events: Optional[
|
|
85
|
+
events: Optional[list["_models.UsageEvent"]] = None,
|
|
85
86
|
) -> None: ...
|
|
86
87
|
|
|
87
88
|
@overload
|
|
@@ -95,10 +96,10 @@ class CostEstimate(_model_base.Model):
|
|
|
95
96
|
super().__init__(*args, **kwargs)
|
|
96
97
|
|
|
97
98
|
|
|
98
|
-
class InnerError(
|
|
99
|
-
"""An object containing more specific information about the error. As per
|
|
100
|
-
guidelines -
|
|
101
|
-
https://
|
|
99
|
+
class InnerError(_Model):
|
|
100
|
+
"""An object containing more specific information about the error. As per Azure REST API
|
|
101
|
+
guidelines - `https://aka.ms/AzureRestApiGuidelines#handling-errors
|
|
102
|
+
<https://aka.ms/AzureRestApiGuidelines#handling-errors>`_.
|
|
102
103
|
|
|
103
104
|
:ivar code: One of a server-defined set of error codes.
|
|
104
105
|
:vartype code: str
|
|
@@ -106,9 +107,9 @@ class InnerError(_model_base.Model):
|
|
|
106
107
|
:vartype innererror: ~azure.quantum.models.InnerError
|
|
107
108
|
"""
|
|
108
109
|
|
|
109
|
-
code: Optional[str] = rest_field()
|
|
110
|
+
code: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
|
|
110
111
|
"""One of a server-defined set of error codes."""
|
|
111
|
-
innererror: Optional["_models.InnerError"] = rest_field()
|
|
112
|
+
innererror: Optional["_models.InnerError"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
|
|
112
113
|
"""Inner error."""
|
|
113
114
|
|
|
114
115
|
@overload
|
|
@@ -130,15 +131,12 @@ class InnerError(_model_base.Model):
|
|
|
130
131
|
super().__init__(*args, **kwargs)
|
|
131
132
|
|
|
132
133
|
|
|
133
|
-
class ItemDetails(
|
|
134
|
+
class ItemDetails(_Model):
|
|
134
135
|
"""A workspace item.
|
|
135
136
|
|
|
136
137
|
You probably want to use the sub-classes and not this class directly. Known sub-classes are:
|
|
137
138
|
JobDetails, SessionDetails
|
|
138
139
|
|
|
139
|
-
Readonly variables are only populated by the server, and will be ignored when sending a request.
|
|
140
|
-
|
|
141
|
-
|
|
142
140
|
:ivar id: Id of the item. Required.
|
|
143
141
|
:vartype id: str
|
|
144
142
|
:ivar name: The name of the item. It is not required for the name to be unique and it's only
|
|
@@ -153,6 +151,21 @@ class ItemDetails(_model_base.Model):
|
|
|
153
151
|
:vartype item_type: str or ~azure.quantum.models.ItemType
|
|
154
152
|
:ivar creation_time: The creation time of the item.
|
|
155
153
|
:vartype creation_time: ~datetime.datetime
|
|
154
|
+
:ivar created_by: The identity that created the item.
|
|
155
|
+
:vartype created_by: str
|
|
156
|
+
:ivar created_by_type: The type of identity that created the item. Known values are: "User",
|
|
157
|
+
"Application", "ManagedIdentity", and "Key".
|
|
158
|
+
:vartype created_by_type: str or ~azure.quantum.models.CreatedByType
|
|
159
|
+
:ivar last_modified_time: The timestamp of the item last modification initiated by the
|
|
160
|
+
customer.
|
|
161
|
+
:vartype last_modified_time: ~datetime.datetime
|
|
162
|
+
:ivar last_modified_by: The identity that last modified the item.
|
|
163
|
+
:vartype last_modified_by: str
|
|
164
|
+
:ivar last_modified_by_type: The type of identity that last modified the item. Known values
|
|
165
|
+
are: "User", "Application", "ManagedIdentity", and "Key".
|
|
166
|
+
:vartype last_modified_by_type: str or ~azure.quantum.models.CreatedByType
|
|
167
|
+
:ivar last_updated_time: The last time the item was updated by the system.
|
|
168
|
+
:vartype last_updated_time: ~datetime.datetime
|
|
156
169
|
:ivar begin_execution_time: The time when the item began execution.
|
|
157
170
|
:vartype begin_execution_time: ~datetime.datetime
|
|
158
171
|
:ivar end_execution_time: The time when the item finished execution.
|
|
@@ -161,9 +174,16 @@ class ItemDetails(_model_base.Model):
|
|
|
161
174
|
:vartype cost_estimate: ~azure.quantum.models.CostEstimate
|
|
162
175
|
:ivar error_data: Error information.
|
|
163
176
|
:vartype error_data: ~azure.quantum.models.WorkspaceItemError
|
|
177
|
+
:ivar priority: Priority of job or session. Known values are: "Standard" and "High".
|
|
178
|
+
:vartype priority: str or ~azure.quantum.models.Priority
|
|
179
|
+
:ivar tags: List of user-supplied tags associated with the job.
|
|
180
|
+
:vartype tags: list[str]
|
|
181
|
+
:ivar usage: Resource consumption metrics containing provider-specific usage data such as
|
|
182
|
+
execution time, quantum shots consumed etc.
|
|
183
|
+
:vartype usage: ~azure.quantum.models.Usage
|
|
164
184
|
"""
|
|
165
185
|
|
|
166
|
-
__mapping__:
|
|
186
|
+
__mapping__: dict[str, _Model] = {}
|
|
167
187
|
id: str = rest_field(visibility=["read"])
|
|
168
188
|
"""Id of the item. Required."""
|
|
169
189
|
name: str = rest_field(visibility=["read", "create", "update"])
|
|
@@ -177,6 +197,28 @@ class ItemDetails(_model_base.Model):
|
|
|
177
197
|
"""Type of the Quantum Workspace item. Required. Known values are: \"Job\" and \"Session\"."""
|
|
178
198
|
creation_time: Optional[datetime.datetime] = rest_field(name="creationTime", visibility=["read"], format="rfc3339")
|
|
179
199
|
"""The creation time of the item."""
|
|
200
|
+
created_by: Optional[str] = rest_field(name="createdBy", visibility=["read"])
|
|
201
|
+
"""The identity that created the item."""
|
|
202
|
+
created_by_type: Optional[Union[str, "_models.CreatedByType"]] = rest_field(
|
|
203
|
+
name="createdByType", visibility=["read"]
|
|
204
|
+
)
|
|
205
|
+
"""The type of identity that created the item. Known values are: \"User\", \"Application\",
|
|
206
|
+
\"ManagedIdentity\", and \"Key\"."""
|
|
207
|
+
last_modified_time: Optional[datetime.datetime] = rest_field(
|
|
208
|
+
name="lastModifiedTime", visibility=["read"], format="rfc3339"
|
|
209
|
+
)
|
|
210
|
+
"""The timestamp of the item last modification initiated by the customer."""
|
|
211
|
+
last_modified_by: Optional[str] = rest_field(name="lastModifiedBy", visibility=["read"])
|
|
212
|
+
"""The identity that last modified the item."""
|
|
213
|
+
last_modified_by_type: Optional[Union[str, "_models.CreatedByType"]] = rest_field(
|
|
214
|
+
name="lastModifiedByType", visibility=["read"]
|
|
215
|
+
)
|
|
216
|
+
"""The type of identity that last modified the item. Known values are: \"User\", \"Application\",
|
|
217
|
+
\"ManagedIdentity\", and \"Key\"."""
|
|
218
|
+
last_updated_time: Optional[datetime.datetime] = rest_field(
|
|
219
|
+
name="lastUpdatedTime", visibility=["read"], format="rfc3339"
|
|
220
|
+
)
|
|
221
|
+
"""The last time the item was updated by the system."""
|
|
180
222
|
begin_execution_time: Optional[datetime.datetime] = rest_field(
|
|
181
223
|
name="beginExecutionTime", visibility=["read"], format="rfc3339"
|
|
182
224
|
)
|
|
@@ -189,6 +231,13 @@ class ItemDetails(_model_base.Model):
|
|
|
189
231
|
"""Cost estimate."""
|
|
190
232
|
error_data: Optional["_models.WorkspaceItemError"] = rest_field(name="errorData", visibility=["read"])
|
|
191
233
|
"""Error information."""
|
|
234
|
+
priority: Optional[Union[str, "_models.Priority"]] = rest_field(visibility=["read", "create", "update"])
|
|
235
|
+
"""Priority of job or session. Known values are: \"Standard\" and \"High\"."""
|
|
236
|
+
tags: Optional[list[str]] = rest_field(visibility=["read", "create", "update"])
|
|
237
|
+
"""List of user-supplied tags associated with the job."""
|
|
238
|
+
usage: Optional["_models.Usage"] = rest_field(visibility=["read"])
|
|
239
|
+
"""Resource consumption metrics containing provider-specific usage data such as execution time,
|
|
240
|
+
quantum shots consumed etc."""
|
|
192
241
|
|
|
193
242
|
@overload
|
|
194
243
|
def __init__(
|
|
@@ -198,6 +247,8 @@ class ItemDetails(_model_base.Model):
|
|
|
198
247
|
provider_id: str,
|
|
199
248
|
target: str,
|
|
200
249
|
item_type: str,
|
|
250
|
+
priority: Optional[Union[str, "_models.Priority"]] = None,
|
|
251
|
+
tags: Optional[list[str]] = None,
|
|
201
252
|
) -> None: ...
|
|
202
253
|
|
|
203
254
|
@overload
|
|
@@ -214,9 +265,6 @@ class ItemDetails(_model_base.Model):
|
|
|
214
265
|
class JobDetails(ItemDetails, discriminator="Job"):
|
|
215
266
|
"""A job to be run in the workspace.
|
|
216
267
|
|
|
217
|
-
Readonly variables are only populated by the server, and will be ignored when sending a request.
|
|
218
|
-
|
|
219
|
-
|
|
220
268
|
:ivar name: The name of the item. It is not required for the name to be unique and it's only
|
|
221
269
|
used for display purposes. Required.
|
|
222
270
|
:vartype name: str
|
|
@@ -226,6 +274,21 @@ class JobDetails(ItemDetails, discriminator="Job"):
|
|
|
226
274
|
:vartype target: str
|
|
227
275
|
:ivar creation_time: The creation time of the item.
|
|
228
276
|
:vartype creation_time: ~datetime.datetime
|
|
277
|
+
:ivar created_by: The identity that created the item.
|
|
278
|
+
:vartype created_by: str
|
|
279
|
+
:ivar created_by_type: The type of identity that created the item. Known values are: "User",
|
|
280
|
+
"Application", "ManagedIdentity", and "Key".
|
|
281
|
+
:vartype created_by_type: str or ~azure.quantum.models.CreatedByType
|
|
282
|
+
:ivar last_modified_time: The timestamp of the item last modification initiated by the
|
|
283
|
+
customer.
|
|
284
|
+
:vartype last_modified_time: ~datetime.datetime
|
|
285
|
+
:ivar last_modified_by: The identity that last modified the item.
|
|
286
|
+
:vartype last_modified_by: str
|
|
287
|
+
:ivar last_modified_by_type: The type of identity that last modified the item. Known values
|
|
288
|
+
are: "User", "Application", "ManagedIdentity", and "Key".
|
|
289
|
+
:vartype last_modified_by_type: str or ~azure.quantum.models.CreatedByType
|
|
290
|
+
:ivar last_updated_time: The last time the item was updated by the system.
|
|
291
|
+
:vartype last_updated_time: ~datetime.datetime
|
|
229
292
|
:ivar begin_execution_time: The time when the item began execution.
|
|
230
293
|
:vartype begin_execution_time: ~datetime.datetime
|
|
231
294
|
:ivar end_execution_time: The time when the item finished execution.
|
|
@@ -234,6 +297,13 @@ class JobDetails(ItemDetails, discriminator="Job"):
|
|
|
234
297
|
:vartype cost_estimate: ~azure.quantum.models.CostEstimate
|
|
235
298
|
:ivar error_data: Error information.
|
|
236
299
|
:vartype error_data: ~azure.quantum.models.WorkspaceItemError
|
|
300
|
+
:ivar priority: Priority of job or session. Known values are: "Standard" and "High".
|
|
301
|
+
:vartype priority: str or ~azure.quantum.models.Priority
|
|
302
|
+
:ivar tags: List of user-supplied tags associated with the job.
|
|
303
|
+
:vartype tags: list[str]
|
|
304
|
+
:ivar usage: Resource consumption metrics containing provider-specific usage data such as
|
|
305
|
+
execution time, quantum shots consumed etc.
|
|
306
|
+
:vartype usage: ~azure.quantum.models.Usage
|
|
237
307
|
:ivar id: Id of the job. Required.
|
|
238
308
|
:vartype id: str
|
|
239
309
|
:ivar item_type: Type of the Quantum Workspace item is Job. Required. A program, problem, or
|
|
@@ -252,16 +322,15 @@ class JobDetails(ItemDetails, discriminator="Job"):
|
|
|
252
322
|
:vartype input_data_uri: str
|
|
253
323
|
:ivar input_data_format: The format of the input data.
|
|
254
324
|
:vartype input_data_format: str
|
|
255
|
-
:ivar status: The status of the job. Known values are: "
|
|
256
|
-
"
|
|
325
|
+
:ivar status: The status of the job. Known values are: "Queued", "Waiting", "Executing",
|
|
326
|
+
"CancellationRequested", "Cancelling", "Finishing", "Completed", "Succeeded", "Failed", and
|
|
327
|
+
"Cancelled".
|
|
257
328
|
:vartype status: str or ~azure.quantum.models.JobStatus
|
|
258
329
|
:ivar metadata: The job metadata. Metadata provides client the ability to store client-specific
|
|
259
330
|
information.
|
|
260
331
|
:vartype metadata: any
|
|
261
332
|
:ivar cancellation_time: The time when a job was successfully cancelled.
|
|
262
333
|
:vartype cancellation_time: ~datetime.datetime
|
|
263
|
-
:ivar tags: List of user-supplied tags associated with the job.
|
|
264
|
-
:vartype tags: list[str]
|
|
265
334
|
:ivar quantum_computing_data: Quantum computing data.
|
|
266
335
|
:vartype quantum_computing_data: ~azure.quantum.models.QuantumComputingData
|
|
267
336
|
:ivar input_params: The input parameters for the job. JSON object used by the target solver. It
|
|
@@ -275,7 +344,7 @@ class JobDetails(ItemDetails, discriminator="Job"):
|
|
|
275
344
|
:vartype output_data_format: str
|
|
276
345
|
"""
|
|
277
346
|
|
|
278
|
-
item_type: Literal[ItemType.JOB] = rest_discriminator(name="itemType", visibility=["read", "create"]) # type: ignore
|
|
347
|
+
item_type: Literal[ItemType.JOB] = rest_discriminator(name="itemType", visibility=["read", "create"]) # type: ignore
|
|
279
348
|
"""Type of the Quantum Workspace item is Job. Required. A program, problem, or application
|
|
280
349
|
submitted for processing."""
|
|
281
350
|
job_type: Optional[Union[str, "_models.JobType"]] = rest_field(name="jobType", visibility=["read", "create"])
|
|
@@ -289,16 +358,15 @@ class JobDetails(ItemDetails, discriminator="Job"):
|
|
|
289
358
|
input_data_format: Optional[str] = rest_field(name="inputDataFormat", visibility=["read", "create"])
|
|
290
359
|
"""The format of the input data."""
|
|
291
360
|
status: Optional[Union[str, "_models.JobStatus"]] = rest_field(visibility=["read"])
|
|
292
|
-
"""The status of the job. Known values are: \"
|
|
293
|
-
\"
|
|
361
|
+
"""The status of the job. Known values are: \"Queued\", \"Waiting\", \"Executing\",
|
|
362
|
+
\"CancellationRequested\", \"Cancelling\", \"Finishing\", \"Completed\", \"Succeeded\",
|
|
363
|
+
\"Failed\", and \"Cancelled\"."""
|
|
294
364
|
metadata: Optional[Any] = rest_field(visibility=["read", "create", "update"])
|
|
295
365
|
"""The job metadata. Metadata provides client the ability to store client-specific information."""
|
|
296
366
|
cancellation_time: Optional[datetime.datetime] = rest_field(
|
|
297
367
|
name="cancellationTime", visibility=["read"], format="rfc3339"
|
|
298
368
|
)
|
|
299
369
|
"""The time when a job was successfully cancelled."""
|
|
300
|
-
tags: Optional[List[str]] = rest_field(visibility=["read", "create", "update"])
|
|
301
|
-
"""List of user-supplied tags associated with the job."""
|
|
302
370
|
quantum_computing_data: Optional["_models.QuantumComputingData"] = rest_field(
|
|
303
371
|
name="quantumComputingData", visibility=["read"]
|
|
304
372
|
)
|
|
@@ -313,19 +381,20 @@ class JobDetails(ItemDetails, discriminator="Job"):
|
|
|
313
381
|
"""The format of the output data."""
|
|
314
382
|
|
|
315
383
|
@overload
|
|
316
|
-
def __init__(
|
|
384
|
+
def __init__( # pylint: disable=too-many-locals
|
|
317
385
|
self,
|
|
318
386
|
*,
|
|
319
387
|
name: str,
|
|
320
388
|
provider_id: str,
|
|
321
389
|
target: str,
|
|
322
390
|
container_uri: str,
|
|
391
|
+
priority: Optional[Union[str, "_models.Priority"]] = None,
|
|
392
|
+
tags: Optional[list[str]] = None,
|
|
323
393
|
job_type: Optional[Union[str, "_models.JobType"]] = None,
|
|
324
394
|
session_id: Optional[str] = None,
|
|
325
395
|
input_data_uri: Optional[str] = None,
|
|
326
396
|
input_data_format: Optional[str] = None,
|
|
327
397
|
metadata: Optional[Any] = None,
|
|
328
|
-
tags: Optional[List[str]] = None,
|
|
329
398
|
input_params: Optional[Any] = None,
|
|
330
399
|
output_data_uri: Optional[str] = None,
|
|
331
400
|
output_data_format: Optional[str] = None,
|
|
@@ -339,43 +408,39 @@ class JobDetails(ItemDetails, discriminator="Job"):
|
|
|
339
408
|
"""
|
|
340
409
|
|
|
341
410
|
def __init__(self, *args: Any, **kwargs: Any) -> None:
|
|
342
|
-
super().__init__(*args,
|
|
343
|
-
|
|
411
|
+
super().__init__(*args, **kwargs)
|
|
412
|
+
self.item_type = ItemType.JOB # type: ignore
|
|
344
413
|
|
|
345
|
-
class JsonPatchObject(_model_base.Model):
|
|
346
|
-
"""A JSONPatch object as defined by RFC 6902.
|
|
347
414
|
|
|
348
|
-
|
|
415
|
+
class JobUpdateOptions(_Model):
|
|
416
|
+
"""Options for updating a job.
|
|
349
417
|
|
|
350
|
-
:ivar
|
|
351
|
-
|
|
352
|
-
:
|
|
353
|
-
:
|
|
354
|
-
:
|
|
355
|
-
:
|
|
356
|
-
:
|
|
357
|
-
:
|
|
358
|
-
:vartype from_property: str
|
|
418
|
+
:ivar id: Id of the job. Required.
|
|
419
|
+
:vartype id: str
|
|
420
|
+
:ivar priority: Priority of job. Known values are: "Standard" and "High".
|
|
421
|
+
:vartype priority: str or ~azure.quantum.models.Priority
|
|
422
|
+
:ivar name: The name of the job.
|
|
423
|
+
:vartype name: str
|
|
424
|
+
:ivar tags: List of user-supplied tags associated with the job.
|
|
425
|
+
:vartype tags: list[str]
|
|
359
426
|
"""
|
|
360
427
|
|
|
361
|
-
|
|
362
|
-
"""
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
""
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
"""Optional field used in copy and move operations."""
|
|
428
|
+
id: str = rest_field(visibility=["read"])
|
|
429
|
+
"""Id of the job. Required."""
|
|
430
|
+
priority: Optional[Union[str, "_models.Priority"]] = rest_field(visibility=["update"])
|
|
431
|
+
"""Priority of job. Known values are: \"Standard\" and \"High\"."""
|
|
432
|
+
name: Optional[str] = rest_field(visibility=["read", "update"])
|
|
433
|
+
"""The name of the job."""
|
|
434
|
+
tags: Optional[list[str]] = rest_field(visibility=["read", "create", "update"])
|
|
435
|
+
"""List of user-supplied tags associated with the job."""
|
|
370
436
|
|
|
371
437
|
@overload
|
|
372
438
|
def __init__(
|
|
373
439
|
self,
|
|
374
440
|
*,
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
from_property: Optional[str] = None,
|
|
441
|
+
priority: Optional[Union[str, "_models.Priority"]] = None,
|
|
442
|
+
name: Optional[str] = None,
|
|
443
|
+
tags: Optional[list[str]] = None,
|
|
379
444
|
) -> None: ...
|
|
380
445
|
|
|
381
446
|
@overload
|
|
@@ -389,12 +454,9 @@ class JsonPatchObject(_model_base.Model):
|
|
|
389
454
|
super().__init__(*args, **kwargs)
|
|
390
455
|
|
|
391
456
|
|
|
392
|
-
class ProviderStatus(
|
|
457
|
+
class ProviderStatus(_Model):
|
|
393
458
|
"""Provider status.
|
|
394
459
|
|
|
395
|
-
Readonly variables are only populated by the server, and will be ignored when sending a request.
|
|
396
|
-
|
|
397
|
-
|
|
398
460
|
:ivar id: Provider id. Required.
|
|
399
461
|
:vartype id: str
|
|
400
462
|
:ivar current_availability: Current provider availability. Required. Known values are:
|
|
@@ -411,16 +473,13 @@ class ProviderStatus(_model_base.Model):
|
|
|
411
473
|
)
|
|
412
474
|
"""Current provider availability. Required. Known values are: \"Available\", \"Degraded\", and
|
|
413
475
|
\"Unavailable\"."""
|
|
414
|
-
targets:
|
|
476
|
+
targets: list["_models.TargetStatus"] = rest_field(visibility=["read"])
|
|
415
477
|
"""Current target statuses. Required."""
|
|
416
478
|
|
|
417
479
|
|
|
418
|
-
class QuantumComputingData(
|
|
480
|
+
class QuantumComputingData(_Model):
|
|
419
481
|
"""Quantum computing data.
|
|
420
482
|
|
|
421
|
-
Readonly variables are only populated by the server, and will be ignored when sending a request.
|
|
422
|
-
|
|
423
|
-
|
|
424
483
|
:ivar count: The number of quantum computing items in the job. Required.
|
|
425
484
|
:vartype count: int
|
|
426
485
|
"""
|
|
@@ -429,12 +488,9 @@ class QuantumComputingData(_model_base.Model):
|
|
|
429
488
|
"""The number of quantum computing items in the job. Required."""
|
|
430
489
|
|
|
431
490
|
|
|
432
|
-
class Quota(
|
|
491
|
+
class Quota(_Model):
|
|
433
492
|
"""Quota information.
|
|
434
493
|
|
|
435
|
-
Readonly variables are only populated by the server, and will be ignored when sending a request.
|
|
436
|
-
|
|
437
|
-
|
|
438
494
|
:ivar dimension: The name of the dimension associated with the quota. Required.
|
|
439
495
|
:vartype dimension: str
|
|
440
496
|
:ivar scope: The scope at which the quota is applied. Required. Known values are: "Workspace"
|
|
@@ -475,12 +531,9 @@ class Quota(_model_base.Model):
|
|
|
475
531
|
'None' is used for concurrent quotas. Required. Known values are: \"None\" and \"Monthly\"."""
|
|
476
532
|
|
|
477
533
|
|
|
478
|
-
class SasUriResponse(
|
|
534
|
+
class SasUriResponse(_Model):
|
|
479
535
|
"""SAS URI operation response.
|
|
480
536
|
|
|
481
|
-
Readonly variables are only populated by the server, and will be ignored when sending a request.
|
|
482
|
-
|
|
483
|
-
|
|
484
537
|
:ivar sas_uri: A URL with a SAS token to upload a blob for execution in the given workspace.
|
|
485
538
|
Required.
|
|
486
539
|
:vartype sas_uri: str
|
|
@@ -493,9 +546,6 @@ class SasUriResponse(_model_base.Model):
|
|
|
493
546
|
class SessionDetails(ItemDetails, discriminator="Session"):
|
|
494
547
|
"""Session, a logical grouping of jobs.
|
|
495
548
|
|
|
496
|
-
Readonly variables are only populated by the server, and will be ignored when sending a request.
|
|
497
|
-
|
|
498
|
-
|
|
499
549
|
:ivar name: The name of the item. It is not required for the name to be unique and it's only
|
|
500
550
|
used for display purposes. Required.
|
|
501
551
|
:vartype name: str
|
|
@@ -505,6 +555,21 @@ class SessionDetails(ItemDetails, discriminator="Session"):
|
|
|
505
555
|
:vartype target: str
|
|
506
556
|
:ivar creation_time: The creation time of the item.
|
|
507
557
|
:vartype creation_time: ~datetime.datetime
|
|
558
|
+
:ivar created_by: The identity that created the item.
|
|
559
|
+
:vartype created_by: str
|
|
560
|
+
:ivar created_by_type: The type of identity that created the item. Known values are: "User",
|
|
561
|
+
"Application", "ManagedIdentity", and "Key".
|
|
562
|
+
:vartype created_by_type: str or ~azure.quantum.models.CreatedByType
|
|
563
|
+
:ivar last_modified_time: The timestamp of the item last modification initiated by the
|
|
564
|
+
customer.
|
|
565
|
+
:vartype last_modified_time: ~datetime.datetime
|
|
566
|
+
:ivar last_modified_by: The identity that last modified the item.
|
|
567
|
+
:vartype last_modified_by: str
|
|
568
|
+
:ivar last_modified_by_type: The type of identity that last modified the item. Known values
|
|
569
|
+
are: "User", "Application", "ManagedIdentity", and "Key".
|
|
570
|
+
:vartype last_modified_by_type: str or ~azure.quantum.models.CreatedByType
|
|
571
|
+
:ivar last_updated_time: The last time the item was updated by the system.
|
|
572
|
+
:vartype last_updated_time: ~datetime.datetime
|
|
508
573
|
:ivar begin_execution_time: The time when the item began execution.
|
|
509
574
|
:vartype begin_execution_time: ~datetime.datetime
|
|
510
575
|
:ivar end_execution_time: The time when the item finished execution.
|
|
@@ -513,6 +578,13 @@ class SessionDetails(ItemDetails, discriminator="Session"):
|
|
|
513
578
|
:vartype cost_estimate: ~azure.quantum.models.CostEstimate
|
|
514
579
|
:ivar error_data: Error information.
|
|
515
580
|
:vartype error_data: ~azure.quantum.models.WorkspaceItemError
|
|
581
|
+
:ivar priority: Priority of job or session. Known values are: "Standard" and "High".
|
|
582
|
+
:vartype priority: str or ~azure.quantum.models.Priority
|
|
583
|
+
:ivar tags: List of user-supplied tags associated with the job.
|
|
584
|
+
:vartype tags: list[str]
|
|
585
|
+
:ivar usage: Resource consumption metrics containing provider-specific usage data such as
|
|
586
|
+
execution time, quantum shots consumed etc.
|
|
587
|
+
:vartype usage: ~azure.quantum.models.Usage
|
|
516
588
|
:ivar id: Id of the session. Required.
|
|
517
589
|
:vartype id: str
|
|
518
590
|
:ivar item_type: Type of the Quantum Workspace item is Session. Required. A logical grouping of
|
|
@@ -526,7 +598,7 @@ class SessionDetails(ItemDetails, discriminator="Session"):
|
|
|
526
598
|
:vartype status: str or ~azure.quantum.models.SessionStatus
|
|
527
599
|
"""
|
|
528
600
|
|
|
529
|
-
item_type: Literal[ItemType.SESSION] = rest_discriminator(name="itemType", visibility=["read", "create"]) # type: ignore
|
|
601
|
+
item_type: Literal[ItemType.SESSION] = rest_discriminator(name="itemType", visibility=["read", "create"]) # type: ignore
|
|
530
602
|
"""Type of the Quantum Workspace item is Session. Required. A logical grouping of jobs."""
|
|
531
603
|
job_failure_policy: Union[str, "_models.SessionJobFailurePolicy"] = rest_field(
|
|
532
604
|
name="jobFailurePolicy", visibility=["read", "create"]
|
|
@@ -545,6 +617,8 @@ class SessionDetails(ItemDetails, discriminator="Session"):
|
|
|
545
617
|
provider_id: str,
|
|
546
618
|
target: str,
|
|
547
619
|
job_failure_policy: Union[str, "_models.SessionJobFailurePolicy"],
|
|
620
|
+
priority: Optional[Union[str, "_models.Priority"]] = None,
|
|
621
|
+
tags: Optional[list[str]] = None,
|
|
548
622
|
) -> None: ...
|
|
549
623
|
|
|
550
624
|
@overload
|
|
@@ -555,15 +629,13 @@ class SessionDetails(ItemDetails, discriminator="Session"):
|
|
|
555
629
|
"""
|
|
556
630
|
|
|
557
631
|
def __init__(self, *args: Any, **kwargs: Any) -> None:
|
|
558
|
-
super().__init__(*args,
|
|
632
|
+
super().__init__(*args, **kwargs)
|
|
633
|
+
self.item_type = ItemType.SESSION # type: ignore
|
|
559
634
|
|
|
560
635
|
|
|
561
|
-
class TargetStatus(
|
|
636
|
+
class TargetStatus(_Model):
|
|
562
637
|
"""Target status.
|
|
563
638
|
|
|
564
|
-
Readonly variables are only populated by the server, and will be ignored when sending a request.
|
|
565
|
-
|
|
566
|
-
|
|
567
639
|
:ivar id: Target id. Required.
|
|
568
640
|
:vartype id: str
|
|
569
641
|
:ivar current_availability: Current target availability. Required. Known values are:
|
|
@@ -573,6 +645,12 @@ class TargetStatus(_model_base.Model):
|
|
|
573
645
|
:vartype average_queue_time: int
|
|
574
646
|
:ivar status_page: A page with detailed status of the provider.
|
|
575
647
|
:vartype status_page: str
|
|
648
|
+
:ivar num_qubits: The qubit number.
|
|
649
|
+
:vartype num_qubits: int
|
|
650
|
+
:ivar target_profile: Target QIR profile.
|
|
651
|
+
:vartype target_profile: str
|
|
652
|
+
:ivar metadata: The metadata of this target.
|
|
653
|
+
:vartype metadata: any
|
|
576
654
|
"""
|
|
577
655
|
|
|
578
656
|
id: str = rest_field(visibility=["read"])
|
|
@@ -586,11 +664,24 @@ class TargetStatus(_model_base.Model):
|
|
|
586
664
|
"""Average queue time in seconds. Required."""
|
|
587
665
|
status_page: Optional[str] = rest_field(name="statusPage", visibility=["read"])
|
|
588
666
|
"""A page with detailed status of the provider."""
|
|
667
|
+
num_qubits: Optional[int] = rest_field(name="numQubits", visibility=["read"])
|
|
668
|
+
"""The qubit number."""
|
|
669
|
+
target_profile: Optional[str] = rest_field(name="targetProfile", visibility=["read"])
|
|
670
|
+
"""Target QIR profile."""
|
|
671
|
+
metadata: Optional[Any] = rest_field(visibility=["read"])
|
|
672
|
+
"""The metadata of this target."""
|
|
589
673
|
|
|
590
674
|
|
|
591
|
-
class
|
|
592
|
-
"""
|
|
675
|
+
class Usage(_Model):
|
|
676
|
+
"""Resource usage metrics represented as key-value pairs. Keys are provider-defined metric names
|
|
677
|
+
(e.g. "standardMinutes", "shots") and values are the corresponding consumption amounts. The
|
|
678
|
+
specific metrics available depend on the quantum provider and target used.
|
|
593
679
|
|
|
680
|
+
"""
|
|
681
|
+
|
|
682
|
+
|
|
683
|
+
class UsageEvent(_Model):
|
|
684
|
+
"""Usage event details.
|
|
594
685
|
|
|
595
686
|
:ivar dimension_id: The dimension id. Required.
|
|
596
687
|
:vartype dimension_id: str
|
|
@@ -606,17 +697,19 @@ class UsageEvent(_model_base.Model):
|
|
|
606
697
|
:vartype unit_price: float
|
|
607
698
|
"""
|
|
608
699
|
|
|
609
|
-
dimension_id: str = rest_field(name="dimensionId")
|
|
700
|
+
dimension_id: str = rest_field(name="dimensionId", visibility=["read", "create", "update", "delete", "query"])
|
|
610
701
|
"""The dimension id. Required."""
|
|
611
|
-
dimension_name: str = rest_field(name="dimensionName")
|
|
702
|
+
dimension_name: str = rest_field(name="dimensionName", visibility=["read", "create", "update", "delete", "query"])
|
|
612
703
|
"""The dimension name. Required."""
|
|
613
|
-
measure_unit: str = rest_field(name="measureUnit")
|
|
704
|
+
measure_unit: str = rest_field(name="measureUnit", visibility=["read", "create", "update", "delete", "query"])
|
|
614
705
|
"""The unit of measure. Required."""
|
|
615
|
-
amount_billed: float = rest_field(name="amountBilled")
|
|
706
|
+
amount_billed: float = rest_field(name="amountBilled", visibility=["read", "create", "update", "delete", "query"])
|
|
616
707
|
"""The amount billed. Required."""
|
|
617
|
-
amount_consumed: float = rest_field(
|
|
708
|
+
amount_consumed: float = rest_field(
|
|
709
|
+
name="amountConsumed", visibility=["read", "create", "update", "delete", "query"]
|
|
710
|
+
)
|
|
618
711
|
"""The amount consumed. Required."""
|
|
619
|
-
unit_price: float = rest_field(name="unitPrice")
|
|
712
|
+
unit_price: float = rest_field(name="unitPrice", visibility=["read", "create", "update", "delete", "query"])
|
|
620
713
|
"""The unit price. Required."""
|
|
621
714
|
|
|
622
715
|
@overload
|
|
@@ -642,10 +735,9 @@ class UsageEvent(_model_base.Model):
|
|
|
642
735
|
super().__init__(*args, **kwargs)
|
|
643
736
|
|
|
644
737
|
|
|
645
|
-
class WorkspaceItemError(
|
|
738
|
+
class WorkspaceItemError(_Model):
|
|
646
739
|
"""The error object.
|
|
647
740
|
|
|
648
|
-
|
|
649
741
|
:ivar code: One of a server-defined set of error codes. Required.
|
|
650
742
|
:vartype code: str
|
|
651
743
|
:ivar message: A human-readable representation of the error. Required.
|
|
@@ -659,15 +751,15 @@ class WorkspaceItemError(_model_base.Model):
|
|
|
659
751
|
:vartype innererror: ~azure.quantum.models.InnerError
|
|
660
752
|
"""
|
|
661
753
|
|
|
662
|
-
code: str = rest_field()
|
|
754
|
+
code: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
|
|
663
755
|
"""One of a server-defined set of error codes. Required."""
|
|
664
|
-
message: str = rest_field()
|
|
756
|
+
message: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
|
|
665
757
|
"""A human-readable representation of the error. Required."""
|
|
666
|
-
target: Optional[str] = rest_field()
|
|
758
|
+
target: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
|
|
667
759
|
"""The target of the error."""
|
|
668
|
-
details: Optional[
|
|
760
|
+
details: Optional[list[ODataV4Format]] = rest_field(visibility=["read", "create", "update", "delete", "query"])
|
|
669
761
|
"""An array of details about specific errors that led to this reported error."""
|
|
670
|
-
innererror: Optional["_models.InnerError"] = rest_field()
|
|
762
|
+
innererror: Optional["_models.InnerError"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
|
|
671
763
|
"""An object containing more specific information than the current object about the error."""
|
|
672
764
|
|
|
673
765
|
@overload
|
|
@@ -677,7 +769,7 @@ class WorkspaceItemError(_model_base.Model):
|
|
|
677
769
|
code: str,
|
|
678
770
|
message: str,
|
|
679
771
|
target: Optional[str] = None,
|
|
680
|
-
details: Optional[
|
|
772
|
+
details: Optional[list[ODataV4Format]] = None,
|
|
681
773
|
innererror: Optional["_models.InnerError"] = None,
|
|
682
774
|
) -> None: ...
|
|
683
775
|
|
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
#
|
|
2
|
-
#
|
|
3
|
-
#
|
|
4
|
-
#
|
|
1
|
+
# coding=utf-8
|
|
2
|
+
# --------------------------------------------------------------------------
|
|
3
|
+
# Copyright (c) Microsoft Corporation. All rights reserved.
|
|
4
|
+
# Licensed under the MIT License. See License.txt in the project root for license information.
|
|
5
|
+
# --------------------------------------------------------------------------
|
|
5
6
|
"""Customize generated code here.
|
|
6
7
|
|
|
7
8
|
Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize
|
|
8
9
|
"""
|
|
9
|
-
from typing import List
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
|
|
12
|
+
__all__: list[str] = [] # Add all objects you want publicly available to users at this package level
|
|
12
13
|
|
|
13
14
|
|
|
14
15
|
def patch_sdk():
|