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

Bosonic examples #549

Merged
merged 14 commits into from Mar 4, 2021
Merged

Bosonic examples #549

merged 14 commits into from Mar 4, 2021

Conversation

elib20
Copy link
Collaborator

@elib20 elib20 commented Mar 1, 2021

Context: The bosonic backend is a new backend for simulating states as a linear combination of Gaussian functions in phase space.

Description of the Change:

  • Adds the marginal method to the BaseBosonicState class. This can be used to calculate marginal distributions along a given quadrature.
  • Adds examples of calculations used the bosonic backend: homodyne sampling for GKP and cat states, measurement-based squeezing on vaccum, realistic phase gate applied to a GKP state
  • Updates the changelog to reflect the new backend.

Benefits:

Possible Drawbacks:

Related GitHub Issues:

@codecov
Copy link

codecov bot commented Mar 1, 2021

Codecov Report

Merging #549 (910f9c1) into master (1ff88e7) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master     #549   +/-   ##
=======================================
  Coverage   98.23%   98.23%           
=======================================
  Files          76       76           
  Lines        8384     8397   +13     
=======================================
+ Hits         8236     8249   +13     
  Misses        148      148           
Impacted Files Coverage Δ
strawberryfields/backends/states.py 99.83% <100.00%> (+<0.01%) ⬆️

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 1ff88e7...910f9c1. 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.

Great job with all of this! 🚀

Just had a few comments on the changelog, and some questions/comments on the examples. Are those meant to be advertised to the users as tutorials? In that case it would probably be nice to flesh them out a bit with more detailed comments and explanations. 🤔

.github/CHANGELOG.md Outdated Show resolved Hide resolved
.github/CHANGELOG.md Outdated Show resolved Hide resolved
.github/CHANGELOG.md Outdated Show resolved Hide resolved
.github/CHANGELOG.md Outdated Show resolved Hide resolved
.github/CHANGELOG.md Outdated Show resolved Hide resolved
examples/measurement_based_squeezing.py Outdated Show resolved Hide resolved
examples/gkp_phase_gate.py Outdated Show resolved Hide resolved
examples/gkp_phase_gate.py Outdated Show resolved Hide resolved
examples/gkp_phase_gate.py Outdated Show resolved Hide resolved
strawberryfields/backends/states.py Outdated Show resolved Hide resolved
@elib20
Copy link
Collaborator Author

elib20 commented Mar 2, 2021

Great job with all of this! 🚀

Just had a few comments on the changelog, and some questions/comments on the examples. Are those meant to be advertised to the users as tutorials? In that case it would probably be nice to flesh them out a bit with more detailed comments and explanations. 🤔

Sorry for the confusion created by the branch title! This is not the official tutorial (Nico is working on that). These are just examples that will be explained more in the tutorial, and I thought they would fit in well in the examples folder.

.github/CHANGELOG.md Outdated Show resolved Hide resolved
Co-authored-by: Theodor <theodor@xanadu.ai>
@elib20 elib20 changed the title Bosonic tutorial Bosonic examples Mar 2, 2021
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.

Awesome work 🎉 It's really huge seeing the changes listed in the changelog!

.github/CHANGELOG.md Outdated Show resolved Hide resolved
Co-Authored-By: Josh Izaac <josh@iza.ac>
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 addressing my comments @elib20! 💯

Just had a very small one on the changelog links, but otherwise it looks great.

.github/CHANGELOG.md Outdated Show resolved Hide resolved
.github/CHANGELOG.md Outdated Show resolved Hide resolved
examples/bosonic_tutorial_sampling.py Show resolved Hide resolved
@elib20 elib20 merged commit 9255982 into master Mar 4, 2021
@elib20 elib20 deleted the bosonic_tutorial branch March 4, 2021 18:11
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.

None yet

3 participants