Cloud Backends

class qiskit_aqt_provider._cloud.provider.CloudProvider[source]

An AQT cloud provider for use in the Qiskit AQT provider.

close() → None[source]

Closes the cloud provider, releasing any resources it holds.

fetch_workspaces() → WorkspaceCollection[source]

Fetches workspaces accessible to the user.

Returns:

A collection of workspaces accessible to the user.

Return type:

WorkspaceCollection

log_in() → None[source]

Logs the user into the cloud provider, establishing a session for subsequent API calls.

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:

CloudResource

Raises:

QiskitBackendNotFoundError – If no backend with the specified identifier is found.

property id: str

The workspace’s identifier.

list_backends() → list[WorkspaceResource][source]

Lists the backends available in this workspace.

Returns:

The list of backends available in this workspace.

Return type:

list[WorkspaceResource]

class qiskit_aqt_provider._cloud.resource.CloudResource[source]

A resource in the AQT cloud, associated with a specific workspace.

property id: str

The resource’s identifier.

property max_circuits: int

Maximum number of circuits per batch.

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 Job object that runs circuits.

Parameters:
  • circuits (QuantumCircuit or list[QuantumCircuit]) – An individual or a list of QuantumCircuit objects 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:

qiskit_aqt_provider._cloud.job.CloudJob

property target: Target

The resource’s target.

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:
Returns:

The combined result of all circuit evaluations.

status() → JobStatus[source]

Return the status of the job, among the values of JobStatus.

Raises:
Returns:

The current status of the job.

Return type:

qiskit.providers.JobStatus

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:

str

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:

bool

oidc_config

configuration for the OIDC provider.

Type:

AuthenticationConfig

__init__(app_dir=PosixPath('/home/runner/.aqt')) → None[source]

Initializes the configuration.

Parameters:

app_dir (Path) – the directory where the application will store its config and cache files. Defaults to Path.home() / .aqt.