API documentation#

Backends for processing pytket circuits with AQT devices.

class pytket.extensions.aqt.AQTBackend(device_name: str = 'sim', access_token: str | None = None, label: str = '')#

Interface to an AQT device or simulator.

__init__(device_name: str = 'sim', access_token: str | None = None, label: str = '')#

Construct a new AQT backend.

Requires a valid API key/access token, this can either be provided as a parameter or set in config using pytket.extensions.aqt.set_aqt_config()

  • device_name (string) – device name (suffix of URL, e.g. “sim/noise-model-1”)

  • access_token (string) – AQT access token, default None

  • label (string) – label to apply to submitted jobs

classmethod available_devices(**kwargs: Any) List[BackendInfo]#

See pytket.backends.Backend.available_devices(). Supported kwargs: none.

circuit_status(handle: ResultHandle) CircuitStatus#

Return a CircuitStatus reporting the status of the circuit execution corresponding to the ResultHandle

default_compilation_pass(optimisation_level: int = 2) BasePass#

A suggested compilation pass that will will, if possible, produce an equivalent circuit suitable for running on this backend.

At a minimum it will ensure that compatible gates are used and that all two- qubit interactions are compatible with the backend’s qubit architecture. At higher optimisation levels, further optimisations may be applied.

This is a an abstract method which is implemented in the backend itself, and so is tailored to the backend’s requirements.


optimisation_level (int, optional) –

The level of optimisation to perform during compilation.

  • Level 0 does the minimum required to solves the device constraints, without any optimisation.

  • Level 1 additionally performs some light optimisations.

  • Level 2 (the default) adds more computationally intensive optimisations that should give the best results from execution.


Compilation pass guaranteeing required predicates.

Return type:


get_result(handle: ResultHandle, **kwargs: int | float | str | None) BackendResult#

See pytket.backends.Backend.get_result(). Supported kwargs: timeout, wait.

process_circuits(circuits: Sequence[Circuit], n_shots: None | int | Sequence[int | None] = None, valid_check: bool = True, **kwargs: int | float | str | None) List[ResultHandle]#

See pytket.backends.Backend.process_circuits().

Supported kwargs: - postprocess: apply end-of-circuit simplifications and classical

postprocessing to improve fidelity of results (bool, default False)

  • simplify_initial: apply the pytket SimplifyInitial pass to improve fidelity of results assuming all qubits initialized to zero (bool, default False)

rebase_pass() BasePass#

A single compilation pass that when run converts all gates in a Circuit to an OpType supported by the Backend (ignoring architecture constraints).


Compilation pass that converts gates to primitives supported by Backend.

Return type:


property backend_info: BackendInfo | None#

Retrieve all Backend properties in a BackendInfo object, including device architecture, supported gate set, gate errors and other hardware-specific information.


The BackendInfo describing this backend if it exists.

Return type:


property required_predicates: List[Predicate]#

The minimum set of predicates that a circuit must satisfy before it can be successfully run on this backend.


Required predicates.

Return type:


AQT config.

class pytket.extensions.aqt.backends.config.AQTConfig(access_token: str | None)#

Holds config parameters for pytket-aqt.

classmethod from_extension_dict(ext_dict: Dict[str, Any]) AQTConfig#

Abstract method to build PytketExtConfig from dictionary serialized form.

pytket.extensions.aqt.backends.config.set_aqt_config(access_token: str | None = None) None#

Set default value for AQT API token.