MatrixCorrelated

class qdflow.util.distribution.MatrixCorrelated(matrix, distributions)

Bases: CorrelatedDistribution[T], Generic[T]

A CorrelatedDistribution which draws values from one or more distributions, then returns variables given by linear combinatons of those values.

Parameters:
  • matrix (ndarray) – An array with shape (num_variables, len(distributions)).

  • distributions (Sequence[Distribution[T]]) – The distributions to draw independent values from.

__init__(matrix, distributions)

Methods

draw(rng[, size])

Draws one or more samples from the distribution.