-
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
Adding a bunch of gates from the lab #520
base: develop
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #520 +/- ##
===========================================
+ Coverage 89.84% 90.11% +0.26%
===========================================
Files 93 101 +8
Lines 6098 6291 +193
===========================================
+ Hits 5479 5669 +190
- Misses 619 622 +3
... and 1 file with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
- The tests for mzgate are improved - a bugfix in interferometer
- adding tests for realinterfermeter - minor improvements (e.g., correcting comments) in other files
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.
Some initial comments. Thanks Arsalan!
) | ||
super().__init__(name="CXgate") | ||
self._add_parameter(make_parameter(s_trainable, s, "s", s_bounds)) | ||
symplectic = math.astensor( |
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.
Should you override the symplectic property?
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.
I guess so.. I will take a look at Ggate to see how it's done
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.
Actually no, I think it is characterized by other parameters (here it is just s
). So, I believe we don't want to have it as a property.
Hi, |
Co-authored-by: Filippo Miatto <[email protected]>
|
||
.. math:: | ||
|
||
C_Z = \exp(ig q_1 \otimes q_2 / \hbar). |
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.
is g the same as s? should we use the same letter if they are the same?
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.
Yes, they are the same thing. I will make this change
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.
great!
Context:
There are many interesting things implemented in the old lab which are still missing in lab_dev.
Description of the Change:
We add the following gates:
Pgate
: the quadratic phase gateCXgate
andCZgate
: the controlled-X and -Z gatesMZgate
: Mach-Zehnder gateInterferometer
andRealInterferometer
Also, we add the
BargmannEigenstate
which are simply unnormalized coherent states.Benefits:
More things to have ready!
Possible Drawbacks:
None.
Related GitHub Issues:
None.