Add support for SWAP specialization in Split2qUnitaries #13476
Labels
mod: transpiler
Issues and PRs related to Transpiler
Rust
This PR or issue is related to Rust code in the repository
type: feature request
New feature or request
What should we add?
In the split 2q unitaries transpiler pass right now we only look for identity equivalent unitaries where we return the two single qubit components from the two qubit weyl decomposition. But there is an extension to the pass where we can look at swap equivalent unitaries and simply swap the qubits the single qubit components execute on. There is a todo comment for this in the pass's code:
qiskit/crates/accelerate/src/split_2q_unitaries.rs
Lines 79 to 81 in 5f3f594
The trick here is if we do this we basically need to mirror the logic of elide permutations both by swapping the virtual qubits in the tracked permutation but also ensure that we swap the subsequent gates on those qubits.
The text was updated successfully, but these errors were encountered: