MrMustard
MrMustard copied to clipboard
Efficient calculation of probabilities
Before posting a feature request
- [x] I have searched exisisting GitHub issues to make sure the feature request does not already exist.
Feature details
The calculation of probabilities in lab_dev for states in the Fock representation appears relatively slow - at least it can be sped up by a factor 10 using a simple numpy code as shown in this example.
Implementation
No response
How important would you say this feature is?
2: Somewhat important. Needed this quarter.
Additional information
While the calculation of the probability of a single state is quite fast, I sometimes need to do it for >100,000 states, at which point this step becomes the numerical bottleneck, so it would be very useful to get this improved. I have not done the comparison for DM states, only Ket