About generating samples of a GBS

Hello!

I am trying to simulate samples out of a GBS classically. I know the covariance matrix and the probability function of a given GBS. This looks like an experimental task but I came across a paper by Xanadu (https://arxiv.org/pdf/2009.11824.pdf) and I feel algorithm 1 of section 3 does that job. However, I do not see the algorithm implemented in any of Xanadu’s documentation. If you have implemented the algorithm, kindly let me know. Thank you!

Hi @MUSHKAN_SUREKA, I’m not sure if the implementation of the algorithm is the same, but I can see that the algorithm is for Gaussian Boson Threshold Sampling. We do have this on our The Walrus library. You can learn more about it here.

To generate threshold samples from a gaussian state specified by a quadrature covariance matrix you can use thewalrus.samples.generate_torontonian_sample() .

Please let me know if this is what you were looking for!