Optimize memory footprint of OperationType
#12567
Labels
mod: circuit
Related to the core of the `QuantumCircuit` class or the circuit library
priority: high
Rust
This PR or issue is related to Rust code in the repository
Milestone
This type is exceptionally wide for something that we want to be almost entirely
StandardGate
(which could even beu8
sized). Realistically we're not going to get this below ausize
, but that should be achievable by pointer-indirecting thePyInstruction
etc variants, and storing the enum discriminant in the 2 low bits of the pointer (if we expand the enum in the future and need more than 2 bits, we'll have to think about our 32-bit platform support).Originally posted by @jakelishman in #12459 (comment)
The text was updated successfully, but these errors were encountered: