Skip to content

BitLocation is no longer indexable #13996

@ihincks

Description

@ihincks

Environment

  • Qiskit version:

RC1

What is happening?

In <=1.4, BitLocation, being a namedtuple, is indexable. With no deprecation period, it is now not indexable.

How can we reproduce the issue?

You can reproduce by running this snippet on main

from qiskit import QuantumCircuit

circuit = QuantumCircuit(1)
circuit.find_bit(circuit.qubits[0])[0]

What should happen?

The snippet should not raise an IndexError.

Any suggestions?

Implement the getitem dunder.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions