-
Notifications
You must be signed in to change notification settings - Fork 56
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
Adds find_classical_subsystem #193
Conversation
Something strange seems to be happening with the windows builds 🤔
|
thewalrus/quantum.py
Outdated
@@ -962,6 +964,30 @@ def is_classical_cov(cov, hbar=2, atol=1e-08): | |||
return False | |||
|
|||
|
|||
def find_classical_subsystem(cov, hbar=2, atol=1e-08): | |||
"""Find the largest integer `k` so that subsystem in modes `[0,1,...,k-1]` is a classical state. |
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.
What about if modes [2, 3, .., k]
is a classical subsystem (e.g., there is some offset?)
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.
In general one could consider finding a classical subsystem in a any subset of the modes. This is a a combinatorially large space and thus extremely difficult to search. This is why I just search for this particular order. If the user wants to search for [2,3,...,k] they can permute the modes...
Codecov Report
@@ Coverage Diff @@
## master #193 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 14 14
Lines 1062 1075 +13
=========================================
+ Hits 1062 1075 +13
Continue to review full report at Codecov.
|
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.
Thanks for the comments Josh
Co-authored-by: Josh Izaac <josh146@gmail.com>
Co-authored-by: Josh Izaac <josh146@gmail.com>
Co-authored-by: Josh Izaac <josh146@gmail.com>
Adds the function
find_classical_subsystem
which finds the largest integerk
so that subsystem in modes[0,1,...,k-1]
is a classical state.