qi-compute-api-client 0.38.0__py3-none-any.whl → 0.39.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.
Potentially problematic release.
This version of qi-compute-api-client might be problematic. Click here for more details.
- compute_api_client/__init__.py +1 -0
- compute_api_client/api/backend_types_api.py +17 -0
- compute_api_client/api/commits_api.py +289 -0
- compute_api_client/api/jobs_api.py +17 -0
- compute_api_client/api/results_api.py +17 -0
- compute_api_client/docs/BackendType.md +1 -0
- compute_api_client/docs/BackendTypesApi.md +4 -2
- compute_api_client/docs/CommitsApi.md +84 -0
- compute_api_client/docs/CompilePayload.md +29 -0
- compute_api_client/docs/Job.md +1 -0
- compute_api_client/docs/JobIn.md +1 -0
- compute_api_client/docs/JobsApi.md +4 -2
- compute_api_client/docs/Result.md +1 -0
- compute_api_client/docs/ResultIn.md +1 -0
- compute_api_client/docs/ResultsApi.md +4 -2
- compute_api_client/models/__init__.py +1 -0
- compute_api_client/models/backend_type.py +3 -1
- compute_api_client/models/compile_payload.py +90 -0
- compute_api_client/models/compile_stage.py +1 -3
- compute_api_client/models/job.py +5 -3
- compute_api_client/models/job_in.py +5 -3
- compute_api_client/models/result.py +10 -3
- compute_api_client/models/result_in.py +10 -3
- {qi_compute_api_client-0.38.0.dist-info → qi_compute_api_client-0.39.0.dist-info}/METADATA +3 -1
- {qi_compute_api_client-0.38.0.dist-info → qi_compute_api_client-0.39.0.dist-info}/RECORD +27 -25
- {qi_compute_api_client-0.38.0.dist-info → qi_compute_api_client-0.39.0.dist-info}/LICENSE.md +0 -0
- {qi_compute_api_client-0.38.0.dist-info → qi_compute_api_client-0.39.0.dist-info}/WHEEL +0 -0
|
@@ -4,12 +4,96 @@ All URIs are relative to *http://localhost*
|
|
|
4
4
|
|
|
5
5
|
Method | HTTP request | Description
|
|
6
6
|
------------- | ------------- | -------------
|
|
7
|
+
[**compile_commit_commits_id_compile_post**](CommitsApi.md#compile_commit_commits_id_compile_post) | **POST** /commits/{id}/compile | Compile file in a commit
|
|
7
8
|
[**create_commit_commits_post**](CommitsApi.md#create_commit_commits_post) | **POST** /commits | Create commit
|
|
8
9
|
[**delete_commit_commits_id_delete**](CommitsApi.md#delete_commit_commits_id_delete) | **DELETE** /commits/{id} | Destroy commit
|
|
9
10
|
[**read_commit_commits_id_get**](CommitsApi.md#read_commit_commits_id_get) | **GET** /commits/{id} | Get commit by ID
|
|
10
11
|
[**read_commits_commits_get**](CommitsApi.md#read_commits_commits_get) | **GET** /commits | List commits
|
|
11
12
|
|
|
12
13
|
|
|
14
|
+
# **compile_commit_commits_id_compile_post**
|
|
15
|
+
> compile_commit_commits_id_compile_post(id, compile_payload)
|
|
16
|
+
|
|
17
|
+
Compile file in a commit
|
|
18
|
+
|
|
19
|
+
Compile file in a commit.
|
|
20
|
+
|
|
21
|
+
### Example
|
|
22
|
+
|
|
23
|
+
* OAuth Authentication (user_bearer):
|
|
24
|
+
* Api Key Authentication (backend):
|
|
25
|
+
```python
|
|
26
|
+
import time
|
|
27
|
+
import os
|
|
28
|
+
import compute_api_client
|
|
29
|
+
from compute_api_client.models.compile_payload import CompilePayload
|
|
30
|
+
from compute_api_client.rest import ApiException
|
|
31
|
+
from pprint import pprint
|
|
32
|
+
|
|
33
|
+
# Defining the host is optional and defaults to http://localhost
|
|
34
|
+
# See configuration.py for a list of all supported configuration parameters.
|
|
35
|
+
configuration = compute_api_client.Configuration(
|
|
36
|
+
host = "http://localhost"
|
|
37
|
+
)
|
|
38
|
+
|
|
39
|
+
# The client must configure the authentication and authorization parameters
|
|
40
|
+
# in accordance with the API server security policy.
|
|
41
|
+
# Examples for each auth method are provided below, use the example that
|
|
42
|
+
# satisfies your auth use case.
|
|
43
|
+
|
|
44
|
+
configuration.access_token = os.environ["ACCESS_TOKEN"]
|
|
45
|
+
|
|
46
|
+
# Configure API key authorization: backend
|
|
47
|
+
configuration.api_key['backend'] = os.environ["API_KEY"]
|
|
48
|
+
|
|
49
|
+
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
|
50
|
+
# configuration.api_key_prefix['backend'] = 'Bearer'
|
|
51
|
+
|
|
52
|
+
# Enter a context with an instance of the API client
|
|
53
|
+
async with compute_api_client.ApiClient(configuration) as api_client:
|
|
54
|
+
# Create an instance of the API class
|
|
55
|
+
api_instance = compute_api_client.CommitsApi(api_client)
|
|
56
|
+
id = 56 # int |
|
|
57
|
+
compile_payload = compute_api_client.CompilePayload() # CompilePayload |
|
|
58
|
+
|
|
59
|
+
try:
|
|
60
|
+
# Compile file in a commit
|
|
61
|
+
await api_instance.compile_commit_commits_id_compile_post(id, compile_payload)
|
|
62
|
+
except Exception as e:
|
|
63
|
+
print("Exception when calling CommitsApi->compile_commit_commits_id_compile_post: %s\n" % e)
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
### Parameters
|
|
69
|
+
|
|
70
|
+
Name | Type | Description | Notes
|
|
71
|
+
------------- | ------------- | ------------- | -------------
|
|
72
|
+
**id** | **int**| |
|
|
73
|
+
**compile_payload** | [**CompilePayload**](CompilePayload.md)| |
|
|
74
|
+
|
|
75
|
+
### Return type
|
|
76
|
+
|
|
77
|
+
void (empty response body)
|
|
78
|
+
|
|
79
|
+
### Authorization
|
|
80
|
+
|
|
81
|
+
[user_bearer](../README.md#user_bearer), [backend](../README.md#backend)
|
|
82
|
+
|
|
83
|
+
### HTTP request headers
|
|
84
|
+
|
|
85
|
+
- **Content-Type**: application/json
|
|
86
|
+
- **Accept**: application/json
|
|
87
|
+
|
|
88
|
+
### HTTP response details
|
|
89
|
+
| Status code | Description | Response headers |
|
|
90
|
+
|-------------|-------------|------------------|
|
|
91
|
+
**204** | Compiled | - |
|
|
92
|
+
**404** | Not Found | - |
|
|
93
|
+
**422** | Validation Error | - |
|
|
94
|
+
|
|
95
|
+
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
96
|
+
|
|
13
97
|
# **create_commit_commits_post**
|
|
14
98
|
> Commit create_commit_commits_post(commit_in)
|
|
15
99
|
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# CompilePayload
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
## Properties
|
|
5
|
+
Name | Type | Description | Notes
|
|
6
|
+
------------ | ------------- | ------------- | -------------
|
|
7
|
+
**compile_stage** | [**CompileStage**](CompileStage.md) | |
|
|
8
|
+
**backend_type_id** | **int** | |
|
|
9
|
+
|
|
10
|
+
## Example
|
|
11
|
+
|
|
12
|
+
```python
|
|
13
|
+
from compute_api_client.models.compile_payload import CompilePayload
|
|
14
|
+
|
|
15
|
+
# TODO update the JSON string below
|
|
16
|
+
json = "{}"
|
|
17
|
+
# create an instance of CompilePayload from a JSON string
|
|
18
|
+
compile_payload_instance = CompilePayload.from_json(json)
|
|
19
|
+
# print the JSON string representation of the object
|
|
20
|
+
print CompilePayload.to_json()
|
|
21
|
+
|
|
22
|
+
# convert the object into a dict
|
|
23
|
+
compile_payload_dict = compile_payload_instance.to_dict()
|
|
24
|
+
# create an instance of CompilePayload from a dict
|
|
25
|
+
compile_payload_form_dict = compile_payload.from_dict(compile_payload_dict)
|
|
26
|
+
```
|
|
27
|
+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
28
|
+
|
|
29
|
+
|
compute_api_client/docs/Job.md
CHANGED
compute_api_client/docs/JobIn.md
CHANGED
|
@@ -244,7 +244,7 @@ Name | Type | Description | Notes
|
|
|
244
244
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
245
245
|
|
|
246
246
|
# **read_jobs_jobs_get**
|
|
247
|
-
> PageJob read_jobs_jobs_get(id=id, created_on=created_on, file_id=file_id, algorithm_type=algorithm_type, status=status, batch_job_id=batch_job_id, queued_at__isnull=queued_at__isnull, queued_at=queued_at, finished_at__isnull=finished_at__isnull, finished_at=finished_at, number_of_shots__isnull=number_of_shots__isnull, number_of_shots=number_of_shots, sort_by=sort_by, latest=latest, page=page, size=size)
|
|
247
|
+
> PageJob read_jobs_jobs_get(id=id, created_on=created_on, file_id=file_id, algorithm_type=algorithm_type, status=status, batch_job_id=batch_job_id, queued_at__isnull=queued_at__isnull, queued_at=queued_at, finished_at__isnull=finished_at__isnull, finished_at=finished_at, number_of_shots__isnull=number_of_shots__isnull, number_of_shots=number_of_shots, raw_data_enabled=raw_data_enabled, sort_by=sort_by, latest=latest, page=page, size=size)
|
|
248
248
|
|
|
249
249
|
List jobs
|
|
250
250
|
|
|
@@ -299,6 +299,7 @@ async with compute_api_client.ApiClient(configuration) as api_client:
|
|
|
299
299
|
finished_at = '2013-10-20T19:20:30+01:00' # datetime | (optional)
|
|
300
300
|
number_of_shots__isnull = True # bool | (optional)
|
|
301
301
|
number_of_shots = 56 # int | (optional)
|
|
302
|
+
raw_data_enabled = True # bool | (optional)
|
|
302
303
|
sort_by = 'sort_by_example' # str | The field name to sort on. Prefix with '-' for descending order. E.g., '-created_on'. (optional)
|
|
303
304
|
latest = True # bool | If True gets the most recently created object. (optional)
|
|
304
305
|
page = 1 # int | Page number (optional) (default to 1)
|
|
@@ -306,7 +307,7 @@ async with compute_api_client.ApiClient(configuration) as api_client:
|
|
|
306
307
|
|
|
307
308
|
try:
|
|
308
309
|
# List jobs
|
|
309
|
-
api_response = await api_instance.read_jobs_jobs_get(id=id, created_on=created_on, file_id=file_id, algorithm_type=algorithm_type, status=status, batch_job_id=batch_job_id, queued_at__isnull=queued_at__isnull, queued_at=queued_at, finished_at__isnull=finished_at__isnull, finished_at=finished_at, number_of_shots__isnull=number_of_shots__isnull, number_of_shots=number_of_shots, sort_by=sort_by, latest=latest, page=page, size=size)
|
|
310
|
+
api_response = await api_instance.read_jobs_jobs_get(id=id, created_on=created_on, file_id=file_id, algorithm_type=algorithm_type, status=status, batch_job_id=batch_job_id, queued_at__isnull=queued_at__isnull, queued_at=queued_at, finished_at__isnull=finished_at__isnull, finished_at=finished_at, number_of_shots__isnull=number_of_shots__isnull, number_of_shots=number_of_shots, raw_data_enabled=raw_data_enabled, sort_by=sort_by, latest=latest, page=page, size=size)
|
|
310
311
|
print("The response of JobsApi->read_jobs_jobs_get:\n")
|
|
311
312
|
pprint(api_response)
|
|
312
313
|
except Exception as e:
|
|
@@ -331,6 +332,7 @@ Name | Type | Description | Notes
|
|
|
331
332
|
**finished_at** | **datetime**| | [optional]
|
|
332
333
|
**number_of_shots__isnull** | **bool**| | [optional]
|
|
333
334
|
**number_of_shots** | **int**| | [optional]
|
|
335
|
+
**raw_data_enabled** | **bool**| | [optional]
|
|
334
336
|
**sort_by** | **str**| The field name to sort on. Prefix with '-' for descending order. E.g., '-created_on'. | [optional]
|
|
335
337
|
**latest** | **bool**| If True gets the most recently created object. | [optional]
|
|
336
338
|
**page** | **int**| Page number | [optional] [default to 1]
|
|
@@ -245,7 +245,7 @@ Name | Type | Description | Notes
|
|
|
245
245
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
246
246
|
|
|
247
247
|
# **read_results_by_algorithm_id_results_algorithm_algorithm_id_get**
|
|
248
|
-
> PageResult read_results_by_algorithm_id_results_algorithm_algorithm_id_get(algorithm_id, id=id, created_on=created_on, job_id=job_id, metadata_id=metadata_id, execution_time_in_seconds=execution_time_in_seconds, shots_requested__isnull=shots_requested__isnull, shots_requested=shots_requested, shots_done__isnull=shots_done__isnull, shots_done=shots_done, results__isnull=results__isnull, sort_by=sort_by, latest=latest, page=page, size=size)
|
|
248
|
+
> PageResult read_results_by_algorithm_id_results_algorithm_algorithm_id_get(algorithm_id, id=id, created_on=created_on, job_id=job_id, metadata_id=metadata_id, execution_time_in_seconds=execution_time_in_seconds, shots_requested__isnull=shots_requested__isnull, shots_requested=shots_requested, shots_done__isnull=shots_done__isnull, shots_done=shots_done, results__isnull=results__isnull, raw_data__isnull=raw_data__isnull, sort_by=sort_by, latest=latest, page=page, size=size)
|
|
249
249
|
|
|
250
250
|
Retrieve results by algorithm ID
|
|
251
251
|
|
|
@@ -290,6 +290,7 @@ async with compute_api_client.ApiClient(configuration) as api_client:
|
|
|
290
290
|
shots_done__isnull = True # bool | (optional)
|
|
291
291
|
shots_done = 56 # int | (optional)
|
|
292
292
|
results__isnull = True # bool | (optional)
|
|
293
|
+
raw_data__isnull = True # bool | (optional)
|
|
293
294
|
sort_by = 'sort_by_example' # str | The field name to sort on. Prefix with '-' for descending order. E.g., '-created_on'. (optional)
|
|
294
295
|
latest = True # bool | If True gets the most recently created object. (optional)
|
|
295
296
|
page = 1 # int | Page number (optional) (default to 1)
|
|
@@ -297,7 +298,7 @@ async with compute_api_client.ApiClient(configuration) as api_client:
|
|
|
297
298
|
|
|
298
299
|
try:
|
|
299
300
|
# Retrieve results by algorithm ID
|
|
300
|
-
api_response = await api_instance.read_results_by_algorithm_id_results_algorithm_algorithm_id_get(algorithm_id, id=id, created_on=created_on, job_id=job_id, metadata_id=metadata_id, execution_time_in_seconds=execution_time_in_seconds, shots_requested__isnull=shots_requested__isnull, shots_requested=shots_requested, shots_done__isnull=shots_done__isnull, shots_done=shots_done, results__isnull=results__isnull, sort_by=sort_by, latest=latest, page=page, size=size)
|
|
301
|
+
api_response = await api_instance.read_results_by_algorithm_id_results_algorithm_algorithm_id_get(algorithm_id, id=id, created_on=created_on, job_id=job_id, metadata_id=metadata_id, execution_time_in_seconds=execution_time_in_seconds, shots_requested__isnull=shots_requested__isnull, shots_requested=shots_requested, shots_done__isnull=shots_done__isnull, shots_done=shots_done, results__isnull=results__isnull, raw_data__isnull=raw_data__isnull, sort_by=sort_by, latest=latest, page=page, size=size)
|
|
301
302
|
print("The response of ResultsApi->read_results_by_algorithm_id_results_algorithm_algorithm_id_get:\n")
|
|
302
303
|
pprint(api_response)
|
|
303
304
|
except Exception as e:
|
|
@@ -321,6 +322,7 @@ Name | Type | Description | Notes
|
|
|
321
322
|
**shots_done__isnull** | **bool**| | [optional]
|
|
322
323
|
**shots_done** | **int**| | [optional]
|
|
323
324
|
**results__isnull** | **bool**| | [optional]
|
|
325
|
+
**raw_data__isnull** | **bool**| | [optional]
|
|
324
326
|
**sort_by** | **str**| The field name to sort on. Prefix with '-' for descending order. E.g., '-created_on'. | [optional]
|
|
325
327
|
**latest** | **bool**| If True gets the most recently created object. | [optional]
|
|
326
328
|
**page** | **int**| Page number | [optional] [default to 1]
|
|
@@ -28,6 +28,7 @@ from compute_api_client.models.batch_job_in import BatchJobIn
|
|
|
28
28
|
from compute_api_client.models.batch_job_status import BatchJobStatus
|
|
29
29
|
from compute_api_client.models.commit import Commit
|
|
30
30
|
from compute_api_client.models.commit_in import CommitIn
|
|
31
|
+
from compute_api_client.models.compile_payload import CompilePayload
|
|
31
32
|
from compute_api_client.models.compile_stage import CompileStage
|
|
32
33
|
from compute_api_client.models.domain import Domain
|
|
33
34
|
from compute_api_client.models.file import File
|
|
@@ -38,6 +38,7 @@ class BackendType(BaseModel):
|
|
|
38
38
|
description: StrictStr
|
|
39
39
|
image_id: Annotated[str, Field(strict=True, max_length=16)]
|
|
40
40
|
is_hardware: StrictBool
|
|
41
|
+
supports_raw_data: StrictBool
|
|
41
42
|
features: List[StrictStr]
|
|
42
43
|
default_compiler_config: Union[str, Any]
|
|
43
44
|
gateset: List[StrictStr]
|
|
@@ -46,7 +47,7 @@ class BackendType(BaseModel):
|
|
|
46
47
|
status: BackendStatus
|
|
47
48
|
default_number_of_shots: StrictInt
|
|
48
49
|
max_number_of_shots: StrictInt
|
|
49
|
-
__properties: ClassVar[List[str]] = ["id", "name", "infrastructure", "description", "image_id", "is_hardware", "features", "default_compiler_config", "gateset", "topology", "nqubits", "status", "default_number_of_shots", "max_number_of_shots"]
|
|
50
|
+
__properties: ClassVar[List[str]] = ["id", "name", "infrastructure", "description", "image_id", "is_hardware", "supports_raw_data", "features", "default_compiler_config", "gateset", "topology", "nqubits", "status", "default_number_of_shots", "max_number_of_shots"]
|
|
50
51
|
|
|
51
52
|
model_config = {
|
|
52
53
|
"populate_by_name": True,
|
|
@@ -102,6 +103,7 @@ class BackendType(BaseModel):
|
|
|
102
103
|
"description": obj.get("description"),
|
|
103
104
|
"image_id": obj.get("image_id"),
|
|
104
105
|
"is_hardware": obj.get("is_hardware"),
|
|
106
|
+
"supports_raw_data": obj.get("supports_raw_data"),
|
|
105
107
|
"features": obj.get("features"),
|
|
106
108
|
"default_compiler_config": obj.get("default_compiler_config"),
|
|
107
109
|
"gateset": obj.get("gateset"),
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Quantum Inspire 2
|
|
5
|
+
|
|
6
|
+
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 0.1.0
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
from __future__ import annotations
|
|
16
|
+
import pprint
|
|
17
|
+
import re # noqa: F401
|
|
18
|
+
import json
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
from typing import Any, ClassVar, Dict, List
|
|
22
|
+
from pydantic import BaseModel, StrictInt
|
|
23
|
+
from compute_api_client.models.compile_stage import CompileStage
|
|
24
|
+
try:
|
|
25
|
+
from typing import Self
|
|
26
|
+
except ImportError:
|
|
27
|
+
from typing_extensions import Self
|
|
28
|
+
|
|
29
|
+
class CompilePayload(BaseModel):
|
|
30
|
+
"""
|
|
31
|
+
CompilePayload
|
|
32
|
+
""" # noqa: E501
|
|
33
|
+
compile_stage: CompileStage
|
|
34
|
+
backend_type_id: StrictInt
|
|
35
|
+
__properties: ClassVar[List[str]] = ["compile_stage", "backend_type_id"]
|
|
36
|
+
|
|
37
|
+
model_config = {
|
|
38
|
+
"populate_by_name": True,
|
|
39
|
+
"validate_assignment": True
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
def to_str(self) -> str:
|
|
44
|
+
"""Returns the string representation of the model using alias"""
|
|
45
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
46
|
+
|
|
47
|
+
def to_json(self) -> str:
|
|
48
|
+
"""Returns the JSON representation of the model using alias"""
|
|
49
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
50
|
+
return json.dumps(self.to_dict())
|
|
51
|
+
|
|
52
|
+
@classmethod
|
|
53
|
+
def from_json(cls, json_str: str) -> Self:
|
|
54
|
+
"""Create an instance of CompilePayload from a JSON string"""
|
|
55
|
+
return cls.from_dict(json.loads(json_str))
|
|
56
|
+
|
|
57
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
58
|
+
"""Return the dictionary representation of the model using alias.
|
|
59
|
+
|
|
60
|
+
This has the following differences from calling pydantic's
|
|
61
|
+
`self.model_dump(by_alias=True)`:
|
|
62
|
+
|
|
63
|
+
* `None` is only added to the output dict for nullable fields that
|
|
64
|
+
were set at model initialization. Other fields with value `None`
|
|
65
|
+
are ignored.
|
|
66
|
+
"""
|
|
67
|
+
_dict = self.model_dump(
|
|
68
|
+
by_alias=True,
|
|
69
|
+
exclude={
|
|
70
|
+
},
|
|
71
|
+
exclude_none=True,
|
|
72
|
+
)
|
|
73
|
+
return _dict
|
|
74
|
+
|
|
75
|
+
@classmethod
|
|
76
|
+
def from_dict(cls, obj: Dict) -> Self:
|
|
77
|
+
"""Create an instance of CompilePayload from a dict"""
|
|
78
|
+
if obj is None:
|
|
79
|
+
return None
|
|
80
|
+
|
|
81
|
+
if not isinstance(obj, dict):
|
|
82
|
+
return cls.model_validate(obj)
|
|
83
|
+
|
|
84
|
+
_obj = cls.model_validate({
|
|
85
|
+
"compile_stage": obj.get("compile_stage"),
|
|
86
|
+
"backend_type_id": obj.get("backend_type_id")
|
|
87
|
+
})
|
|
88
|
+
return _obj
|
|
89
|
+
|
|
90
|
+
|
|
@@ -35,9 +35,7 @@ class CompileStage(str, Enum):
|
|
|
35
35
|
allowed enum values
|
|
36
36
|
"""
|
|
37
37
|
NONE = 'none'
|
|
38
|
-
|
|
39
|
-
NATIVE_GATESET = 'native_gateset'
|
|
40
|
-
SCHEDULED = 'scheduled'
|
|
38
|
+
DECOMPOSITION = 'decomposition'
|
|
41
39
|
|
|
42
40
|
@classmethod
|
|
43
41
|
def from_json(cls, json_str: str) -> Self:
|
compute_api_client/models/job.py
CHANGED
|
@@ -19,7 +19,7 @@ import json
|
|
|
19
19
|
|
|
20
20
|
from datetime import datetime
|
|
21
21
|
from typing import Any, ClassVar, Dict, List, Optional
|
|
22
|
-
from pydantic import BaseModel, StrictInt
|
|
22
|
+
from pydantic import BaseModel, StrictBool, StrictInt
|
|
23
23
|
from compute_api_client.models.algorithm_type import AlgorithmType
|
|
24
24
|
from compute_api_client.models.job_status import JobStatus
|
|
25
25
|
try:
|
|
@@ -40,7 +40,8 @@ class Job(BaseModel):
|
|
|
40
40
|
queued_at: Optional[datetime]
|
|
41
41
|
finished_at: Optional[datetime]
|
|
42
42
|
number_of_shots: Optional[StrictInt]
|
|
43
|
-
|
|
43
|
+
raw_data_enabled: StrictBool
|
|
44
|
+
__properties: ClassVar[List[str]] = ["id", "created_on", "file_id", "algorithm_type", "status", "batch_job_id", "queued_at", "finished_at", "number_of_shots", "raw_data_enabled"]
|
|
44
45
|
|
|
45
46
|
model_config = {
|
|
46
47
|
"populate_by_name": True,
|
|
@@ -113,7 +114,8 @@ class Job(BaseModel):
|
|
|
113
114
|
"batch_job_id": obj.get("batch_job_id"),
|
|
114
115
|
"queued_at": obj.get("queued_at"),
|
|
115
116
|
"finished_at": obj.get("finished_at"),
|
|
116
|
-
"number_of_shots": obj.get("number_of_shots")
|
|
117
|
+
"number_of_shots": obj.get("number_of_shots"),
|
|
118
|
+
"raw_data_enabled": obj.get("raw_data_enabled")
|
|
117
119
|
})
|
|
118
120
|
return _obj
|
|
119
121
|
|
|
@@ -19,7 +19,7 @@ import json
|
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
from typing import Any, ClassVar, Dict, List, Optional
|
|
22
|
-
from pydantic import BaseModel, StrictInt
|
|
22
|
+
from pydantic import BaseModel, StrictBool, StrictInt
|
|
23
23
|
try:
|
|
24
24
|
from typing import Self
|
|
25
25
|
except ImportError:
|
|
@@ -32,7 +32,8 @@ class JobIn(BaseModel):
|
|
|
32
32
|
file_id: StrictInt
|
|
33
33
|
batch_job_id: StrictInt
|
|
34
34
|
number_of_shots: Optional[StrictInt] = None
|
|
35
|
-
|
|
35
|
+
raw_data_enabled: Optional[StrictBool] = False
|
|
36
|
+
__properties: ClassVar[List[str]] = ["file_id", "batch_job_id", "number_of_shots", "raw_data_enabled"]
|
|
36
37
|
|
|
37
38
|
model_config = {
|
|
38
39
|
"populate_by_name": True,
|
|
@@ -89,7 +90,8 @@ class JobIn(BaseModel):
|
|
|
89
90
|
_obj = cls.model_validate({
|
|
90
91
|
"file_id": obj.get("file_id"),
|
|
91
92
|
"batch_job_id": obj.get("batch_job_id"),
|
|
92
|
-
"number_of_shots": obj.get("number_of_shots")
|
|
93
|
+
"number_of_shots": obj.get("number_of_shots"),
|
|
94
|
+
"raw_data_enabled": obj.get("raw_data_enabled") if obj.get("raw_data_enabled") is not None else False
|
|
93
95
|
})
|
|
94
96
|
return _obj
|
|
95
97
|
|
|
@@ -19,7 +19,7 @@ import json
|
|
|
19
19
|
|
|
20
20
|
from datetime import datetime
|
|
21
21
|
from typing import Any, ClassVar, Dict, List, Optional, Union
|
|
22
|
-
from pydantic import BaseModel, StrictFloat, StrictInt
|
|
22
|
+
from pydantic import BaseModel, StrictFloat, StrictInt, StrictStr
|
|
23
23
|
try:
|
|
24
24
|
from typing import Self
|
|
25
25
|
except ImportError:
|
|
@@ -37,7 +37,8 @@ class Result(BaseModel):
|
|
|
37
37
|
shots_requested: Optional[StrictInt]
|
|
38
38
|
shots_done: Optional[StrictInt]
|
|
39
39
|
results: Optional[Union[str, Any]]
|
|
40
|
-
|
|
40
|
+
raw_data: Optional[List[StrictStr]]
|
|
41
|
+
__properties: ClassVar[List[str]] = ["id", "created_on", "job_id", "metadata_id", "execution_time_in_seconds", "shots_requested", "shots_done", "results", "raw_data"]
|
|
41
42
|
|
|
42
43
|
model_config = {
|
|
43
44
|
"populate_by_name": True,
|
|
@@ -90,6 +91,11 @@ class Result(BaseModel):
|
|
|
90
91
|
if self.results is None and "results" in self.model_fields_set:
|
|
91
92
|
_dict['results'] = None
|
|
92
93
|
|
|
94
|
+
# set to None if raw_data (nullable) is None
|
|
95
|
+
# and model_fields_set contains the field
|
|
96
|
+
if self.raw_data is None and "raw_data" in self.model_fields_set:
|
|
97
|
+
_dict['raw_data'] = None
|
|
98
|
+
|
|
93
99
|
return _dict
|
|
94
100
|
|
|
95
101
|
@classmethod
|
|
@@ -109,7 +115,8 @@ class Result(BaseModel):
|
|
|
109
115
|
"execution_time_in_seconds": obj.get("execution_time_in_seconds"),
|
|
110
116
|
"shots_requested": obj.get("shots_requested"),
|
|
111
117
|
"shots_done": obj.get("shots_done"),
|
|
112
|
-
"results": obj.get("results")
|
|
118
|
+
"results": obj.get("results"),
|
|
119
|
+
"raw_data": obj.get("raw_data")
|
|
113
120
|
})
|
|
114
121
|
return _obj
|
|
115
122
|
|
|
@@ -19,7 +19,7 @@ import json
|
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
from typing import Any, ClassVar, Dict, List, Optional, Union
|
|
22
|
-
from pydantic import BaseModel, StrictFloat, StrictInt
|
|
22
|
+
from pydantic import BaseModel, StrictFloat, StrictInt, StrictStr
|
|
23
23
|
try:
|
|
24
24
|
from typing import Self
|
|
25
25
|
except ImportError:
|
|
@@ -35,7 +35,8 @@ class ResultIn(BaseModel):
|
|
|
35
35
|
shots_requested: Optional[StrictInt] = None
|
|
36
36
|
shots_done: Optional[StrictInt] = None
|
|
37
37
|
results: Optional[Union[str, Any]] = None
|
|
38
|
-
|
|
38
|
+
raw_data: Optional[List[StrictStr]] = None
|
|
39
|
+
__properties: ClassVar[List[str]] = ["job_id", "metadata_id", "execution_time_in_seconds", "shots_requested", "shots_done", "results", "raw_data"]
|
|
39
40
|
|
|
40
41
|
model_config = {
|
|
41
42
|
"populate_by_name": True,
|
|
@@ -93,6 +94,11 @@ class ResultIn(BaseModel):
|
|
|
93
94
|
if self.results is None and "results" in self.model_fields_set:
|
|
94
95
|
_dict['results'] = None
|
|
95
96
|
|
|
97
|
+
# set to None if raw_data (nullable) is None
|
|
98
|
+
# and model_fields_set contains the field
|
|
99
|
+
if self.raw_data is None and "raw_data" in self.model_fields_set:
|
|
100
|
+
_dict['raw_data'] = None
|
|
101
|
+
|
|
96
102
|
return _dict
|
|
97
103
|
|
|
98
104
|
@classmethod
|
|
@@ -110,7 +116,8 @@ class ResultIn(BaseModel):
|
|
|
110
116
|
"execution_time_in_seconds": obj.get("execution_time_in_seconds"),
|
|
111
117
|
"shots_requested": obj.get("shots_requested"),
|
|
112
118
|
"shots_done": obj.get("shots_done"),
|
|
113
|
-
"results": obj.get("results")
|
|
119
|
+
"results": obj.get("results"),
|
|
120
|
+
"raw_data": obj.get("raw_data")
|
|
114
121
|
})
|
|
115
122
|
return _obj
|
|
116
123
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: qi-compute-api-client
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.39.0
|
|
4
4
|
Summary: An API client for the Compute Job Manager of Quantum Inspire.
|
|
5
5
|
Home-page: https://github.com/QuTech-Delft/compute-api-client
|
|
6
6
|
License: Apache-2.0
|
|
@@ -113,6 +113,7 @@ Class | Method | HTTP request | Description
|
|
|
113
113
|
*BatchJobsApi* | [**pop_batch_job_batch_jobs_pop_patch**](compute_api_client/docs/BatchJobsApi.md#pop_batch_job_batch_jobs_pop_patch) | **PATCH** /batch_jobs/pop | Take batch job
|
|
114
114
|
*BatchJobsApi* | [**read_batch_jobs_batch_jobs_get**](compute_api_client/docs/BatchJobsApi.md#read_batch_jobs_batch_jobs_get) | **GET** /batch_jobs | List batch jobs
|
|
115
115
|
*BatchJobsApi* | [**unpop_batch_job_batch_jobs_unpop_patch**](compute_api_client/docs/BatchJobsApi.md#unpop_batch_job_batch_jobs_unpop_patch) | **PATCH** /batch_jobs/unpop | Take batch job
|
|
116
|
+
*CommitsApi* | [**compile_commit_commits_id_compile_post**](compute_api_client/docs/CommitsApi.md#compile_commit_commits_id_compile_post) | **POST** /commits/{id}/compile | Compile file in a commit
|
|
116
117
|
*CommitsApi* | [**create_commit_commits_post**](compute_api_client/docs/CommitsApi.md#create_commit_commits_post) | **POST** /commits | Create commit
|
|
117
118
|
*CommitsApi* | [**delete_commit_commits_id_delete**](compute_api_client/docs/CommitsApi.md#delete_commit_commits_id_delete) | **DELETE** /commits/{id} | Destroy commit
|
|
118
119
|
*CommitsApi* | [**read_commit_commits_id_get**](compute_api_client/docs/CommitsApi.md#read_commit_commits_id_get) | **GET** /commits/{id} | Get commit by ID
|
|
@@ -184,6 +185,7 @@ Class | Method | HTTP request | Description
|
|
|
184
185
|
- [BatchJobStatus](compute_api_client/docs/BatchJobStatus.md)
|
|
185
186
|
- [Commit](compute_api_client/docs/Commit.md)
|
|
186
187
|
- [CommitIn](compute_api_client/docs/CommitIn.md)
|
|
188
|
+
- [CompilePayload](compute_api_client/docs/CompilePayload.md)
|
|
187
189
|
- [CompileStage](compute_api_client/docs/CompileStage.md)
|
|
188
190
|
- [Domain](compute_api_client/docs/Domain.md)
|
|
189
191
|
- [File](compute_api_client/docs/File.md)
|