-
Notifications
You must be signed in to change notification settings - Fork 25
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
Symplectic override on Ggate #495
base: develop
Are you sure you want to change the base?
Conversation
PR-Agent was enabled for this repository. To continue using it, please link your git user with your CodiumAI identity here. PR Reviewer Guide 🔍
|
PR-Agent was enabled for this repository. To continue using it, please link your git user with your CodiumAI identity here. PR Code Suggestions ✨Explore these optional code suggestions:
|
…GgateSymplectic
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #495 +/- ##
========================================
Coverage 89.73% 89.74%
========================================
Files 104 104
Lines 7621 7623 +2
========================================
+ Hits 6839 6841 +2
Misses 782 782
Continue to review full report in Codecov by Sentry.
|
…GgateSymplectic
User description
Context:
Ggate.symplectic
should probably be returning the symplectic matrix it's defined with rather than recomputing.Description of the Change: Overrride
symplectic
onGgate
to return the symplectic matrix stored in the param set.Benefits: Avoid having to recompute the symplectic matrix
PR Type
enhancement, tests
Description
Ggate
class by overriding thesymplectic
property to return the symplectic matrix stored in the parameter set, avoiding recomputation._add_parameter
for adding the symplectic parameter.symplectic
property returns the correct symplectic matrix.Changes walkthrough 📝
ggate.py
Override `symplectic` property to return stored matrix
mrmustard/lab_dev/transformations/ggate.py
symplectic
to return the stored symplectic matrix.parameter_set.add_parameter
with_add_parameter
.test_ggate.py
Add test for `symplectic` property in `Ggate`
tests/test_lab_dev/test_transformations/test_ggate.py
symplectic
returns the correct matrix.