-
Notifications
You must be signed in to change notification settings - Fork 45
Closed
Labels
documentationImprovements or additions to documentationImprovements or additions to documentationquestionFurther information is requestedFurther information is requested
Description
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:
- Creating
FiniteMPSobjects, 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, theith element of the input vector corresponds to the virtual space to the right of sitei. - Creating
InfiniteMPSobjects, 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, theith element of the vector corresponds to the virtual space to the left of sitei. - Querying the virtual space of an MPS object, we have
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_spectrumyields the singular values of the bond matrix to the right of the physical site.
Clearly, there are some inconsistencies, as well as left_virtualspace and right_virtualspace being a bit misleading.
One solution might be to:
- Update the constructor for the
InfiniteMPSto reflect that we most often refer to virtual spaces as being to the right of a physical site. - Introduce a new (exported) method
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_virtualspaceandright_virtualspacecan be used as a more expert-user-case. - Reflect everything clearly in the documentation and check if there are any more cases where this is relevant. In all cases, we adopt the convention that virtualspaces are defined to the right of a site index.
Jutho, Gertian and leburgel
Metadata
Metadata
Assignees
Labels
documentationImprovements or additions to documentationImprovements or additions to documentationquestionFurther information is requestedFurther information is requested