mindquantum.algorithm.compiler.DAGNode

View Source On Gitee
class mindquantum.algorithm.compiler.DAGNode[source]

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()[source]

Clean node and set it to empty.

insert_after(other_node: 'DAGNode')[source]

Insert other node after this dag node.

Parameters

other_node (DAGNode) – other DAG node.

insert_before(other_node: 'DAGNode')[source]

Insert other node before this dag node.

Parameters

other_node (DAGNode) – other DAG node.