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.

op

The operation represented by the nodes.

wires

The wires that the operation acts on.

target_wires

The target wires of the operation.

control_wires

The control wires of the operation.

node_id

The ID of the operation in the DAG.

successors

List of the node's successors.

predecessors

List of the node's predecessors.

reachable

Useful attribute to create the commutation DAG.

op

The operation represented by the nodes.

Type

Operation

wires

The wires that the operation acts on.

Type

Wires

target_wires

The target wires of the operation.

Type

Wires

control_wires

The control wires of the operation.

Type

Wires

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