XanaduAI / strawberryfields

Strawberry Fields is a full-stack Python library for designing, simulating, and optimizing continuous variable (CV) quantum optical circuits.
https://strawberryfields.ai
Apache License 2.0
737 stars 187 forks source link

fix teleportation.py beamsplitter phase (to 0) #674

Closed jonschlipf closed 2 years ago

jonschlipf commented 2 years ago

Context: The teleportation example fails to teleport the state. Setting the BS phase to 0 apparently fixes this for various numeric examples. The phase was 0 in the previous version of this example as well as the theory part of the html example in the docs.

Description of the Change: The beam splitter phase in the teleportation example was set to 0.

Benefits: The teleported state on q[2] can now be confirmed to have its probability distribution around the original state (via Wigner plots etc.).

Possible Drawbacks: None

Related GitHub Issues:

codecov[bot] commented 2 years ago

Codecov Report

Merging #674 (906707f) into master (d17e119) will not change coverage. The diff coverage is n/a.

@@           Coverage Diff           @@
##           master     #674   +/-   ##
=======================================
  Coverage   98.29%   98.29%           
=======================================
  Files          75       75           
  Lines        9036     9036           
=======================================
  Hits         8882     8882           
  Misses        154      154           

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update d17e119...906707f. Read the comment docs.

jonschlipf commented 2 years ago

Thank you @thisac ! I modified the changelog with a bullet item and my name in the contributor list.