BosonSampling.clean_pdfFunction
clean_pdf(A::Array, atol=ATOL)

Checks wether an array is an acceptable discrete probability distribution with tolerance ATOL. If so, converts its elements to normalized positive real numbers.

source
BosonSampling.clean_probaFunction
clean_proba_(probability:Number, atol=ATOL)

Checks whether a (complex) number is close enough to a valid probability with tolerance ATOL. If so, convert it to a positive real number.

source
BosonSampling.tvdMethod
tvd(a,b)

Computes the total variation distance between two probability distributions.

source