XanaduAI / MrMustard

A differentiable bridge between phase space and Fock space
https://mrmustard.readthedocs.io/
Apache License 2.0
78 stars 27 forks source link

Take advantage of known techniques to speed up simulations of circuits with Attenuators #365

Open SamFerracin opened 8 months ago

SamFerracin commented 8 months ago

Before posting a feature request

Feature details

For the Attenuator/Amplifier channels in the Fock basis, the Kraus operators are analytically known and diagonal in the Fock basis. It would be nice if they were used when applying those channels to Fock basis states instead of the current default method of having to compute the Choi state for the channel and converting it to the Fock basis. It's in a similar spirit to how the displacement gate, squeezer, beamsplitter, etc. have custom Fock implementations for speed up/accuracy. It would fit very naturally with the new tensor contraction methods being implemented as well!

Implementation

No response

How important would you say this feature is?

2: Somewhat important. Needed this quarter.

Additional information

No response