Select one answer per question. Submit to see the explanation.
bits = BitArray.from_samples([1, 2, 1], num_bits=3) bits.get_counts()