Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Port EquivalenceLibrary to Rust #12278

Open
mtreinish opened this issue Apr 19, 2024 · 0 comments
Open

Port EquivalenceLibrary to Rust #12278

mtreinish opened this issue Apr 19, 2024 · 0 comments
Labels
mod: transpiler Issues and PRs related to Transpiler performance Rust This PR or issue is related to Rust code in the repository

Comments

@mtreinish
Copy link
Member

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.

@mtreinish mtreinish added performance Rust This PR or issue is related to Rust code in the repository mod: transpiler Issues and PRs related to Transpiler labels Apr 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
mod: transpiler Issues and PRs related to Transpiler performance Rust This PR or issue is related to Rust code in the repository
Projects
None yet
Development

No branches or pull requests

1 participant