qml.interfaces

Warning

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

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

Modules

This subpackage defines functions for interfacing devices’ execution capabilities with different machine learning libraries.

Execution functions and utilities

execute(tapes, device, gradient_fn[, …])

Execute a batch of tapes on a device in an autodifferentiable-compatible manner.

cache_execute(fn, cache[, pass_kwargs, …])

Decorator that adds caching to a function that executes multiple tapes on a device.

set_shots(device, shots)

Context manager to temporarily change the shots of a device.

Supported interfaces

autograd

This module contains functions for adding the Autograd interface to a PennyLane Device class.

jax

This module contains functions for adding the JAX interface to a PennyLane Device class.

jax_jit

This module contains functions for adding the JAX interface to a PennyLane Device class.

tensorflow

This module contains functions for adding the TensorFlow interface to a PennyLane Device class.

tensorflow_autograph

This module contains functions for adding the TensorFlow Autograph interface to a PennyLane Device class.

torch

This module contains functions for adding the PyTorch interface to a PennyLane Device class.