Julia implementation of the functions Torontonian and threshold detection probabilities (without displacement).
There are two implementations for the computation of the Torontonian function: the first one uses directly the definition, the second one uses the recursive algorithm introduced in arxiv:2109.04528.
The recursive algorithm provides a polynomial speedup of the computation (when the number of modes is increased), as demonstrated in the following pictures:
To run the tests write julia tor_tests.jl on a terminal.
If you find this work useful please cite the work in which it was implemented and tested
Javier Martínez-Cifuentes, K. M. Fonseca-Romero, Nicolás Quesada, "Classical models are a better explanation of the Jiuzhang 1.0 Gaussian Boson Sampler than its targeted squeezed light model."

