Cloud Backends¶
- class qiskit_aqt_provider._cloud.provider.CloudProvider[source]¶
An AQT cloud provider for use in the Qiskit AQT provider.
- fetch_workspaces() WorkspaceCollection[source]¶
Fetches workspaces accessible to the user.
- Returns:
A collection of workspaces accessible to the user.
- Return type:
- class qiskit_aqt_provider._cloud.workspace_collection.WorkspaceCollection[source]¶
A collection of workspaces accessible to the user in the AQT cloud.
- get_by_id(workspace_id: str) WorkspaceProvider | None[source]¶
Gets a workspace provider from this collection by its identifier.
- Parameters:
workspace_id (str) – The identifier of the workspace to retrieve.
- Returns:
The workspace provider with the specified identifier, or None if no such workspace is found.
- Return type:
Union[WorkspaceProvider, None]
- class qiskit_aqt_provider._cloud.workspace_provider.WorkspaceProvider[source]¶
A provider for a workspace in the AQT cloud.
- get_backend(backend_id: str) CloudResource[source]¶
Gets a specific backend available in this workspace by its identifier.
- Parameters:
backend_id (str) – The identifier of the backend to retrieve.
- Returns:
The backend with the specified identifier.
- Return type:
- Raises:
QiskitBackendNotFoundError – If no backend with the specified identifier is found.
- class qiskit_aqt_provider._cloud.resource.CloudResource[source]¶
A resource in the AQT cloud, associated with a specific workspace.
- restore_job(job_id: str, *, store: JobStore | None = None, delete: bool = False) CloudJob[source]¶
Restore a persisted cloud job using this resource’s authenticated client.
- run(circuits: QuantumCircuit | list[QuantumCircuit], **kwargs: Unpack[ResourceRunOptions]) CloudJob[source]¶
Run on the backend.
This method returns a
Jobobject that runs circuits.- Parameters:
circuits (QuantumCircuit or list[QuantumCircuit]) – An individual or a list of
QuantumCircuitobjects to run on the backend.shots (int | None) – The number of shots to execute. If not provided, the default from the resource’s options will be used.
memory (bool) – Whether to include memory in the result. If not provided, defaults to False.
- Returns:
The job object for the run.
- Return type:
- class qiskit_aqt_provider._cloud.job.CloudJob[source]¶
A job representing the execution of one or more circuits on an AQT cloud resource.
- persist(*, store: JobStore | None = None) None[source]¶
Persist this submitted job for restoration in a later process.
- result(*, timeout: float | None = None, wait: float = 5) Result[source]¶
Blocks until the job finishes processing then returns the result.
If an error occurs, the remaining circuits are not executed and the whole job is marked as failed.
- Raises:
APIError – the operation failed on the target resource.
AQTJobInvalidStateError – if the job was cancelled.
AQTJobFailedError – if the job failed with an error.
qiskit.providers.exceptions.JobTimeoutError – If the job does not reach a final state before the specified timeout.
- Returns:
The combined result of all circuit evaluations.
- status() JobStatus[source]¶
Return the status of the job, among the values of
JobStatus.- Raises:
AQTCredentialsError – if the user is not authenticated and no access token is available.
AQTCredentialsError – If the provided token is invalid or expired.
AQTRequestError – If there is a network-related error during the request.
AQTValueError – If the job with the specified ID does not exist.
AQTValueError – If the provided job ID is not valid.
AQTApiError – If the Arnica API encounters an internal error.
AQTApiError – For any other unexpected errors.
- Returns:
The current status of the job.
- Return type:
- submit() None[source]¶
Do not call — submission is handled by the backend.
This job object represents an execution that has already been submitted via backend.run(). Calling submit() is invalid and always raises a RuntimeError.
- Raises:
RuntimeError – Job submission is performed by backend.run().
- class qiskit_aqt_provider.aqt_provider.ArnicaConfig[source]¶
Configuration for the SDK.
- arnica_url¶
the base URL of the Arnica API. Defaults to “https://arnica.aqt.eu/api”.
- Type:
- client_id¶
the ID to use for authentication with client credentials. Defaults to None.
- Type:
str | None
- client_secret¶
the secret to use for authentication with client credentials. Defaults to None.
- Type:
str | None
- store_access_token¶
when True, the access token will be persisted to disk. Defaults to True.
- Type:
- oidc_config¶
configuration for the OIDC provider.
- Type:
AuthenticationConfig