estimator.nd

estimator.nd#

Description

Classes

CenteredBinomial(eta[, n])

Sample a_1, …, a_η, b_1, …, b_η uniformly from {0, 1}, and return Σ(a_i - b_i).

DiscreteGaussian(stddev[, mean, n])

A discrete Gaussian distribution with standard deviation stddev per component.

NoiseDistribution(n, mean, stddev, bounds, ...)

All noise distributions are instances of this class.

SparseTernary(p[, m, n])

Distribution of vectors of length n with p entries of 1 and m entries of -1, rest 0.

TUniform(b[, n])

TUniform distribution ∈ ZZ [-2**b, 2**b], endpoints inclusive.

Uniform(a, b[, n])

Uniform distribution ∈ ZZ [a, b], endpoints inclusive.

Functions

DiscreteGaussianAlpha(alpha, q[, mean, n])

A discrete Gaussian distribution with standard deviation α⋅q/√(2π) per component.

SparseBinary(hw[, n])

Sparse binary noise distribution having hw coefficients equal to 1, and the rest zero.

UniformMod(q[, n])

Uniform mod q, with balanced representation, i.e. values in ZZ ∩ [-q/2, q/2).

sigmaf(stddev)

Standard deviation → Gaussian width parameter σ.

stddevf(sigma)

Gaussian width parameter σ → standard deviation.