- 
                Notifications
    You must be signed in to change notification settings 
- Fork 61
adds stable BS implementation and tests #405
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
| Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@            Coverage Diff            @@
##            master      #405   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           28        28           
  Lines         1922      1935   +13     
=========================================
+ Hits          1922      1935   +13     
 Continue to review full report in Codecov by Sentry. 
 🚀 New features to boost your workflow:
 | 
| You might aswell remove the old one, no? | 
| Do you want to keep the cutoff as an integer? the new implementation supports any shape. | 
| @nquesada regarding the cutoff argument, I preserved the old API and made it possible to pass the full shape. | 
Context:
The beamsplitter in the Fock representation suffers from numerical instabilities even for moderate cutoffs (~40)
Description of the Change:
This ports the stable BS implementation from MrMustard, which is just as fast as the unstable BS and offers numerical stability up to arbitrary cutoffs (or at least I ran out of memory before I could notice any).
Benefits:

BS can now be applied to high photon number inputs and outputs. It is as fast as the unstable implementation:
But stable:

Possible Drawbacks:
None
Related GitHub Issues:
None