iqm.error_reduction_tools.rem.rem_processors.should_apply_mitigation#
- iqm.error_reduction_tools.rem.rem_processors.should_apply_mitigation(counts, max_entropy=28.0, force_mitigation=False)#
Determine whether to apply mitigation based on distribution entropy.
- Parameters:
counts (dict[str, int]) – Dictionary mapping bitstrings to their measured counts.
max_entropy (float) – Maximum allowed Shannon entropy (in bits) of the counts distribution. Distributions with entropy above this threshold are considered too expensive to mitigate.
force_mitigation (bool) – If True, always apply mitigation regardless of entropy.
- Returns:
Whether we should mitigate, estimated entropy of
counts.- Return type: