cirq.routed_circuit_with_mapping

Returns the same circuits with information about the permutation of qubits after each swap.

routed_circuit a routed circuit that potentially has inserted swaps tagged with a RoutingSwapTag.
initial_map the initial mapping from logical to physical qubits. If this is not specified then the identity mapping of the qubits in routed_circuit will be used as initial_map.

ValueError if a non-SWAP gate is tagged with a RoutingSwapTag.