Skip to content
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

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

Merged
merged 4 commits into from
Jan 19, 2022

Conversation

jonschlipf
Copy link
Contributor

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:

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.
@codecov
Copy link

codecov bot commented Jan 18, 2022

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.

Copy link
Contributor

@thisac thisac left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for finding this @jonschlipf! It is indeed correct and should be changed. Another option would be to negate the final Zgate; both work equally fine. 🙂

Don't forget to add an entry to the changelog as well as you name to the list of contributors.

examples/teleportation.py Outdated Show resolved Hide resolved
jonschlipf and others added 2 commits January 18, 2022 21:20
Co-authored-by: Theodor <theodor.isacsson@gmail.com>
@jonschlipf
Copy link
Contributor Author

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

Copy link
Contributor

@thisac thisac left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fantastic! Thank you very much. Just one last comment, and then it's ready to be merged.

.github/CHANGELOG.md Outdated Show resolved Hide resolved
Co-authored-by: Theodor <theodor.isacsson@gmail.com>
Copy link
Contributor

@thisac thisac left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution @jonschlipf!

@thisac thisac merged commit d01bbd1 into XanaduAI:master Jan 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants