BitArray.get_counts()
fails given an empty classical register
#12062
Labels
BitArray.get_counts()
fails given an empty classical register
#12062
Environment
What is happening?
BitArray
is not fully tested with empty classical registers. For instance,get_counts()
fails during the reshape if the output has zero bits. It appears thatget_int_counts()
will have the same problem, too.How can we reproduce the issue?
results in
What should happen?
I expect a sensible result, such as
{"": 1024}
forget_counts()
or{0: 1024}
forget_int_counts()
.Any suggestions?
No response
The text was updated successfully, but these errors were encountered: