qml.templates.core.change_op_basis_subroutine_resource_rep¶
- change_op_basis_subroutine_resource_rep(compute, target, uncompute=None)[source]¶
Generate a
CompressedResourceOpsimilar tochange_op_basis_resource_rep()that is more specifically targeted for use withSubroutineinstances.If any of compute, target, or uncompute are subroutines, they should be provided as partials, with any parameters bound in advance.
- Parameters:
compute (Operator | pennylane.decomposition.resources.CompressedResourceOp | Subroutine) – the compute operator or subroutine.
target (Operator | pennylane.decomposition.resources.CompressedResourceOp | Subroutine) – the target operator or subroutine.
uncompute (Operator | pennylane.decomposition.resources.CompressedResourceOp | Subroutine | None) – the optional uncompute operator or subroutine.
- 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:
Note
See
subroutine_resource_rep()for more information.