DAGCircuit.ancestors

DAGCircuit.ancestors(node)[source]

Returns set of the ancestors of a node as DAGNodes.