qp.templates.core.change_op_basis_subroutine_resource_rep¶
- change_op_basis_subroutine_resource_rep(compute, target, uncompute=None)[source]¶
Generate an abstract
ChangeOpBasisresource representation 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:
an abstract representation of
change_op_basis()involving a subroutine that can be used in specifying the resources of another operator, template or subroutine.- Return type:
pennylane.ops.ChangeOpBasis
Note
See
subroutine_resource_rep()for more information.