def _initial_candidate_swaps(
        cls, mm: mapping_manager.MappingManager, two_qubit_ops: Sequence[QidIntPair]
    ) -> list[QidIntPair]:
        """Finds all feasible SWAPs between qubits involved in 2-qubit operations."""
        physical_qubits = (mm.logical_to_physical[lq[i]] for lq in two_qubit_ops for i in range(2))
        physical_swaps = mm.induced_subgraph_int.edges(nbunch=physical_qubits)
        return [
            (mm.physical_to_logical[q1], mm.physical_to_logical[q2]) for q1, q2 in physical_swaps
        ]
Finds all feasible SWAPs between qubits involved in 2-qubit operations.
cirq-core/cirq/transformers/routing/route_circuit_cqc.py