-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Closed
Labels
bugSomething isn't workingSomething isn't workingmod: primitivesRelated to the Primitives moduleRelated to the Primitives module
Description
Environment
- Qiskit version: 1.1
What is happening?
BitArray.from_bool_array()
has a kwarg order
which nominally should be 'little'
or 'big'
(for bit-ordering of the input array).
The function only checks whether or not order == 'little'
:
qiskit/qiskit/primitives/containers/bit_array.py
Lines 207 to 210 in 76af5b4
if order == "little": | |
# np.unpackbits assumes "big" | |
array = array[..., ::-1] | |
Would be helpful to raise an error if order
is neither 'little'
nor 'big'
. Otherwise e.g. a user will unknowingly get the wrong result if they typo order = 'litle'
.
How can we reproduce the issue?
see above
What should happen?
see above
Any suggestions?
No response
jakelishman
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingmod: primitivesRelated to the Primitives moduleRelated to the Primitives module