Problem with distinguishability + losses for HOM

I am attempting to simulate HOM interference with imperfect sources and with a loss channel put on the output of the beam splitter using add() and LC(). I am finding that the distinguishability of the source is not taken into account if the loss channel is added, giving an output prb(|1,1>) = 0, even if the amount of loss is set to 0. By removing the loss channel, the output is prb(|1,1>) != 0 as expected.


source = pcvl.Source(indistinguishability = 0.9)

QPU = pcvl.Processor("SLOS", pcvl.BS(), source)
QPU.add(0, pcvl.LC(0))
QPU.with_input(pcvl.BasicState([1, 1]))


Hello @scwein ,

This bug is due to the fact that the presence of the loss channels make the Processor use a Stepper backend (which uses SLOS), which needs prob amplitudes. There is currently a bug on prob amplitudes that makes it ignore annotations (probs is still working though, so there is no bug if you don’t use LCs).

We are currently working on it, and it should be fixed in a future release.

Please keep us updated if you find other issues,