qml.devices

Warning

Unless you are a PennyLane or plugin developer, you likely do not need to use these classes directly.

See the main plugins page for more details on available plugins.

Modules

This subpackage provides default devices for PennyLane, which do not need external plugins to be installed. The default devices provide basic built-in qubit and CV circuit simulators that can be used with PennyLane without the need for additional dependencies. They may also be used in the PennyLane test suite in order to verify and test quantum gradient computations.

default_qubit

The default.qubit device is PennyLane’s standard qubit-based device.

default_qubit_jax

This module contains a jax implementation of the DefaultQubit reference plugin.

default_qubit_torch

This module contains a PyTorch implementation of the DefaultQubit reference plugin.

default_qubit_tf

This module contains a TensorFlow implementation of the DefaultQubit reference plugin.

default_qubit_autograd

This module contains an autograd implementation of the DefaultQubit reference plugin.

default_gaussian

The default.gaussian device is a simulator for Gaussian continuous-variable quantum computations, and can be used as a template for writing PennyLane devices for new CV backends.

default_mixed

The default.mixed device is PennyLane’s standard qubit simulator for mixed-state computations.

default_qutrit

The default.qutrit device is PennyLane’s standard qutrit-based device.

tests

This subpackage provides integration tests for the devices with PennyLane’s core functionalities.

Next generation devices

pennylane.devices.experimental.Device in an experimental interface for the next generation of devices that will eventually replace pennylane.Device and pennylane.QubitDevice.

While the current interface pennylane.Device is imported top level, the new pennylane.devices.experimental.Device is accessible from the pennylane.devices.experimental submodule.

ExecutionConfig([grad_on_execution, …])

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

Device([shots])

A device driver that can control one or more backends.

DefaultQubit2([shots, seed, max_workers])

A PennyLane device written in Python and capable of backpropagation derivatives.