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 fock gkps #553
Adding fock gkps #553
Conversation
Codecov Report
@@ Coverage Diff @@
## master #553 +/- ##
=======================================
Coverage 98.23% 98.24%
=======================================
Files 76 76
Lines 8397 8429 +32
=======================================
+ Hits 8249 8281 +32
Misses 148 148
Continue to review full report at Codecov.
|
@@ -383,7 +383,7 @@ def prepare_gaussian_state(self, r, V, modes): | |||
self.circuit.from_covmat(cov, modes) | |||
self.circuit.from_mean(means, modes) | |||
|
|||
def prepare_cat(self, alpha, phi, representation, cutoff, D): | |||
def prepare_cat(self, alpha, phi, representation, amplcutoff, D): |
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.
Note that in the original PR for the bosonic
backend we use cutoff
for the small real number used to decide whether to include a Gaussian in phase space. This is inconsistent with the use of cutoff
for the Fock space truncation thus I've renamed it in the bosonic
backend.
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.
Looking good! I have mostly minor formatting comments, and one more substantial question about normalization. Once the latter is resolved it's good to go from my end.
Co-authored-by: elib20 <53090166+elib20@users.noreply.github.com>
Co-authored-by: elib20 <53090166+elib20@users.noreply.github.com>
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.
Looks good to me! 💯 Some comments, none major. Just curious: none of the functions would be user-facing, correct? Just for how they appear in the docs.
|
||
|
||
@functools.lru_cache() | ||
def squaregkpState(theta, phi, epsilon, ampl_cutoff, cutoff): |
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.
def squaregkpState(theta, phi, epsilon, ampl_cutoff, cutoff): | |
def square_gkp_state(theta, phi, epsilon, ampl_cutoff, cutoff): |
Co-authored-by: antalszava <antalszava@gmail.com>
Co-authored-by: antalszava <antalszava@gmail.com>
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 minor suggestions. Looks good to me!
Co-authored-by: elib20 <53090166+elib20@users.noreply.github.com>
Adds preparation methods for the GKP states in the Fock backend