Skip to content

Leverage Rust InternContext for DAGCircuit internals #11721

@mtreinish

Description

@mtreinish

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.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions