-
Notifications
You must be signed in to change notification settings - Fork 12
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
Extend CTMRGEnv
constructor for nontrivial unit cells
#52
Conversation
Good that you noticed, thanks! I'd say that we could still tag it onto #15 since it is an important fix. I totally agree that we need more unit cell tests and constructors, but maybe we can add them later since that takes a bit of time. (Time that I probably don't have at the moment ;-)) |
Codecov ReportAttention: Patch coverage is
|
I would actually argue the opposite. In principle, the tests run, and the released version is not affected by this problem. So only the master is currently in a slightly broken state, which is not that big of a problem as no-one should use that version anyways. It's nice to have changes separated by commits, large PRs with multiple different changes are very hard to debug afterwards, and pinpointing where something went wrong is a bit of a nightmare when all we are left with is the big squashed commit... So maybe, let's ignore the issue for PR #15 , and just merge this afterwards. It would then be nice to have this PR include:
I would suggest to re-use the same structure as the CTMRG([f, T], peps::InfinitePEPS, chi_vertical::S, chi_horizontal::S=chi_vertical; unitcell::Tuple{Int,Int}=(1,1)) where S<:Union{Int,ElementarySpace}
CTMRG([f, T], D_horizontal::S, D_vertical::S, chi_vertical::S, chi_horizontal::S=chi_vertical; unitcell::Tuple{Int,Int}=(1,1)) where S<:Union{Int,ElementarySpace}
CTMRG([f, T], peps::InfinitePEPS, chis_vertical::A, chis_horizontal::A=chis_vertical) where {A<:AbstractMatrix{<:Union{Int,ElementarySpace}}}
CTMRG([f, T], Ds_horizontal::A, Ds_vertical::A, chis_vertical::A, chis_horizontal::A=chis_vertical) where {A<:AbstractMatrix{<:Union{Int,ElementarySpace}}} In an ideal world, it would be cool if we could also allow the peps bond dimensions to be different for the bra and the ket, which enables things like VOMPS -- approximating a peps by a different one with a different bonddimension, or some time-evolution algorithms as well. |
Okay, I think this ticks all the boxes now. Feels a bit clunky, but I don't immediately see how to make things more compact. So good to go from my end unless there are more comments. |
CTMRGEnv
constructorCTMRGEnv
constructor for nontrivial unit cells
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 quickly glanced over this, looks good to me. Maybe @pbrehmer want's to have another look, but otherwise we can merge this.
Co-authored-by: Lukas <[email protected]>
Looks lovely, I think it can be merged as it is! |
The
CTMRGEnv(peps::InfinitePEPS{P}; Venv=oneunit(spacetype(P))) where {P}
constructor was not adapted to the new unit cell convention. Noticed this right before #49 got merged, but was too late to stop the automerge.I added this as a separate PR since there anyway might be some more things related to unit cells we want to add. One thing that comes to mind is to extend this constructor to support non-uniform virtual environment spaces. Also, we should probably add a more extensive test that puts random duals as well as random dimensions on all virtual spaces (PEPS and environments) and checks that everything matches up everywhere.
Alternatively, I could quickly tag the fix onto #15 and then add the more general constructors and tests later, if that's better @lkdvos @pbrehmer ?