mindquantum.algorithm.compiler.DAGNode

mindquantum.algorithm.compiler.DAGNode#

class mindquantum.algorithm.compiler.DAGNode#

Basic node in Directed Acyclic Graph.

A DAG node has local index, which label the index of leg of node, and child nodes and father nodes.

clean()#

Clean node and set it to empty.

insert_after(other_node: DAGNode)#

Insert other node after this dag node.

Parameters:

other_node (DAGNode) – other DAG node.

insert_before(other_node: DAGNode)#

Insert other node before this dag node.

Parameters:

other_node (DAGNode) – other DAG node.