-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Description
What should we add?
As part of our effort to migrate more of Qiskit's code into rust for better runtime performance and efficiency we need to look at migrating more functionality to Rust. As part of this we're looking at moving the implementation of more transpiler passes into Rust in #12208. The BasisTranslator
is one of the passes included in that epic (individually being tracked in #12246), and to enable the maximum efficiencies in that pass we will need to port the EquivalenceLibrary
to rust. Right now it's built using a rustworkx graph, and we'll want to move the internals one level down to a petgraph graph and leverage rustworkx-core.
In practice this is probably blocked on #12205, but an initial implementation can leverage python space for dealing with gates and circuits and this can be refactored after #12205 is implemented to use the rust objects directly.
The one thing to keep an eye out for here is that after #12205 we'll still need a mechanism for Python space users to add onto the equivalence library with custom gates. It likely will just need to reuse whatever mechanism we use for QuantumCircuit
but it's worth highlighting here too.