-
Notifications
You must be signed in to change notification settings - Fork 383
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
Block invariant symmetry shift (DF+LRPS) functionality #901
base: master
Are you sure you want to change the base?
Conversation
Thanks for this contribution! I'll take a look ASAP |
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.
Please add tests and translate your documentation to an example notebook
@@ -0,0 +1,195 @@ | |||
# Code for implementing the DF + LRPS decomposition found in https://arxiv.org/abs/2409.18277 | |||
# | |||
# Notes: |
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 should be in a function somewhere or in some tutorial / testing.
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 comments on naming conventions. I thoroughly read your paper and I couldn't remember (out of the many abbreviations) what these were. Just say what they are in plain english.
shift = np.median(eps) | ||
return np.sum(np.abs(eps - shift)) | ||
|
||
def l1norm_lr_twobody_spatial(eps_params): |
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.
don't abbreviate low-rank with lr.
""" | ||
return np.sum(np.abs(np.linalg.eigh(obt)[0])) | ||
|
||
def l1norm_onebody_NSS_spatial(obt): |
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 is NSS
|
||
# second set of functions is for calculating the DF decomposition. | ||
|
||
def obtain_lowrank_decomposition(tbt): |
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.
hardcoded cutoffs. 1) can you use existing openfermion infrastructure 2) make cutoffs inputs or optional inputs
|
||
return h_list, eps_params, lambda_params, Us | ||
|
||
def obtain_fermionic_unitarized_obt_spatial(obt, tbt): |
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.
whats obt
?
|
||
# third set of functions is for calculating LRPS part of DF + LRPS decomposition | ||
|
||
def obtain_lrps_shifts(eps_params): |
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.
LRPS?
eps_lrps.append(eps_params[alpha] - cur_shift) | ||
return shifts, eps_lrps | ||
|
||
def obtain_lrps_fermionic_unitarized_obt_spatial(obt, eps_params, Us, shifts, eps_lrps, Ne): |
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.
lrps? But now correctly lower cased
Added functions to implement the DF + LRPS method of https://arxiv.org/abs/2409.18277, along with functions to calculate the associated LCU 1-norm.