qml.decomposition.DecompositionRule¶
- class DecompositionRule(func, resources=None, work_wires=None)[source]¶
Bases:
objectRepresents a decomposition rule for an operator.
Methods
compute_resources(*args, **kwargs)Computes the resources required to implement this decomposition rule.
is_applicable(*args, **kwargs)Checks whether this decomposition rule is applicable.
set_condition(condition)Sets the condition for this decomposition rule.
set_resources(resources)Sets the resources for this decomposition rule.
set_work_wire_spec(work_wires)Sets the work wire usage of this decomposition rule.
work_wire_spec(*args, **kwargs)Gets the work wire requirements of this decomposition rule
code/api/pennylane.decomposition.DecompositionRule
Download Python script
Download Notebook
View on GitHub