qiskit/dagcircuit/dagcircuit.py
def twoQ_gates(self):
        """Get list of 2-qubit gates. Ignore snapshot, barriers, and the like."""
        two_q_gates = []
        for node in self.gate_nodes():
            if len(node.qargs) == 2:
                two_q_gates.append(node)
        return two_q_gates
def twoQ_gates(self):
        two_q_gates = []
        for node in self.gate_nodes():
            if len(node.qargs) == 2:
                two_q_gates.append(node)
        return two_q_gates
def twoQ_gates ( self ) : two_q_gates = [ ] for node in self . gate_nodes ( ) : if len ( node . qargs ) == 2 : two_q_gates . append ( node ) return two_q_gates
Get list of 2-qubit gates. Ignore snapshot, barriers, and the like.
Get list of 2 - qubit gates . Ignore snapshot barriers and the like .