Skip to content

Commit

Permalink
bugfix(prob) fix issue #78
Browse files Browse the repository at this point in the history
  • Loading branch information
bencrts committed Aug 23, 2023
1 parent cf36315 commit ce96585
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions estimator/prob.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,5 +124,8 @@ def amplify_sigma(target_advantage, sigma, q):
sigma = sum(sigma_**2 for sigma_ in sigma).sqrt()
except TypeError:
pass
if sigma > 16 * q:
return oo

advantage = float(exp(-float(pi) * (float(sigma / q) ** 2)))
return amplify(target_advantage, advantage, majority=True)

0 comments on commit ce96585

Please sign in to comment.