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, mcm_config=<factory>)[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.

mcm_config

Configuration options for handling mid-circuit measurements

derivative_order = 1

The derivative order to compute while evaluating a gradient

device_options = None

Various options for the device executing a quantum circuit

grad_on_execution = 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 = None

Arguments used to control a gradient transform

gradient_method = None

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

interface = None

The machine learning framework to use

use_device_gradient = 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 behaviour if it isn’t.

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

use_device_jacobian_product = 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.

mcm_config

Configuration options for handling mid-circuit measurements

Contents

Using PennyLane

Release news

Development

API

Internals