Open aeddins-ibm opened 3 days ago
BitArray.from_bool_array() has a kwarg order which nominally should be 'little' or 'big' (for bit-ordering of the input array).
BitArray.from_bool_array()
order
'little'
'big'
The function only checks whether or not order == 'little': https://github.com/Qiskit/qiskit/blob/76af5b475b9b2a57f9eeabd3c0b793b037464630/qiskit/primitives/containers/bit_array.py#L207-L210
order == 'little'
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'.
order = 'litle'
see above
No response
Environment
What is happening?
BitArray.from_bool_array()
has a kwargorder
which nominally should be'little'
or'big'
(for bit-ordering of the input array).The function only checks whether or not
order == 'little'
: https://github.com/Qiskit/qiskit/blob/76af5b475b9b2a57f9eeabd3c0b793b037464630/qiskit/primitives/containers/bit_array.py#L207-L210Would 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 typoorder = 'litle'
.How can we reproduce the issue?
see above
What should happen?
see above
Any suggestions?
No response