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

Deprecate legacy iterable access to CircuitInstruction #12631

Closed
jakelishman opened this issue Jun 21, 2024 · 0 comments · Fixed by #12640
Closed

Deprecate legacy iterable access to CircuitInstruction #12631

jakelishman opened this issue Jun 21, 2024 · 0 comments · Fixed by #12640
Labels
mod: circuit Related to the core of the `QuantumCircuit` class or the circuit library Rust This PR or issue is related to Rust code in the repository
Milestone

Comments

@jakelishman
Copy link
Member

jakelishman commented Jun 21, 2024

Ever since the scalar type of QuantumCircuit.data changed from a 3-tuple of (Operation, list[Qubit], list[Clbit]) to the record-like CircuitInstruction in #8093, we've maintained the iterable interfaces as a legacy format that makes it appear tuple-like for the purposes of for inst, qargs, cargs in qc.data and such.

The new-style format has been around two years now and using the legacy format involves memory and runtime penalties (to allocate new lists rather than re-using the same interned tuples). We should deprecate the legacy interface pending removal in Qiskit 2.0 to push any remaining users onto the modern form.

@jakelishman jakelishman added Rust This PR or issue is related to Rust code in the repository mod: circuit Related to the core of the `QuantumCircuit` class or the circuit library labels Jun 21, 2024
@jakelishman jakelishman added this to the 1.2.0 milestone Jun 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
mod: circuit Related to the core of the `QuantumCircuit` class or the circuit library Rust This PR or issue is related to Rust code in the repository
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant