qml.devices.capabilities.DeviceCapabilities¶
- class DeviceCapabilities(operations=<factory>, observables=<factory>, measurement_processes=<factory>, qjit_compatible=False, runtime_code_generation=False, dynamic_qubit_management=False, overlapping_observables=True, non_commuting_observables=False, initial_state_prep=False, supported_mcm_methods=<factory>)[source]¶
Bases:
object
Capabilities of a quantum device.
Attributes
Whether the device supports dynamic qubit allocation/deallocation.
Whether the device supports initial state preparation.
Whether the device supports measuring non-commuting observables on the same tape.
Whether the device supports measuring overlapping observables on the same tape.
Whether the device is compatible with qjit.
Whether the device requires run time generation of the quantum circuit.
Operations natively supported by the backend device.
Observables that the device can measure.
List of measurement processes supported by the backend device.
List of supported methods of mid-circuit measurements.
- dynamic_qubit_management = False¶
Whether the device supports dynamic qubit allocation/deallocation.
- initial_state_prep = False¶
Whether the device supports initial state preparation.
- non_commuting_observables = False¶
Whether the device supports measuring non-commuting observables on the same tape.
- overlapping_observables = True¶
Whether the device supports measuring overlapping observables on the same tape.
- qjit_compatible = False¶
Whether the device is compatible with qjit.
- runtime_code_generation = False¶
Whether the device requires run time generation of the quantum circuit.
- operations¶
Operations natively supported by the backend device.
- observables¶
Observables that the device can measure.
- measurement_processes¶
List of measurement processes supported by the backend device.
- supported_mcm_methods¶
List of supported methods of mid-circuit measurements.
Methods
filter
(finite_shots)Returns the device capabilities conditioned on the given program features.
from_toml_file
(file_path[, runtime_interface])Loads a DeviceCapabilities object from a TOML file.
supports_observable
(observable)Checks if the given observable is supported by name.
supports_operation
(operation)Checks if the given operation is supported by name.
- filter(finite_shots)[source]¶
Returns the device capabilities conditioned on the given program features.
- classmethod from_toml_file(file_path, runtime_interface='pennylane')[source]¶
Loads a DeviceCapabilities object from a TOML file.
- Parameters
file_path (str) – The path to the TOML file.
runtime_interface (str) – The runtime execution interface to get the capabilities for. Acceptable values are
"pennylane"
and"qjit"
. Use"pennylane"
for capabilities of the device’s implementation of Device.execute, and"qjit"
for capabilities of the runtime execution function used by a qjit-compiled workflow.