-
Notifications
You must be signed in to change notification settings - Fork 25
Improve normalizations during simple update #234
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 Report✅ All modified and coverable lines are covered by tests.
🚀 New features to boost your workflow:
|
|
The gradient tests have been running out of time quite frequently in recent GitHub actions. We may need to further investigate it? |
|
While I can see that this is useful, I'm a bit hesitant to enforce this, mostly because it would prevent us from using this for finite temperature results since the norm is important there. Do you think we can just provide an easy way to manually ensure the norm doesn't run away between simple update steps? |
|
Do you mind informing me how finite-T calculations use the norm (and what kind of norm it is using)? Here I'm setting the maximal abs value in each vertex tensor and each bond weight to 1, which shouldn't affect any physical observables of the state. |
|
The problem is mostly that for computing the free energy, you need to know the norm, or at least the change in norm between two steps. For actual time evolution it is fair to discard this information because you want a normalized state at the end, but for finite temperature it has some meaning (it is the partition function value, connected to the free energy) |
|
How about I also return the number used to normalize the PEPS in each 2/3-site SU iteration? But to test it's done correctly, can you provide an example where free energy needs to be extracted? |
|
@sanderdemeyer Do you have suggestions on handling normalization for finite-T simple update? |
|
Sorry for being slightly slow to get back to you on this. I think the main issue is that the choice of |
Good idea. I'll flesh it out when I get some time. For imaginary time evolution, normalization is inevitable since the norm of |
|
Absolutely, you always have to renormalize but it is important to keep track of the norm in that case. I think typically, one computes Anything that achieves that is good for me :) |
|
I increasingly feel the difficulty in writing a
In the last two cases, in the future I think we'll use iPEPS with 2 physical legs (physical + ancilla; though I'm not sure how much improvement this can achieve), further differentiating them from the first two cases. In addition, if sometimes I return the norm, and sometimes I don't, I guess this cause "type instability"? So I want to:
Though there are some things that only need to be done once at the beginning, and are cumbersome to be moved into
@lkdvos @sanderdemeyer Do you have any design suggestions? (In full update #222 we have a similar situation.) |
|
We could define a struct that takes into account the differences. Then the user can set Another option would be to have subtypes of the struct |
|
Let me elaborate a bit on what we are doing in MPSKit, this might help us find a better interface (and also, it might be nice to simply use the same functions and interface?)
Importantly, this function does only that: it evolves the state according to the arguments it gets. This can then be used to build more evolved pipelines, either for imaginary or real time evolution purposes. Then, we have Note also that the algorithm struct Given this, I would argue to replace We may still build some default Something I have been playing around with as well is having a In summary, I think it is probably best to separate out the doing one step and full pipeline, and both should be exposed because people do really need both. Making |
|
That's very illuminating indeed! It's also kind of similar to what Olivier once suggested. But that may require a big overhaul of what we input to SU. One thing that's been in my mind for a while is to get rid of If we want to be more ambitious, After these changes to SU, the interface can be more easily ported to full update by just changing |
|
I think I agree with this indeed. I'd propose to do this in different steps though, and not all at the same time to make it a bit more comprehensive |
|
Sure. The BP things can be done later, and we can use |
|
To be continued in another PR. |
This is a minor improvement to properly normalize the tensors during simple update.
Previously, after absorbing the weights into the vertex tensors, the norm of the vertex tensors may become too small, causing issues for the following SVD truncation (the singular values can be too small as well).