-
Notifications
You must be signed in to change notification settings - Fork 192
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
Bug in mean photon number #467
Comments
Thanks for discovering and reporting this @trevor-vincent! I've determined that the source of this bug is the function This is a bug at a core part of the codebase, so is high priority to fix. Thankfully, the fix looks relatively simple, something along the lines of:
|
* fixing #467 plus test that would have caught it * new integ test * Apply suggestions from code review Co-authored-by: Josh Izaac <josh146@gmail.com> * Update CHANGELOG.md * Update CHANGELOG.md * Fix reduced dm (#471) * Fix reduced_dm * Add test * Update strawberryfields/backends/tfbackend/ops.py Co-authored-by: Josh Izaac <josh146@gmail.com> * Update changelog * Update test * Fix tf * Update changelog * Update tests/backend/test_tf_ops.py Co-authored-by: Nathan Killoran <co9olguy@users.noreply.github.com> * Remove fock testing * Update tests/backend/test_tf_ops.py Co-authored-by: Nathan Killoran <co9olguy@users.noreply.github.com> * Simplify test * Revert line Co-authored-by: Josh Izaac <josh146@gmail.com> Co-authored-by: Nathan Killoran <co9olguy@users.noreply.github.com> * linting Co-authored-by: Josh Izaac <josh146@gmail.com> Co-authored-by: Theodor <theodor@xanadu.ai>
Issue description
Here is a minimal example that reproduces the bug:
This produces the output:
The mean photon of mode 2 and 3 should be different from mode 1 because the squeezing parameters are different.
import strawberryfields as sf; sf.about()
)The text was updated successfully, but these errors were encountered: