Skip to content

Conversation

elib20
Copy link
Collaborator

@elib20 elib20 commented Dec 17, 2021

Context: Currently, strawberryfields only supports square lattice GKP states. The simplest more general type of GKP states are rectangular lattice GKP states (instead of peak spacing by sqrt(pi) in q quadrature, it's sqrt(alpha*sqrt(pi)). This allows for, e.g. GKP sensor states.

Description of the Change: Adds the ability to initialize rectangular GKP states to the bosonic and fock backends.

Benefits: Wider class of states to simulate.

Possible Drawbacks:

Related GitHub Issues:

- Adds a parameter, alpha, to specify peak spacing of the GKP state
- Modifies both fock and bosonic backends
@elib20 elib20 changed the title Rect gkp Rectangular gkp Dec 17, 2021
@codecov
Copy link

codecov bot commented Dec 17, 2021

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.29%. Comparing base (7ee0dd4) to head (0d6c810).
⚠️ Report is 43 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #668   +/-   ##
=======================================
  Coverage   98.29%   98.29%           
=======================================
  Files          75       75           
  Lines        9029     9035    +6     
=======================================
+ Hits         8875     8881    +6     
  Misses        154      154           
Files with missing lines Coverage Δ
...trawberryfields/backends/bosonicbackend/backend.py 100.00% <100.00%> (ø)
strawberryfields/backends/fockbackend/backend.py 100.00% <100.00%> (ø)
strawberryfields/backends/fockbackend/circuit.py 98.41% <100.00%> (ø)
strawberryfields/backends/fockbackend/ops.py 95.26% <100.00%> (ø)
strawberryfields/ops.py 98.30% <100.00%> (ø)

Continue to review full report in Codecov by Sentry.

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@elib20 elib20 requested review from thisac and ilan-tz December 18, 2021 00:08
Copy link
Collaborator

@ilan-tz ilan-tz left a comment

Choose a reason for hiding this comment

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

Nicely done! Good thinking to add more flexibility in choice of GKP state for the user.

Co-Authored-By: ilan-tz <57886357+ilan-tz@users.noreply.github.com>
@elib20 elib20 requested a review from josh146 December 22, 2021 14:36
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.

3 participants