XanaduAI / thewalrus

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

Recursive calculation of threshold probabilitites #272

Open nquesada opened 3 years ago

nquesada commented 3 years ago

It would be good to find a way to calculate recursively all the click probabilities of a Gaussian state.

ziofil commented 3 years ago

oh man I've been thinking about this about a year ago. The issue was that the diagonal elements are linear combos of off-diagonal ones, so in order to traverse the density matrix tensor on the diagonals we need off-diagonal values too.

maybe we can do it for pure states though by combining two recurrence relations (one for the amplitudes and one for the conjugate of the amplitudes)

nquesada commented 3 years ago

I think you are thinking about photon-number probabilities, I am mostly thinking about click probabilities.

ziofil commented 3 years ago

Oh I see, you want the vacuum marginals essentially... is there a way of computing a marginal by acting somehow on the generating function?

Oh wait it's a Gaussian state. It's trivial to compute marginals. uhm.... 🤨

jakeffbulmer commented 2 years ago

This is on my todo list (also including internal modes), but if any progress is being made in this direction, let me know!