fiqci.ems.utils

fiqci.ems.utils#

Utility functions

Functions

probabilities_to_counts(probabilities, shots)

Convert probabilities to counts.

probabilities_to_counts(probabilities, shots) → list[dict]#

Convert probabilities to counts.

Uses the largest-remainder method so the counts sum to exactly shots (for a normalised input). Truncating each outcome instead drops up to one count per outcome, which leaves the realised total below the requested shot count and so understates the N of any shot-error estimate taken from these counts.