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

Leverage Rust InternContext for DAGCircuit internals #11721

Closed
mtreinish opened this issue Feb 5, 2024 · 1 comment
Closed

Leverage Rust InternContext for DAGCircuit internals #11721

mtreinish opened this issue Feb 5, 2024 · 1 comment
Assignees
Labels
mod: transpiler Issues and PRs related to Transpiler performance type: feature request New feature or request
Milestone

Comments

@mtreinish
Copy link
Member

What should we add?

The memory and speed advantages provided by #10827 and #11214 QuantumCircuit should be at least partially applicable to DAGCircuit as well. In general the CircuitInstruction class is more or less equivalent with the DAGOpNode class for the DAGCircuit. The big difference though is the container class is already in rust, via rustworkx, so there isn't anything analgous to CircuitData in the public interface to port for that.

We should be able to take advantage of the InternContext for the individual entries in the dagcircuit if we store the InternContext or some container object for dealing with the bit object caching in the DAGCircuit and use it for the bits stored in the dag nodes. There is also some potential for further dag circuit specific optimization like using the bit indices from the internal caching to generate the sort_key attribute of the dag nodes more efficiently.

@mtreinish
Copy link
Member Author

Now that #12550 has merged this is complete.

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 type: feature request New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants