# qiskit.result.QuasiDistribution.nearest_probability_distribution¶

QuasiDistribution.nearest_probability_distribution(return_distance=False)[source]

Takes a quasiprobability distribution and maps it to the closest probability distribution as defined by the L2-norm.

Parameters

return_distance (bool) -- Return the L2 distance between distributions.

Returns

Nearest probability distribution. float: Euclidean (L2) distance of distributions.

Return type

ProbDistribution

Notes

Method from Smolin et al., Phys. Rev. Lett. 108, 070502 (2012).