Expand description
Pre-layout elimination of logical wire permutations.
A logical SWAP does not need to become a physical operation when layout is still free to choose where logical outputs reside. This transform removes eligible SWAP operations, redirects every later operation to the wire that carries the corresponding logical state, and returns an explicit output permutation for composition with routing metadata.
The direction of VirtualPermutation is part of the API contract:
original logical output -> rewritten circuit output wireIf routing later reports a layout from rewritten outputs to physical
qubits, VirtualPermutation::compose_final_layout produces the complete
original-output-to-physical mapping.
Structs§
- Virtual
Permutation - Output-wire permutation accumulated while logical SWAPs are removed.
- Virtual
Permutation Elision Result - Result of
elide_virtual_permutations.
Enums§
- Virtual
Permutation Elision Status - Coarse disposition of a virtual-permutation elimination attempt.
Functions§
- elide_
virtual_ permutations - Removes eligible top-level logical SWAPs and returns their output mapping.