qiskit_addon_sqd.counts.counts_to_arrays¶
- counts_to_arrays(counts)[source]¶
Convert a counts dictionary into a bitstring matrix and a probability array.
- Parameters:
counts (dict[str, float | int]) – The counts dictionary to convert
- Returns:
A 2D array representing the sampled bitstrings. Each row represents a bitstring, and each element is a
bool
representation of the bit’s valueA 1D array containing the probability with which each bitstring was sampled
- Return type:
A tuple containing