-
Notifications
You must be signed in to change notification settings - Fork 27
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
add triples.py file in the physics #338
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #338 +/- ##
===========================================
+ Coverage 84.46% 84.88% +0.41%
===========================================
Files 66 67 +1
Lines 4900 5035 +135
===========================================
+ Hits 4139 4274 +135
Misses 761 761
Continue to review full report in Codecov by Sentry.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The math seems correct. Just a few typos and suggestions to improve the docs.
Also:
- If you don't add an rst file, you won't be able to see the docs
- Unit tests are missing (hence, coverage went down)
Co-authored-by: SamFerracin <samuele.ferracin@xanadu.ai>
…nto ABC_triples
…d the corresponding tests
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me now. Take a look and merge whenever you feel it's ready :)
Question:
- Are we missing some tests? Especially on those functions that do something non-trivial to the input parameters to change their lengths, or on those that do the math.block thing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nice 👍
For Q1 we will also need the Abc of the basis change kernels: up to you to add them to this PR or to open a separate one.
…nto ABC_triples
### New features * Added functions to generate the ``(A, b, c)`` triples for the Fock-Bargmann representation of several states and gates. [(#338)](#338) ### Breaking changes ### Improvements ### Bug fixes * Fixing a bug in `_transform_gaussian` in transformation.py that modifies the input state's cov and means. [(#349)](#349) * Fixing a bug in `general_dyne` in physics/gaussian.py that returns the wrong probability and outcomes with given projection. [(#349)](#349) ### Documentation ### Tests ### Contributors @SamFerracin @ziofil @sylviemonet --------- Co-authored-by: Sebastián Duque Mesa <675763+sduquemesa@users.noreply.github.com> Co-authored-by: JacobHast <jacobhastrup@gmail.com> Co-authored-by: elib20 <53090166+elib20@users.noreply.github.com> Co-authored-by: ziofil <ziofil@users.noreply.github.com> Co-authored-by: ziofil <miatto@gmail.com> Co-authored-by: Luke Helt <31250931+heltluke@users.noreply.github.com> Co-authored-by: zeyueN <48225584+zeyueN@users.noreply.github.com> Co-authored-by: Robbe De Prins <52749580+rdprins@users.noreply.github.com> Co-authored-by: Robbe De Prins (UGent-imec) <Robbe.DePrins@UGent.be> Co-authored-by: Yuan <16817699+sylviemonet@users.noreply.github.com> Co-authored-by: Ryk <47638463+ryk-wolf@users.noreply.github.com> Co-authored-by: Gabriele Gullì <120967042+ggulli@users.noreply.github.com> Co-authored-by: Yuan Yao <yuan.yao@xanadu-Yuan-YAO.local> Co-authored-by: Yuan Yao <yuan.yao@xanadu-infras-MacBook-Air.local> Co-authored-by: heltluke <luke.helt@gmail.com> Co-authored-by: Tanner Rogalsky <tanner@tannerrogalsky.com> Co-authored-by: Jan Provazník <101715194+jan-provaznik@users.noreply.github.com>
Context: Add a new file triples.py in the physics module to include all triples in Bargmann representations of the states and transformations.
This PR will set up the basic physics for Bargmann objects.
Description of the Change:
Benefits:
Possible Drawbacks:
Related GitHub Issues: