qml.transforms.CommutationDAGNode¶
- class CommutationDAGNode(op=None, wires=None, target_wires=None, control_wires=None, successors=None, predecessors=None, reachable=None, node_id=- 1)[source]¶
Bases:
object
Class to store information about a quantum operation in a node of the commutation DAG.
- Parameters
op (Operation) – PennyLane operation.
wires (Wires) – Wires on which the operation acts on.
node_id (int) – ID of the node in the DAG.
successors (array[int]) – List of the node’s successors in the DAG.
predecessors (array[int]) – List of the node’s predecessors in the DAG.
reachable (bool) – Attribute used to check reachability by pairwise commutation.
Attributes
The operation represented by the nodes.
The wires that the operation acts on.
The target wires of the operation.
The control wires of the operation.
The ID of the operation in the DAG.
List of the node's successors.
List of the node's predecessors.
Useful attribute to create the commutation DAG.
- node_id¶
The ID of the operation in the DAG.
- Type
int
- successors¶
List of the node’s successors.
- Type
list(int)
- predecessors¶
List of the node’s predecessors.
- Type
list(int)
- reachable¶
Useful attribute to create the commutation DAG.
- Type
bool