Skip to content

Commit

Permalink
[QI2-1248] Raw data
Browse files Browse the repository at this point in the history
  • Loading branch information
Mythir committed Dec 12, 2024
1 parent 336428d commit ab6bcc8
Show file tree
Hide file tree
Showing 19 changed files with 107 additions and 21 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ Authentication schemes defined for the API:

- **Type**: OAuth
- **Flow**: accessCode
- **Authorization URL**: https://auth.qi2.quantum-inspire.com/realms/oidc_staging/protocol/openid-connect/auth
- **Authorization URL**: https://auth.qi2.quantum-inspire.com/realms/oidc_development/protocol/openid-connect/auth
- **Scopes**: N/A

<a id="backend"></a>
Expand Down
17 changes: 17 additions & 0 deletions compute_api_client/api/backend_types_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,7 @@ async def read_backend_types_backend_types_get(
description: Optional[StrictStr] = None,
image_id: Optional[StrictStr] = None,
is_hardware: Optional[StrictBool] = None,
supports_raw_data: Optional[StrictBool] = None,
nqubits: Optional[StrictInt] = None,
status: Optional[BackendStatus] = None,
default_number_of_shots: Optional[StrictInt] = None,
Expand Down Expand Up @@ -365,6 +366,8 @@ async def read_backend_types_backend_types_get(
:type image_id: str
:param is_hardware:
:type is_hardware: bool
:param supports_raw_data:
:type supports_raw_data: bool
:param nqubits:
:type nqubits: int
:param status:
Expand Down Expand Up @@ -410,6 +413,7 @@ async def read_backend_types_backend_types_get(
description=description,
image_id=image_id,
is_hardware=is_hardware,
supports_raw_data=supports_raw_data,
nqubits=nqubits,
status=status,
default_number_of_shots=default_number_of_shots,
Expand Down Expand Up @@ -449,6 +453,7 @@ async def read_backend_types_backend_types_get_with_http_info(
description: Optional[StrictStr] = None,
image_id: Optional[StrictStr] = None,
is_hardware: Optional[StrictBool] = None,
supports_raw_data: Optional[StrictBool] = None,
nqubits: Optional[StrictInt] = None,
status: Optional[BackendStatus] = None,
default_number_of_shots: Optional[StrictInt] = None,
Expand Down Expand Up @@ -486,6 +491,8 @@ async def read_backend_types_backend_types_get_with_http_info(
:type image_id: str
:param is_hardware:
:type is_hardware: bool
:param supports_raw_data:
:type supports_raw_data: bool
:param nqubits:
:type nqubits: int
:param status:
Expand Down Expand Up @@ -531,6 +538,7 @@ async def read_backend_types_backend_types_get_with_http_info(
description=description,
image_id=image_id,
is_hardware=is_hardware,
supports_raw_data=supports_raw_data,
nqubits=nqubits,
status=status,
default_number_of_shots=default_number_of_shots,
Expand Down Expand Up @@ -570,6 +578,7 @@ async def read_backend_types_backend_types_get_without_preload_content(
description: Optional[StrictStr] = None,
image_id: Optional[StrictStr] = None,
is_hardware: Optional[StrictBool] = None,
supports_raw_data: Optional[StrictBool] = None,
nqubits: Optional[StrictInt] = None,
status: Optional[BackendStatus] = None,
default_number_of_shots: Optional[StrictInt] = None,
Expand Down Expand Up @@ -607,6 +616,8 @@ async def read_backend_types_backend_types_get_without_preload_content(
:type image_id: str
:param is_hardware:
:type is_hardware: bool
:param supports_raw_data:
:type supports_raw_data: bool
:param nqubits:
:type nqubits: int
:param status:
Expand Down Expand Up @@ -652,6 +663,7 @@ async def read_backend_types_backend_types_get_without_preload_content(
description=description,
image_id=image_id,
is_hardware=is_hardware,
supports_raw_data=supports_raw_data,
nqubits=nqubits,
status=status,
default_number_of_shots=default_number_of_shots,
Expand Down Expand Up @@ -686,6 +698,7 @@ def _read_backend_types_backend_types_get_serialize(
description,
image_id,
is_hardware,
supports_raw_data,
nqubits,
status,
default_number_of_shots,
Expand Down Expand Up @@ -739,6 +752,10 @@ def _read_backend_types_backend_types_get_serialize(

_query_params.append(('is_hardware', is_hardware))

if supports_raw_data is not None:

_query_params.append(('supports_raw_data', supports_raw_data))

if nqubits is not None:

_query_params.append(('nqubits', nqubits))
Expand Down
17 changes: 17 additions & 0 deletions compute_api_client/api/jobs_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -877,6 +877,7 @@ async def read_jobs_jobs_get(
finished_at: Optional[datetime] = None,
number_of_shots__isnull: Optional[StrictBool] = None,
number_of_shots: Optional[StrictInt] = None,
raw_data_enabled: Optional[StrictBool] = None,
sort_by: Annotated[Optional[StrictStr], Field(description="The field name to sort on. Prefix with '-' for descending order. E.g., '-created_on'.")] = None,
latest: Annotated[Optional[StrictBool], Field(description="If True gets the most recently created object.")] = None,
page: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="Page number")] = None,
Expand Down Expand Up @@ -922,6 +923,8 @@ async def read_jobs_jobs_get(
:type number_of_shots__isnull: bool
:param number_of_shots:
:type number_of_shots: int
:param raw_data_enabled:
:type raw_data_enabled: bool
:param sort_by: The field name to sort on. Prefix with '-' for descending order. E.g., '-created_on'.
:type sort_by: str
:param latest: If True gets the most recently created object.
Expand Down Expand Up @@ -965,6 +968,7 @@ async def read_jobs_jobs_get(
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,
Expand Down Expand Up @@ -1006,6 +1010,7 @@ async def read_jobs_jobs_get_with_http_info(
finished_at: Optional[datetime] = None,
number_of_shots__isnull: Optional[StrictBool] = None,
number_of_shots: Optional[StrictInt] = None,
raw_data_enabled: Optional[StrictBool] = None,
sort_by: Annotated[Optional[StrictStr], Field(description="The field name to sort on. Prefix with '-' for descending order. E.g., '-created_on'.")] = None,
latest: Annotated[Optional[StrictBool], Field(description="If True gets the most recently created object.")] = None,
page: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="Page number")] = None,
Expand Down Expand Up @@ -1051,6 +1056,8 @@ async def read_jobs_jobs_get_with_http_info(
:type number_of_shots__isnull: bool
:param number_of_shots:
:type number_of_shots: int
:param raw_data_enabled:
:type raw_data_enabled: bool
:param sort_by: The field name to sort on. Prefix with '-' for descending order. E.g., '-created_on'.
:type sort_by: str
:param latest: If True gets the most recently created object.
Expand Down Expand Up @@ -1094,6 +1101,7 @@ async def read_jobs_jobs_get_with_http_info(
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,
Expand Down Expand Up @@ -1135,6 +1143,7 @@ async def read_jobs_jobs_get_without_preload_content(
finished_at: Optional[datetime] = None,
number_of_shots__isnull: Optional[StrictBool] = None,
number_of_shots: Optional[StrictInt] = None,
raw_data_enabled: Optional[StrictBool] = None,
sort_by: Annotated[Optional[StrictStr], Field(description="The field name to sort on. Prefix with '-' for descending order. E.g., '-created_on'.")] = None,
latest: Annotated[Optional[StrictBool], Field(description="If True gets the most recently created object.")] = None,
page: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="Page number")] = None,
Expand Down Expand Up @@ -1180,6 +1189,8 @@ async def read_jobs_jobs_get_without_preload_content(
:type number_of_shots__isnull: bool
:param number_of_shots:
:type number_of_shots: int
:param raw_data_enabled:
:type raw_data_enabled: bool
:param sort_by: The field name to sort on. Prefix with '-' for descending order. E.g., '-created_on'.
:type sort_by: str
:param latest: If True gets the most recently created object.
Expand Down Expand Up @@ -1223,6 +1234,7 @@ async def read_jobs_jobs_get_without_preload_content(
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,
Expand Down Expand Up @@ -1259,6 +1271,7 @@ def _read_jobs_jobs_get_serialize(
finished_at,
number_of_shots__isnull,
number_of_shots,
raw_data_enabled,
sort_by,
latest,
page,
Expand Down Expand Up @@ -1359,6 +1372,10 @@ def _read_jobs_jobs_get_serialize(

_query_params.append(('number_of_shots', number_of_shots))

if raw_data_enabled is not None:

_query_params.append(('raw_data_enabled', raw_data_enabled))

if sort_by is not None:

_query_params.append(('sort_by', sort_by))
Expand Down
17 changes: 17 additions & 0 deletions compute_api_client/api/results_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -872,6 +872,7 @@ async def read_results_by_algorithm_id_results_algorithm_algorithm_id_get(
shots_done__isnull: Optional[StrictBool] = None,
shots_done: Optional[StrictInt] = None,
results__isnull: Optional[StrictBool] = None,
raw_data__isnull: Optional[StrictBool] = None,
sort_by: Annotated[Optional[StrictStr], Field(description="The field name to sort on. Prefix with '-' for descending order. E.g., '-created_on'.")] = None,
latest: Annotated[Optional[StrictBool], Field(description="If True gets the most recently created object.")] = None,
page: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="Page number")] = None,
Expand Down Expand Up @@ -915,6 +916,8 @@ async def read_results_by_algorithm_id_results_algorithm_algorithm_id_get(
:type shots_done: int
:param results__isnull:
:type results__isnull: bool
:param raw_data__isnull:
:type raw_data__isnull: bool
:param sort_by: The field name to sort on. Prefix with '-' for descending order. E.g., '-created_on'.
:type sort_by: str
:param latest: If True gets the most recently created object.
Expand Down Expand Up @@ -957,6 +960,7 @@ async def read_results_by_algorithm_id_results_algorithm_algorithm_id_get(
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,
Expand Down Expand Up @@ -998,6 +1002,7 @@ async def read_results_by_algorithm_id_results_algorithm_algorithm_id_get_with_h
shots_done__isnull: Optional[StrictBool] = None,
shots_done: Optional[StrictInt] = None,
results__isnull: Optional[StrictBool] = None,
raw_data__isnull: Optional[StrictBool] = None,
sort_by: Annotated[Optional[StrictStr], Field(description="The field name to sort on. Prefix with '-' for descending order. E.g., '-created_on'.")] = None,
latest: Annotated[Optional[StrictBool], Field(description="If True gets the most recently created object.")] = None,
page: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="Page number")] = None,
Expand Down Expand Up @@ -1041,6 +1046,8 @@ async def read_results_by_algorithm_id_results_algorithm_algorithm_id_get_with_h
:type shots_done: int
:param results__isnull:
:type results__isnull: bool
:param raw_data__isnull:
:type raw_data__isnull: bool
:param sort_by: The field name to sort on. Prefix with '-' for descending order. E.g., '-created_on'.
:type sort_by: str
:param latest: If True gets the most recently created object.
Expand Down Expand Up @@ -1083,6 +1090,7 @@ async def read_results_by_algorithm_id_results_algorithm_algorithm_id_get_with_h
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,
Expand Down Expand Up @@ -1124,6 +1132,7 @@ async def read_results_by_algorithm_id_results_algorithm_algorithm_id_get_withou
shots_done__isnull: Optional[StrictBool] = None,
shots_done: Optional[StrictInt] = None,
results__isnull: Optional[StrictBool] = None,
raw_data__isnull: Optional[StrictBool] = None,
sort_by: Annotated[Optional[StrictStr], Field(description="The field name to sort on. Prefix with '-' for descending order. E.g., '-created_on'.")] = None,
latest: Annotated[Optional[StrictBool], Field(description="If True gets the most recently created object.")] = None,
page: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="Page number")] = None,
Expand Down Expand Up @@ -1167,6 +1176,8 @@ async def read_results_by_algorithm_id_results_algorithm_algorithm_id_get_withou
:type shots_done: int
:param results__isnull:
:type results__isnull: bool
:param raw_data__isnull:
:type raw_data__isnull: bool
:param sort_by: The field name to sort on. Prefix with '-' for descending order. E.g., '-created_on'.
:type sort_by: str
:param latest: If True gets the most recently created object.
Expand Down Expand Up @@ -1209,6 +1220,7 @@ async def read_results_by_algorithm_id_results_algorithm_algorithm_id_get_withou
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,
Expand Down Expand Up @@ -1245,6 +1257,7 @@ def _read_results_by_algorithm_id_results_algorithm_algorithm_id_get_serialize(
shots_done__isnull,
shots_done,
results__isnull,
raw_data__isnull,
sort_by,
latest,
page,
Expand Down Expand Up @@ -1321,6 +1334,10 @@ def _read_results_by_algorithm_id_results_algorithm_algorithm_id_get_serialize(

_query_params.append(('results__isnull', results__isnull))

if raw_data__isnull is not None:

_query_params.append(('raw_data__isnull', raw_data__isnull))

if sort_by is not None:

_query_params.append(('sort_by', sort_by))
Expand Down
1 change: 1 addition & 0 deletions compute_api_client/docs/BackendType.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Name | Type | Description | Notes
**description** | **str** | |
**image_id** | **str** | |
**is_hardware** | **bool** | |
**supports_raw_data** | **bool** | |
**features** | **List[str]** | |
**default_compiler_config** | **object** | |
**gateset** | **List[str]** | |
Expand Down
6 changes: 4 additions & 2 deletions compute_api_client/docs/BackendTypesApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ Name | Type | Description | Notes
[[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)

# **read_backend_types_backend_types_get**
> PageBackendType read_backend_types_backend_types_get(id=id, name=name, infrastructure=infrastructure, description=description, image_id=image_id, is_hardware=is_hardware, nqubits=nqubits, status=status, default_number_of_shots=default_number_of_shots, max_number_of_shots=max_number_of_shots, sort_by=sort_by, latest=latest, page=page, size=size)
> PageBackendType read_backend_types_backend_types_get(id=id, name=name, infrastructure=infrastructure, description=description, image_id=image_id, is_hardware=is_hardware, supports_raw_data=supports_raw_data, nqubits=nqubits, status=status, default_number_of_shots=default_number_of_shots, max_number_of_shots=max_number_of_shots, sort_by=sort_by, latest=latest, page=page, size=size)
List backend types

Expand Down Expand Up @@ -119,6 +119,7 @@ async with compute_api_client.ApiClient(configuration) as api_client:
description = 'description_example' # str | (optional)
image_id = 'image_id_example' # str | (optional)
is_hardware = True # bool | (optional)
supports_raw_data = True # bool | (optional)
nqubits = 56 # int | (optional)
status = compute_api_client.BackendStatus() # BackendStatus | (optional)
default_number_of_shots = 56 # int | (optional)
Expand All @@ -130,7 +131,7 @@ async with compute_api_client.ApiClient(configuration) as api_client:

try:
# List backend types
api_response = await api_instance.read_backend_types_backend_types_get(id=id, name=name, infrastructure=infrastructure, description=description, image_id=image_id, is_hardware=is_hardware, nqubits=nqubits, status=status, default_number_of_shots=default_number_of_shots, max_number_of_shots=max_number_of_shots, sort_by=sort_by, latest=latest, page=page, size=size)
api_response = await api_instance.read_backend_types_backend_types_get(id=id, name=name, infrastructure=infrastructure, description=description, image_id=image_id, is_hardware=is_hardware, supports_raw_data=supports_raw_data, nqubits=nqubits, status=status, default_number_of_shots=default_number_of_shots, max_number_of_shots=max_number_of_shots, sort_by=sort_by, latest=latest, page=page, size=size)
print("The response of BackendTypesApi->read_backend_types_backend_types_get:\n")
pprint(api_response)
except Exception as e:
Expand All @@ -149,6 +150,7 @@ Name | Type | Description | Notes
**description** | **str**| | [optional]
**image_id** | **str**| | [optional]
**is_hardware** | **bool**| | [optional]
**supports_raw_data** | **bool**| | [optional]
**nqubits** | **int**| | [optional]
**status** | [**BackendStatus**](.md)| | [optional]
**default_number_of_shots** | **int**| | [optional]
Expand Down
1 change: 1 addition & 0 deletions compute_api_client/docs/Job.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ Name | Type | Description | Notes
**queued_at** | **datetime** | |
**finished_at** | **datetime** | |
**number_of_shots** | **int** | |
**raw_data_enabled** | **bool** | |

## Example

Expand Down
1 change: 1 addition & 0 deletions compute_api_client/docs/JobIn.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ Name | Type | Description | Notes
**file_id** | **int** | |
**batch_job_id** | **int** | |
**number_of_shots** | **int** | | [optional]
**raw_data_enabled** | **bool** | | [optional] [default to False]

## Example

Expand Down
Loading

0 comments on commit ab6bcc8

Please sign in to comment.