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

Update S2gate convention to fit sf #130

Merged
merged 5 commits into from
Feb 24, 2020
Merged

Update S2gate convention to fit sf #130

merged 5 commits into from
Feb 24, 2020

Conversation

thisac
Copy link
Contributor

@thisac thisac commented Feb 24, 2020

Context:
The wrong convention was used to implement the two-mode squeezing gate (using a minus instead of a plus between the terms in the definition).

Description of the Change:
Changed the argument in the tanh-function for the two_mode_squeezing function in fock_gradients.py from -r to r (i.e. removing the -).

Benefits:
The Strawberry Fields tests now pass, due to the same conventions being used.

Possible Drawbacks:
None

Related GitHub Issues:

@thisac thisac self-assigned this Feb 24, 2020
@thisac thisac requested review from nquesada and josh146 February 24, 2020 15:11
Copy link
Collaborator

@nquesada nquesada left a comment

Choose a reason for hiding this comment

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

All good from my end. This will require to update the sf docs which did not coincide with the implementation of S2.

Copy link
Member

@josh146 josh146 left a comment

Choose a reason for hiding this comment

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

Looks good from my end!

@codecov
Copy link

codecov bot commented Feb 24, 2020

Codecov Report

Merging #130 into master will not change coverage by %.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master     #130   +/-   ##
=======================================
  Coverage   97.61%   97.61%           
=======================================
  Files          12       12           
  Lines         839      839           
=======================================
  Hits          819      819           
  Misses         20       20           

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 1e9d451...f807385. Read the comment docs.

@thisac thisac merged commit 4ad7a25 into master Feb 24, 2020
@nquesada nquesada deleted the update_S2gate_convention branch February 26, 2020 13:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants