Skip to content

Rework heirarchy of CircuitInstruction and PackedInstruction #12622

@mtreinish

Description

@mtreinish

What should we add?

Since #10827 we had a two level hierarchy for instructions in a circuit. There was CircuitInstruction which was a python space representation and PackedInstruction which was a rust space representation with a compressed qubit representation. At that point in time this was fine because we never were accessing any data in the circuit via rust and we were only using rust to store a compressed form at rest. However, since #12459 merged this has gotten a bit more muddled because we have frequent use of circuit data via rust. This has led the original abstractions to not holding up as well because the packed instruction is not as compact as it could be and the we're using the python space representation from rust. We should add a new middle representation for a rust native "unpacked instruction".

Metadata

Metadata

Assignees

No one assigned

    Labels

    RustThis PR or issue is related to Rust code in the repositorymod: circuitRelated to the core of the `QuantumCircuit` class or the circuit librarypriority: hightype: feature requestNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions