qiskit icon indicating copy to clipboard operation
qiskit copied to clipboard

Oxidize CheckGateDirection

Open eliarbel opened this issue 6 months ago • 4 comments

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 as PySet 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 of two_qubits_op

Close #12256

eliarbel avatar Aug 26 '24 20:08 eliarbel