I noticed that the losses and emission_probability options for the Source class are not taken into account when using probs(). I think this was already working correctly in a previous version, but I cannot remember exactly.
losses and emission_probability are currently well simulated in Perceval. However, what you’d like to see (I guess) conflicts with the default value of the “min_detected_photons_filter”. By default, you only get output states with as many photons as in the expected input state (before losses and transmittance are taken into account). In this case, other output states, with a lower photon count, get discarded and the “physical performance” gets lower.
You can check the computed physical performance by calling print(qpu.probs()["physical_perf"])
But in the end, I think you’d like to get the whole distribution without filtering. In that case, you can modify your code like the following:
Thanks, this is exactly what I was missing. I remember now that I used to use .mode_post_selection(0) to accomplish this, but it was removed. I wasn’t aware it was replaced by this filter, and I just assumed that the new default would give all outcomes (it’s a bit weird that the default includes a filter).