-
Notifications
You must be signed in to change notification settings - Fork 31
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
virtualspace
conventions can be confusing
#103
Comments
EDIT: apparently, also creating an |
I think I started with virtualspace referring to the right virtualspace. However in hindsight, it is more natural to make this refer to the left virtualspace instead. If you write down a finite mps, then the first virtual space you encounter is the left one - but this would require rewriting quite a bit of code, with very little gain... |
If you also want the left and rightmost virtual spaces, there are N+1 bonds for N sites. In that case, I would rather enumerate the bonds from 0 to N than from 1 to N+1. Another factor is to have it consistent with how C is labeled? I assume it is also |
for C we have CL and CR, so that AL(n) - CR(n) = CL(n) - AR(n). They're just shifted copies of eachother, but maybe we should pick a convention and stick to one... |
Currently, the use of
virtualspace
across the package can be a bit confusing, and there are contradicting choices that have been made which further add to the confusion.The current state of affairs:
FiniteMPS
objects, the constructor can take in a vector of virtual spaces which is one shorter than the length of the physical spaces, with optional kwargs for a left and right starting space. Thus, thei
th element of the input vector corresponds to the virtual space to the right of sitei
.InfiniteMPS
objects, there is no trivial left and right starting space, thus the vector of virtual spaces is the same length as the vector fo physical spaces. In this case, thei
th element of the vector corresponds to the virtual space to the left of sitei
.left_virtualspace(state, i)
andright_virtualspace(state, i)
, which return the left (right) virtual space of the bond tensor to the right of sitei
.entanglement_spectrum
yields the singular values of the bond matrix to the right of the physical site.Clearly, there are some inconsistencies, as well as
left_virtualspace
andright_virtualspace
being a bit misleading.One solution might be to:
InfiniteMPS
to reflect that we most often refer to virtual spaces as being to the right of a physical site.virtualspace
, which asserts that left- and right- virtualspace to the right of a site, for given state, are equal and then returns this. This should only fail if the user updated a (finite?) MPS manually with a changed bond dimension, in which case the (unexported) internal methodsleft_virtualspace
andright_virtualspace
can be used as a more expert-user-case.The text was updated successfully, but these errors were encountered: