Slow simulation with Distinguishable Photons

Hello again,
After implementing the losses by myself, I managed to run the simulation mentioned in this post (Slow Simulation with losses) rather quickly with the “Naive” backend. (around ~30 sec for 8 photons in 16 modes on a Intel I7, 11th generation with 8 cores and 32GB of RAM.)

Now I tried to run the same circuit with distinguishable photons, so that my input state changes from

|1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0>

to

|{_:0},0,{_:2},0,{_:4},0,{_:6},0,{_:8},0,{_:10},0,{_:12},0,{_:14},0>

(output state is still the same)


This makes the simulation incredibly slow (estimated 50h on Intel I7, 11th generation with 8 cores and 32GB of RAM. )

Do you have any idea, why the distinguishable case is so computing intensive (the RAM seems not to be an issue)?
Or is there any trick to make this faster?

Thanks
Tobias

Hey Tobias!
We hear you on this one: it should not be so intensive in the completely distinguishable case. This is a priority for the next release, which will generally include more noisy simulation functionality.

If you’re interested, there is a pull request on the github which you can play around with in the mean time!

Cheers!

Hey,
thanks for the answer. Good to hear that you’re on it.
The PR is actually by myself, it reduces the computation time by several orders of magnitude (actually around the same time as the indistinguishable case)
Cheers
Tobias

1 Like