qiskit_addon_sqd.counts.generate_counts_uniform

generate_counts_uniform(num_samples, num_bits, rand_seed=None)[source]

Generate a bitstring counts dictionary of samples drawn from the uniform distribution.

Parameters:
  • num_samples (int) – The number of samples to draw

  • num_bits (int) – The number of bits in the bitstrings

  • rand_seed (int | None) – A seed for controlling randomness

Returns:

A dictionary mapping bitstrings of length num_bits to the number of times they were sampled.

Raises:

ValueErrornum_samples and num_bits must be positive integers.

Return type:

dict[str, int]