qiskit/dagcircuit/dagcircuit.py
def get_gate_nodes(self, data=False):
        """Deprecated. Use gate_nodes()."""
        warnings.warn('The method get_gate_nodes() is being replaced by gate_nodes().'
                      'Returning a list of node_ids/(node_id, data) tuples is also '
                      'deprecated, gate_nodes() returns a list of DAGNodes ',
                      DeprecationWarning, 2)
        if data:
            warnings.warn('The parameter data is deprecated, '
                          'get_gate_nodes() now returns DAGNodes '
                          'which always contain the data',
                          DeprecationWarning, 2)

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

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