def get_distance_vector(self, logical_edges: Iterable[QidPair], swaps: Sequence[QidPair]):
        """Gets distances between physical qubits mapped to by given logical
        edges, after specified SWAPs are applied."""
        self.update_mapping(*swaps)
        distance_vector = np.array([self.distance(e) for e in logical_edges])
        self.update_mapping(*swaps)
        return distance_vector
Gets distances between physical qubits mapped to by given logical
        edges, after specified SWAPs are applied.
cirq-core/cirq/contrib/routing/greedy.py