Qiskit / qiskit

Qiskit is an open-source SDK for working with quantum computers at the level of extended quantum circuits, operators, and primitives.
https://www.ibm.com/quantum/qiskit
Apache License 2.0
4.83k stars 2.29k forks source link

Fix `CircuitInstruction` legacy iterable typing #12630

Closed jakelishman closed 1 week ago

jakelishman commented 1 week ago

Summary

The legacy 3-tuple format of CircuitInstruction still exposes the object in the old tuple-like way of (Operation, list[Qubit], list[Clbit]), rather than the new-style attribute access using tuples for the qargs and cargs. This was inadvertantly changed when it moved to Rust.

Details and comments

Fix #12626.

No changelog because it's not in a release version of Qiskit.

qiskit-bot commented 1 week ago

One or more of the following people are relevant to this code:

jakelishman commented 1 week ago

I opened #12631 to track deprecation - I'm just throwing together a PR to do it now too.

coveralls commented 1 week ago

Pull Request Test Coverage Report for Build 9612612289

Details


Files with Coverage Reduction New Missed Lines %
crates/qasm2/src/lex.rs 2 92.37%
crates/qasm2/src/parse.rs 12 97.15%
<!-- Total: 14 -->
Totals Coverage Status
Change from base Build 9612593426: 0.002%
Covered Lines: 63511
Relevant Lines: 70775

💛 - Coveralls