qml.templates.core.change_op_basis_subroutine_resource_rep

change_op_basis_subroutine_resource_rep(compute, target, uncompute=None)[source]

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

If any of compute, target, or uncompute are subroutines, they should be provided as partials, with any parameters bound in advance.

Parameters:
Returns:

a condensed representation of the change_op_basis() involving a subroutine that can be used in specifying the resources of another operator, template or subroutine.

Return type:

pennylane.decomposition.CompressedResourceOp

Note

See subroutine_resource_rep() for more information.