discrete_gaussian#

Module for discrete Gaussian sampling.

Functions#

sample_dgauss()

Returns a sample from a discrete Gaussian distribution.

sample_dgauss(sigma_squared, rng=None)#

Returns a sample from a discrete Gaussian distribution.

In particular, this returns a sample from discrete Gaussian

\(\mathcal{N}_{\mathbb{Z}}(sigma\_squared)\)

Parameters
Return type

int

Classes#

SupportsRandRange

Protocol class defining randrange.

class SupportsRandRange#

Bases: typing_extensions.Protocol

Protocol class defining randrange.

randrange(high)#

Returns an integer sampled uniformly from [0, high).

Parameters

high (int) –

Return type

int