qml.devices.ExecutionConfig

class ExecutionConfig(grad_on_execution=None, use_device_gradient=None, use_device_jacobian_product=None, gradient_method=None, gradient_keyword_arguments=None, device_options=None, interface=None, derivative_order=1)[source]

Bases: object

A class to configure the execution of a quantum circuit on a device.

See the Attributes section to learn more about the various configurable options.

derivative_order

The derivative order to compute while evaluating a gradient

device_options

Various options for the device executing a quantum circuit

grad_on_execution

Whether or not to compute the gradient at the same time as the execution.

gradient_keyword_arguments

Arguments used to control a gradient transform

gradient_method

The method used to compute the gradient of the quantum circuit being executed

interface

The machine learning framework to use

use_device_gradient

Whether or not to compute the gradient on the device.

use_device_jacobian_product

Whether or not to use the device provided vjp or jvp to compute gradients.

derivative_order: int = 1

The derivative order to compute while evaluating a gradient

device_options: Optional[dict] = None

Various options for the device executing a quantum circuit

grad_on_execution: Optional[bool] = None

Whether or not to compute the gradient at the same time as the execution.

If None, then the device or execution pipeline can decide which one is most efficient for the situation.

gradient_keyword_arguments: Optional[dict] = None

Arguments used to control a gradient transform

gradient_method: Optional[str] = None

The method used to compute the gradient of the quantum circuit being executed

interface: Optional[str] = None

The machine learning framework to use

use_device_gradient: Optional[bool] = None

Whether or not to compute the gradient on the device.

None indicates to use the device if possible, but to fall back to pennylane behavior if it isn’t.

True indicates a request to either use the device gradient or fail.

use_device_jacobian_product: Optional[bool] = None

Whether or not to use the device provided vjp or jvp to compute gradients.

None indicates to use the device if possible, but to fall back to the device Jacobian or PennyLane behaviour if it isn’t.

True indicates to either use the device Jacobian products or fail.