qiskit
qiskit copied to clipboard
Oxidize CheckGateDirection
Summary
This PR ports the CheckGateDirection
analysis pass to Rust.
Details and comments
This PR includes:
- Until we have a Rust version of
CouplingMap
, the Python code converts the given coupling map to a set of edge pairs and pass it asPySet
to the Rust code. - The pass relies on the
DAGCircuit.qubits
registry for mapping instruction qubit args to qubit indices when checking gate direction against either a coupling map edge set or a target. - An unrelated change in
dag_circuit.rs
: making a pure Rust-friendly version oftwo_qubits_op
Close #12256