BosonSampling.clean_pdf
— Functionclean_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.
BosonSampling.clean_proba
— Functionclean_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.
BosonSampling.get_power_law_log_log
— Methodget_power_law_log_log(x_data,y_data)
Gets a power law of type y = exp(c) * x^m from data that looks like a line in a loglog plot.
BosonSampling.isa_pdf
— Methodisa_pdf(pdf)
Asserts if pdf
is a valid probability distribution.
BosonSampling.isa_probability
— Functionisa_probability(p)
Asserts if p
is a valid probability.
BosonSampling.sqr
— Methodsqr(a,b)
Computes the euclidian distance between two probability distributions.
BosonSampling.tvd
— Methodtvd(a,b)
Computes the total variation distance between two probability distributions.