XanaduAI / thewalrus

A library for the calculation of hafnians, Hermite polynomials and Gaussian boson sampling.
https://the-walrus.readthedocs.io
Apache License 2.0
101 stars 55 forks source link

Adds function to bound the total variation distance when a finite cutoff is used. #210

Closed nquesada closed 3 years ago

nquesada commented 3 years ago

When simulating GBS a finite cutoff per-mode is needed, this will imply that one will sample from a slightly distorted distribution, which differs from the platonic GBS distribution. The function tvd_cutoff_bound is introduced following Exact simulation of Gaussian boson sampling in polynomial space and exponential time to bound the total variation distance between the ideal and finite-cutoff distributions.

codecov[bot] commented 3 years ago

Codecov Report

Merging #210 into master will not change coverage. The diff coverage is 100.00%.

@@            Coverage Diff            @@
##            master      #210   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           21        21           
  Lines         1195      1205   +10     
=========================================
+ Hits          1195      1205   +10     
Impacted Files Coverage Δ
thewalrus/quantum/__init__.py 100.00% <ø> (ø)
thewalrus/quantum/gaussian_checks.py 100.00% <ø> (ø)
thewalrus/quantum/fock_tensors.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update bf89a89...94ba02d. Read the comment docs.