Discrete

class qdflow.util.distribution.Discrete(a, b=None)

Bases: Distribution[int]

A uniform discrete distribution, which returns a value between min (inclusive) and max (exclusive).

Parameters:
  • min (int) – The minimum value that can be drawn. Default 0.

  • max (int) – An upper bound (exclusive) to the values which can be drawn.

__init__(a, b=None)

Methods

draw(rng[, size])

Draws one or more samples from the distribution.