-
Notifications
You must be signed in to change notification settings - Fork 27
Allow bond-dependent truncation scheme in Simple Update #211
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
Allow bond-dependent truncation scheme in Simple Update #211
Conversation
Codecov ReportAttention: Patch coverage is
🚀 New features to boost your workflow:
|
|
Definitely cool! I had a vague idea somewhere in my mind to attempt this with a new truncationscheme that is fully site- or direction dependent, since this is also something that could be useful for ctmrg. There, we already have some preprocessing of the trscheme too, to allow for fixed space truncation, we might be able to leverage a similar system here? |
|
So you would want to generalize the current truncation scheme in CTMRG to be something like a (4,Nr,Nc) array (or whatever shape and type we end up with)? This might indeed be very interesting. In its most general form we could allow even for different truncation scheme subtypes for different sites and directions, although some combinations might run into issues? It would definitely be worthwhile to look at this. Just for some context, I added this because I want to look at a.o. stripe order in the Hubbard model, where I would want to use a different bond dimension for the direction along the stripe and orthogonal to it. Even though CTMRG can already handle this, a more general approach like this could indeed boost performance. |
|
Yeah, that’s more or less the idea I had in mind, to create some kind of wrapper truncation scheme to add the site-dependent information. |
|
For SU (or any time evolution algorithms that can be added later), we can make For the square lattice, the size is then Several convenient constructors can also be defined, to allow users to fill all entries with the same trscheme (this reduces to the old bond-independent truncation), or fill Then we need to define rotation/mirroring of this BTW, if you're willing to share more detail here: why do you want to manually control the truncation in the two directions? Using the same |
ad4945f to
37ace4c
Compare
|
Currently, we define the Simple Update struct without any reference to (the unit cell of) the PEPS. This would change if we make this truncation scheme to have the same dimensions as the PEPS, which would induce breaking changes. Maybe we can avoid this, but I haven't found a solution yet. I would be okay with introducing breaking changes, but what is your opinion on this? To give some more details than before: I am thinking about stripe order in the Hubbard model. In this case, it could make sense to have a larger bond dimension along the direction of the charge modulation, and a lower one along the uniform direction. |
|
This can definitely be done in a non-breaking way, looking at CTMRG for inspiration. The clue is to define access functions that give the truncation strategy at a given site, which by default return the strategy just like before, but can be overloaded to return a specific one. For example, you can see here that before each projection step we determine the truncation strategy based on some additional information that might be relevant:
As a side note, reiterating what @Yue-Zhengyuan said: while it is indeed reasonable to specify different dimensions for different sites/directions, a more fair truncation strategy is based on the truncation cutoff/error, which would automatically give you different dimensions. |
Simple update was changed accordingly, CTMRG not yet
lkdvos
left a comment
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 like the direction of this a lot, looks very versatile without having to alter a lot of code. I left a bunch of minor comments and questions that might be improvements or bring things more in line with the rest of the library in the meantime.
(Also, it might at this point make sense to add a using TensorKit: TruncationScheme somewhere instead of having to qualify that everywhere).
|
Thanks for the comments of you both. I've now taken care of them, like commented above. In As a small side remark: Since the internal function |
|
@Yue-Zhengyuan This is now included. This was a good idea, since there were two small bugs (also for non-square unit cells). I added a test that is very similar to the test where 2-site and 3-site SU are compared. The reason I made it a separate test is because I had to set |
|
Do you mind if I combine the tests of SiteDependentTruncation into one file? I prefer this instead of separating them into different files. |
|
Will you then duplicate the test on the Heisenberg model, where we'll have one like it was before, and another one in the |
|
Yes. I prefer to feed to AD a state with uniform bond dimension in the old Heisenberg test. Then I create another test file solely dedicated to the test of SiteDependentTruncation, which only needs a few steps of SU. |
|
The amount of iterations in the current test of |
Yue-Zhengyuan
left a comment
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.
Apart from a few minor changes below, this PR is good to go for me.
Co-authored-by: Yue Zhengyuan <yuezy1997@icloud.com>
lkdvos
left a comment
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.
Made some final clean-up changes I noticed, approved once tests pass.
Yue-Zhengyuan
left a comment
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 removed a test of SiteDependentTruncation with Hubbard SU, as it is essentially covered by test/timeevol/sitedep_truncation.jl.
This is a small PR that adds an anisotropic version of Simple Update, i.e. where we allow for different bond dimensions on the vertical and horizontal bonds. This amounts to changing the parameter in
_su_bondx!. I also added a constructor for when both truncation schemes should be the same. Maybe this is also a good moment to add a default version of Simple Update, which was still a TODO.