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
|
@@ -12,7 +12,7 @@ from typing import TYPE_CHECKING
|
|
|
12
12
|
if TYPE_CHECKING:
|
|
13
13
|
from ._patch import * # pylint: disable=unused-wildcard-import
|
|
14
14
|
|
|
15
|
-
from ._client import
|
|
15
|
+
from ._client import WorkspaceClient # type: ignore
|
|
16
16
|
from ._version import VERSION
|
|
17
17
|
|
|
18
18
|
__version__ = VERSION
|
|
@@ -25,7 +25,7 @@ except ImportError:
|
|
|
25
25
|
from ._patch import patch_sdk as _patch_sdk
|
|
26
26
|
|
|
27
27
|
__all__ = [
|
|
28
|
-
"
|
|
28
|
+
"WorkspaceClient",
|
|
29
29
|
]
|
|
30
30
|
__all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore
|
|
31
31
|
|
azure/quantum/_client/_client.py
CHANGED
|
@@ -15,67 +15,36 @@ from azure.core.credentials import AzureKeyCredential
|
|
|
15
15
|
from azure.core.pipeline import policies
|
|
16
16
|
from azure.core.rest import HttpRequest, HttpResponse
|
|
17
17
|
|
|
18
|
-
from ._configuration import
|
|
19
|
-
from .
|
|
20
|
-
from .operations import
|
|
21
|
-
JobsOperations,
|
|
22
|
-
ProvidersOperations,
|
|
23
|
-
QuotasOperations,
|
|
24
|
-
SessionsOperations,
|
|
25
|
-
StorageOperations,
|
|
26
|
-
TopLevelItemsOperations,
|
|
27
|
-
)
|
|
18
|
+
from ._configuration import WorkspaceClientConfiguration
|
|
19
|
+
from ._utils.serialization import Deserializer, Serializer
|
|
20
|
+
from .operations import ServicesOperations
|
|
28
21
|
|
|
29
22
|
if TYPE_CHECKING:
|
|
30
23
|
from azure.core.credentials import TokenCredential
|
|
31
24
|
|
|
32
25
|
|
|
33
|
-
class
|
|
26
|
+
class WorkspaceClient:
|
|
34
27
|
"""Azure Quantum Workspace Services.
|
|
35
28
|
|
|
36
|
-
:ivar
|
|
37
|
-
:vartype
|
|
38
|
-
:
|
|
39
|
-
|
|
40
|
-
:
|
|
41
|
-
:
|
|
42
|
-
|
|
43
|
-
:vartype storage: azure.quantum.operations.StorageOperations
|
|
44
|
-
:ivar quotas: QuotasOperations operations
|
|
45
|
-
:vartype quotas: azure.quantum.operations.QuotasOperations
|
|
46
|
-
:ivar top_level_items: TopLevelItemsOperations operations
|
|
47
|
-
:vartype top_level_items: azure.quantum.operations.TopLevelItemsOperations
|
|
48
|
-
:param region: The Azure region where the Azure Quantum Workspace is located. Required.
|
|
49
|
-
:type region: str
|
|
50
|
-
:param credential: Credential used to authenticate requests to the service. Is either a
|
|
51
|
-
TokenCredential type or a AzureKeyCredential type. Required.
|
|
29
|
+
:ivar services: ServicesOperations operations
|
|
30
|
+
:vartype services: azure.quantum.operations.ServicesOperations
|
|
31
|
+
:param endpoint: The endpoint of the Azure Quantum service. For example,
|
|
32
|
+
https://{region}.quantum.azure.com. Required.
|
|
33
|
+
:type endpoint: str
|
|
34
|
+
:param credential: Credential used to authenticate requests to the service. Is either a token
|
|
35
|
+
credential type or a key credential type. Required.
|
|
52
36
|
:type credential: ~azure.core.credentials.TokenCredential or
|
|
53
37
|
~azure.core.credentials.AzureKeyCredential
|
|
54
|
-
:keyword service_base_url: The Azure Quantum service base url. Default value is
|
|
55
|
-
"quantum.azure.com".
|
|
56
|
-
:paramtype service_base_url: str
|
|
57
38
|
:keyword api_version: The API version to use for this operation. Default value is
|
|
58
|
-
"
|
|
39
|
+
"2025-12-01-preview". Note that overriding this default value may result in unsupported
|
|
59
40
|
behavior.
|
|
60
41
|
:paramtype api_version: str
|
|
61
42
|
"""
|
|
62
43
|
|
|
63
|
-
def __init__(
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
*,
|
|
68
|
-
service_base_url: str = "quantum.azure.com",
|
|
69
|
-
endpoint: str = None,
|
|
70
|
-
**kwargs: Any
|
|
71
|
-
) -> None:
|
|
72
|
-
if endpoint is not None:
|
|
73
|
-
_endpoint = endpoint
|
|
74
|
-
else:
|
|
75
|
-
_endpoint = "https://{region}.{serviceBaseUrl}"
|
|
76
|
-
self._config = ServicesClientConfiguration(
|
|
77
|
-
region=region, credential=credential, service_base_url=service_base_url, **kwargs
|
|
78
|
-
)
|
|
44
|
+
def __init__(self, endpoint: str, credential: Union["TokenCredential", AzureKeyCredential], **kwargs: Any) -> None:
|
|
45
|
+
_endpoint = "{endpoint}"
|
|
46
|
+
self._config = WorkspaceClientConfiguration(endpoint=endpoint, credential=credential, **kwargs)
|
|
47
|
+
|
|
79
48
|
_policies = kwargs.pop("policies", None)
|
|
80
49
|
if _policies is None:
|
|
81
50
|
_policies = [
|
|
@@ -98,12 +67,7 @@ class ServicesClient:
|
|
|
98
67
|
self._serialize = Serializer()
|
|
99
68
|
self._deserialize = Deserializer()
|
|
100
69
|
self._serialize.client_side_validation = False
|
|
101
|
-
self.
|
|
102
|
-
self.sessions = SessionsOperations(self._client, self._config, self._serialize, self._deserialize)
|
|
103
|
-
self.providers = ProvidersOperations(self._client, self._config, self._serialize, self._deserialize)
|
|
104
|
-
self.storage = StorageOperations(self._client, self._config, self._serialize, self._deserialize)
|
|
105
|
-
self.quotas = QuotasOperations(self._client, self._config, self._serialize, self._deserialize)
|
|
106
|
-
self.top_level_items = TopLevelItemsOperations(self._client, self._config, self._serialize, self._deserialize)
|
|
70
|
+
self.services = ServicesOperations(self._client, self._config, self._serialize, self._deserialize)
|
|
107
71
|
|
|
108
72
|
def send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs: Any) -> HttpResponse:
|
|
109
73
|
"""Runs the network request through the client's chained policies.
|
|
@@ -125,10 +89,7 @@ class ServicesClient:
|
|
|
125
89
|
|
|
126
90
|
request_copy = deepcopy(request)
|
|
127
91
|
path_format_arguments = {
|
|
128
|
-
"
|
|
129
|
-
"serviceBaseUrl": self._serialize.url(
|
|
130
|
-
"self._config.service_base_url", self._config.service_base_url, "str"
|
|
131
|
-
),
|
|
92
|
+
"endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True),
|
|
132
93
|
}
|
|
133
94
|
|
|
134
95
|
request_copy.url = self._client.format_url(request_copy.url, **path_format_arguments)
|
|
@@ -17,44 +17,35 @@ if TYPE_CHECKING:
|
|
|
17
17
|
from azure.core.credentials import TokenCredential
|
|
18
18
|
|
|
19
19
|
|
|
20
|
-
class
|
|
21
|
-
"""Configuration for
|
|
20
|
+
class WorkspaceClientConfiguration: # pylint: disable=too-many-instance-attributes
|
|
21
|
+
"""Configuration for WorkspaceClient.
|
|
22
22
|
|
|
23
23
|
Note that all parameters used to create this instance are saved as instance
|
|
24
24
|
attributes.
|
|
25
25
|
|
|
26
|
-
:param
|
|
27
|
-
|
|
28
|
-
:
|
|
29
|
-
|
|
26
|
+
:param endpoint: The endpoint of the Azure Quantum service. For example,
|
|
27
|
+
https://{region}.quantum.azure.com. Required.
|
|
28
|
+
:type endpoint: str
|
|
29
|
+
:param credential: Credential used to authenticate requests to the service. Is either a token
|
|
30
|
+
credential type or a key credential type. Required.
|
|
30
31
|
:type credential: ~azure.core.credentials.TokenCredential or
|
|
31
32
|
~azure.core.credentials.AzureKeyCredential
|
|
32
|
-
:param service_base_url: The Azure Quantum service base url. Default value is
|
|
33
|
-
"quantum.azure.com".
|
|
34
|
-
:type service_base_url: str
|
|
35
33
|
:keyword api_version: The API version to use for this operation. Default value is
|
|
36
|
-
"
|
|
34
|
+
"2025-12-01-preview". Note that overriding this default value may result in unsupported
|
|
37
35
|
behavior.
|
|
38
36
|
:paramtype api_version: str
|
|
39
37
|
"""
|
|
40
38
|
|
|
41
|
-
def __init__(
|
|
42
|
-
|
|
43
|
-
region: str,
|
|
44
|
-
credential: Union["TokenCredential", AzureKeyCredential],
|
|
45
|
-
service_base_url: str = "quantum.azure.com",
|
|
46
|
-
**kwargs: Any,
|
|
47
|
-
) -> None:
|
|
48
|
-
api_version: str = kwargs.pop("api_version", "2024-10-01-preview")
|
|
39
|
+
def __init__(self, endpoint: str, credential: Union["TokenCredential", AzureKeyCredential], **kwargs: Any) -> None:
|
|
40
|
+
api_version: str = kwargs.pop("api_version", "2025-12-01-preview")
|
|
49
41
|
|
|
50
|
-
if
|
|
51
|
-
raise ValueError("Parameter '
|
|
42
|
+
if endpoint is None:
|
|
43
|
+
raise ValueError("Parameter 'endpoint' must not be None.")
|
|
52
44
|
if credential is None:
|
|
53
45
|
raise ValueError("Parameter 'credential' must not be None.")
|
|
54
46
|
|
|
55
|
-
self.
|
|
47
|
+
self.endpoint = endpoint
|
|
56
48
|
self.credential = credential
|
|
57
|
-
self.service_base_url = service_base_url
|
|
58
49
|
self.api_version = api_version
|
|
59
50
|
self.credential_scopes = kwargs.pop("credential_scopes", ["https://quantum.microsoft.com/.default"])
|
|
60
51
|
kwargs.setdefault("sdk_moniker", "quantum/{}".format(VERSION))
|
azure/quantum/_client/_patch.py
CHANGED
|
@@ -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():
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
# --------------------------------------------------------------------------
|
|
2
|
+
# Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
+
# Licensed under the MIT License. See License.txt in the project root for license information.
|
|
4
|
+
# Code generated by Microsoft (R) Python Code Generator.
|
|
5
|
+
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
6
|
+
# --------------------------------------------------------------------------
|