-
Notifications
You must be signed in to change notification settings - Fork 22
Fix 3-site SU dt
and reduce artificial C4v breaking
#219
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
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
🚀 New features to boost your workflow:
|
ad4945f
to
37ace4c
Compare
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 realize I left a bunch of slightly unrelated comments here, but it might be good to fix this while we're at it. Otherwise looks good to go for me!
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.
Update: I realized none of these comments are really relevant to the specific PR, so I'm okay with merging this as is and leaving the rest for follow-up PRs
I'll make some final clean up today, and we can merge afterwards. |
Additional comment: it seems @ogauthe still cannot get the results to agree so maybe we should hold off for a second |
I think I get |
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.
As an idea for a follow-up PR:
I think part of the confusion here is/was facilitated by the use of LocalOperator
, which represents a sum of local terms. In principle, before going to simple update, it would be nice to have an explicit (possibly configurable) exponentiate
or trotterize
call that takes in a LocalOperator
, and converts it to a new datastructure which holds the exponentiated gates. This is not really for performance, more as a generic organizational thing to really capture the difference, which would make it slightly more obvious that you cannot sum things the same way.
Otherwise, is there any way we can get a testcase that would be sensitive to these kinds of factors, to try and better detect if we have it right?
Co-authored-by: Lukas Devos <[email protected]>
Indeed we have discussed before that storing the Trotter gates as a LocalOperator is a little bit weird. But the only difference is that To check each evolution step actually corresponds |
I agree that they would be similar, except the product has an order: we are now explicitly imposing this order in the simple update code by taking first horizontal and then vertical edges, but in principle you could have different schemes, for example horizontal * vertical * diagonal * ..., which could be expressed by using a dictionary for the |
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.
Good to go for me if tests pass
@ogauthe Are you satisfied with fixes in this PR? |
So I just checked, the factor 2 is now correct and I get the same results for |
- Update `checksum` such that it generates a hex code based on the example file contents rather than the absolute file paths - Update the J1-J2 SU example to work better under the new 3-site SU improvements of #219 - Rerender all example scripts to generate a new `Cache.toml` --------- Co-authored-by: Lukas Devos <[email protected]>
This PR aims to solve issues of the 3-site simple update discovered in #215 (credit to @ogauthe).
su3site_iter
actually performs evolution over a period ofdt
. In particular, the exponentiation of the Hamiltonian is corrected. For each⅃
-shaped clusterthe involved Hamiltonian terms are$H = (H_{12} + H_{23}) / 2 + H_{13}$ (the 1/2 factor is due to repeated counting from
L
-shaped clusters). Previously I mistakably exponentiated each H-term first and add them up:But this is approximately
with a useless extra factor of 2 in the front, and it reduced the time step to$\epsilon / 2$ . Now I directly calculate $\exp({-\epsilon H})$ for each cluster.
rotl90
->rotr90
in each iteration. Now I dorotl90
four times. As a result now each NN bond is being updated 4 times in each iteration, so the exponentiation of the Hamiltonian is done withalg.dt / 4
.