qiskit/releasenotes/notes/1.2/fix-bitarray-fromcounts-nob...

8 lines
322 B
YAML

---
fixes:
- |
Fixed a bug in :meth:`.BitArray.from_counts` and :meth:`.BitArray.from_samples`.
Previously these would raise an error if given data containing only zeros, and no
value for the optional argument ``num_bits``. Now they produce a :class:`.BitArray`
with :attr:`.BitArray.num_bits` set to 1.