qiskit/transpiler/passes/mapping/noise_adaptive_layout.py
def _select_next_edge(self):
        """
        If there is an edge with one endpoint mapped, return it.
        Else return in the first edge
        """
        for edge in self.pending_program_edges:
            q1_mapped = edge[0] in self.prog2hw
            q2_mapped = edge[1] in self.prog2hw
            assert not (q1_mapped and q2_mapped)
            if q1_mapped or q2_mapped:
                return edge
        return self.pending_program_edges[0]
def _select_next_edge(self):
        for edge in self.pending_program_edges:
            q1_mapped = edge[0] in self.prog2hw
            q2_mapped = edge[1] in self.prog2hw
            assert not (q1_mapped and q2_mapped)
            if q1_mapped or q2_mapped:
                return edge
        return self.pending_program_edges[0]
def _select_next_edge ( self ) : for edge in self . pending_program_edges : q1_mapped = edge [ 0 ] in self . prog2hw q2_mapped = edge [ 1 ] in self . prog2hw assert not ( q1_mapped and q2_mapped ) if q1_mapped or q2_mapped : return edge return self . pending_program_edges [ 0 ]
If there is an edge with one endpoint mapped, return it.
        Else return in the first edge
If there is an edge with one endpoint mapped return it . Else return in the first edge