qiskit/dagcircuit/dagcircuit.py
def get_op_nodes(self, op=None, data=False):

        """Deprecated. Use op_nodes()."""
        warnings.warn('The method get_op_nodes() is being replaced by op_nodes().'
                      'Returning a list of node_ids/(node_id, data) tuples is '
                      'also deprecated, op_nodes() returns a list of DAGNodes ',
                      DeprecationWarning, 2)
        if data:
            warnings.warn('The parameter data is deprecated, op_nodes() returns DAGNodes'
                          ' which always contain the data',
                          DeprecationWarning, 2)
        nodes = []
        for node in self._multi_graph.nodes():
            if node.type == "op":
                if op is None or isinstance(node.op, op):
                    nodes.append((node._node_id, node.data_dict))
        if not data:
            nodes = [n[0] for n in nodes]
        return nodes
def get_op_nodes(self, op=None, data=False):

        """Deprecated. Use op_nodes()."""
        warnings.warn('The method get_op_nodes() is being replaced by op_nodes().'
                      'Returning a list of node_ids/(node_id, data) tuples is '
                      'also deprecated, op_nodes() returns a list of DAGNodes ',
                      DeprecationWarning, 2)
        if data:
            warnings.warn('The parameter data is deprecated, op_nodes() returns DAGNodes'
                          ' which always contain the data',
                          DeprecationWarning, 2)
        nodes = []
        for node in self._multi_graph.nodes():
            if node.type == "op":
                if op is None or isinstance(node.op, op):
                    nodes.append((node._node_id, node.data_dict))
        if not data:
            nodes = [n[0] for n in nodes]
        return nodes
def get_op_nodes ( self , op = None , data = False ) : warnings . warn ( 'The method get_op_nodes() is being replaced by op_nodes().' 'Returning a list of node_ids/(node_id, data) tuples is ' 'also deprecated, op_nodes() returns a list of DAGNodes ' , DeprecationWarning , 2 ) if data : warnings . warn ( 'The parameter data is deprecated, op_nodes() returns DAGNodes' ' which always contain the data' , DeprecationWarning , 2 ) nodes = [ ] for node in self . _multi_graph . nodes ( ) : if node . type == "op" : if op is None or isinstance ( node . op , op ) : nodes . append ( ( node . _node_id , node . data_dict ) ) if not data : nodes = [ n [ 0 ] for n in nodes ] return nodes
Deprecated. Use op_nodes().
Deprecated . Use op_nodes () .