estimator.nd.NoiseDistribution#

class estimator.nd.NoiseDistribution(stddev: float, mean: float = 0, n: Optional[int] = None, bounds: Optional[tuple] = None, density: float = 1.0, tag: str = '')[source]#

All noise distributions are instances of this class.

__call__(**kwargs)#

Call self as a function.

Methods

CenteredBinomial(eta[, n])

Sample a_1, …, a_η, b_1, …, b_η and return Σ(a_i - b_i).

DiscreteGaussian(stddev[, mean, n])

A discrete Gaussian distribution with standard deviation stddev per component.

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

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

SparseTernary(n, p[, m])

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

Uniform(a, b[, n])

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

UniformMod(q[, n])

Uniform mod q, with balanced representation.

__init__(stddev[, mean, n, bounds, density, tag])

get_hamming_weight([n])

support_size([n, fraction])

Compute the size of the support covering the probability given as fraction.

Attributes

bounds

density

gaussian_tail_bound

gaussian_tail_prob

is_Gaussian_like

is_bounded

is_sparse

We consider a distribution "sparse" if its density is < 1/2.

mean

n

tag

stddev