Skip to content

Commit

Permalink
fix teleportation.py beamsplitter phase (to 0) (#674)
Browse files Browse the repository at this point in the history
* fix teleportation.py beamsplitter phase (to 0)

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.

* Update examples/teleportation.py

Co-authored-by: Theodor <theodor.isacsson@gmail.com>

* Update CHANGELOG.md

* Update .github/CHANGELOG.md

Co-authored-by: Theodor <theodor.isacsson@gmail.com>

Co-authored-by: Theodor <theodor.isacsson@gmail.com>
  • Loading branch information
jonschlipf and thisac committed Jan 19, 2022
1 parent d17e119 commit d01bbd1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion .github/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,17 @@
circuit layout. Without a layout, the gate parameters cannot be validated against the device
specification.
[(#661)](https://github.com/XanaduAI/strawberryfields/pull/661)

* The teleportation tutorial `examples/teleportation.py` now uses the correct value (now `phi = 0` instead of `phi = np.pi / 2`) for the phase shift of the beamsplitters.
[(#674)](https://github.com/XanaduAI/strawberryfields/pull/674)

<h3>Documentation</h3>

<h3>Contributors</h3>

This release contains contributions from (in alphabetical order):

Theodor Isacsson
Theodor Isacsson, Jon Schlipf

# Release 0.21.0 (current release)

Expand Down
2 changes: 1 addition & 1 deletion examples/teleportation.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
Squeezed(2) | q[2]

# apply gates
BS = BSgate(pi / 4, pi)
BS = BSgate(pi / 4, 0)
BS | (q[1], q[2])
BS | (q[0], q[1])

Expand Down

0 comments on commit d01bbd1

Please sign in to comment.