# 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.

 control_wires The control wires of the operation. node_id The ID of the operation in the DAG. op The operation represented by the nodes. predecessors List of the node’s predecessors. reachable Useful attribute to create the commutation DAG. successors List of the node’s successors. target_wires The target wires of the operation. wires The wires that the operation acts on.
control_wires

The control wires of the operation.

Type

Wires

node_id

The ID of the operation in the DAG.

Type

int

op

The operation represented by the nodes.

Type

Operation

predecessors

List of the node’s predecessors.

Type

list(int)

reachable

Useful attribute to create the commutation DAG.

Type

bool

successors

List of the node’s successors.

Type

list(int)

target_wires

The target wires of the operation.

Type

Wires

wires

The wires that the operation acts on.

Type

Wires