qml.templates.core

Warning

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

This module contains the abstractions for defining subroutines.

Subroutine(definition, *[, setup_inputs, ...])

The definition of a Subroutine, compatible both with program capture and backwards compatible with operators.

SubroutineOp(subroutine, bound_args, ...[, ...])

An operator constructed from a Subroutine together with its bound arguments.

AbstractArray(shape[, dtype])

An abstract representation of an array that contains the shape and dtype attributes necessary for resource calculations.

change_op_basis_subroutine_resource_rep(...)

Generate a CompressedResourceOp similar to change_op_basis_resource_rep() that is more specifically targeted for use with Subroutine instances.

adjoint_subroutine_resource_rep(subroutine, ...)

Generate a CompressedResourceOp similar to adjoint_resource_rep() that is more specifically targeted for use with Subroutine instances.

subroutine_resource_rep(subroutine, *args, ...)

Generate a CompressedResourceOp similar to resource_rep() that is more specifically targeted for use with Subroutine instances.