Deprecate Bit.index and Bit.register#6069
Conversation
e53c608 to
06bf861
Compare
mtreinish
left a comment
There was a problem hiding this comment.
Overall LGTM 2 questions inline, the one thing I'm not clear on is whether we're just deprecating Qubit.index or this is also deprecating the registers pieces in the constructor. Looking at the code and the release notes it's only about the attributes/properties, but this updates the docstring for Clbit and Qubit to say deprecated.
There was a problem hiding this comment.
Are we deprecating the constructor or just the access?
There was a problem hiding this comment.
Good catch, this is left over from an earlier iteration. Right now just access, constructor will be done when we deprecate implicit register creation.
There was a problem hiding this comment.
I don't remember how we handled registerless bits in the layout, but won't this potentially miss a virtual bit if it's not in a register?
There was a problem hiding this comment.
| via the :meth:`~qiskit.circuit.Qubit.register` or :meth:`~qiskit.circuit.Qubit.index` | |
| via the :attr:`~qiskit.circuit.Qubit.register` or :attr:`~qiskit.circuit.Qubit.index` |
Only merge this if there are no other changes (to avoid ci churn), if not I can fix this in #6075
06bf861 to
afdffa3
Compare
mtreinish
left a comment
There was a problem hiding this comment.
LGTM, it'd be good to have some gate_map visualization tests without a register but that can come in a follow up (especially since those tests need to be refactored anyway)
081e077 to
d7ccc5a
Compare
d7ccc5a to
7b18bb7
Compare
…e-index-register-access
…e-index-register-access
Address deprecation warnings raised by Qiskit/qiskit#6069 .
Summary
Deprecate references from Bit objects to their containing Register.
Details and comments
on hold for #5519 .