-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Description
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.