Skip to content

Commit

Permalink
Fix CI, don't round hamming weight
Browse files Browse the repository at this point in the history
  • Loading branch information
ludopulles committed Sep 25, 2024
1 parent 66228de commit 2789101
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion estimator/lwe_parameters.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,8 @@ def switch_modulus(self):
LWEParameters(n=128, q=5289, Xs=D(σ=0.82), Xe=D(σ=3.08), m=+Infinity, tag=None)
"""
h = self.Xs.hamming_weight
# Note: hamming_weight rounds to an integer, which we do not want here.
h = len(self.Xs) * self.Xs._density

# h uniform in -(0.5,0.5) ± stddev(χ_s)
Xr_stddev = sqrt(h / 12) * self.Xs.stddev # rounding noise
Expand Down

0 comments on commit 2789101

Please sign in to comment.