|View source on GitHub|
Replace every moment containing acquaintance gates (after
cirq.contrib.acquaintance.replace_acquaintance_with_swap_network( circuit: "cirq.Circuit", qubit_order: Sequence['cirq.Qid'], acquaintance_size: Optional[int] = 0, swap_gate: "cirq.Gate" = cirq.ops.SWAP ) -> bool
rectification) with a generalized swap network, with the partition given by the acquaintance gates in that moment (and singletons for the free qubits). Accounts for reversing effect of swap networks.
||The acquaintance strategy.|
||The qubits, in order, on which the replacing swap network gate acts on.|
||The acquaintance size of the new swap network gate.|
||The gate used to swap logical indices.|
Returns: Whether or not the overall effect of the inserted swap network gates is to reverse the order of the qubits, i.e. the parity of the number of swap network gates inserted.
||circuit is not an acquaintance strategy.|