-
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
Unable to construct a FiniteMPS
that has alternating virtual spaces without specifying all virtual spaces.
#93
Comments
see commit cad1d97 for my proposed solution. |
What happens if you make |
This gives the same result as my implementation. So technically you could already do it, though this way might be a little counterintuitive? |
I agree that being able to specify a vector of The simplicity of specifying a single space is of course attractive, and I think it works generally, but indeed, you need to think through the consequences and how to choose/construct it. |
You could also assume that the user defines the maximum dimension of the virtual Hilbert space. Something like this could be easily achieved by using the truncdim option in TensorKit.svd() . |
The problem being that you don't have anything to SVD yet if you create a random state. The singular values will be distributed randomly, and you might end up picking 1 spin 5 sector by accident, instead of an even distribution which is more likely what you want/expect. I would suggest to modify the current constructor which specifies all virtual spaces, to automatically use these as site-dependent maximal spaces. This way, we can also intercept accidental creation of states that are not full-rank, which are likely to lead to issues further down the line. |
# constructor with a single physical space, and a single virtual space.
FiniteMPS([f, elt], pspace::VectorSpace, maxvspace::ElementarySpace; length=N, kwargs...)
# constructor with variable physical spaces and variable virtual spaces
FiniteMPS([f, elt], pspaces::Vector{<:VectorSpace}, maxvspaces::Vector{<:ElementarySpace}; kwargs...) While it might be convenient to automatically infer all other combinations, it might also become quite a mess to keep this implemented nicely, and I would argue that the it is not that much more verbose to type |
Since it's a finiteMPS I'd just build the n-th virtual space as (physical space)^n or a trunctated version thereof. Perhaps something like : ```FiniteMPS([f, elt], pspaces::Vector{<:VectorSpace}, truncator; kwargs...)''' with truncator an algorithm that is passed to the QR/SVD used in the constructor ? Like this users can freely choose between the available truncation methods from TensorKit. |
But again, it really does not make sense to truncate a just-initialized state, no matter what truncated algorithm you are using? For example, I could ask for a state filled with zeros, in which case any truncation method fails anyways. If you really want to truncate an MPS, I think it makes more sense to construct it, and then just truncate the result. |
* changed constructors in finitemps.jl * Update docstring FiniteMPS * Formatter * Fix length vector --------- Co-authored-by: DaanMaertens <[email protected]>
A possible constructor for a
FiniteMPS
is to specify a (vector of) physical spaces and a singlemaxvirtspace
representing the maximum space one wants on the virtual level, according toIf one however wants the physical space
pspace=Rep[SU₂](1//2 => 1)
then this constructor will fail because it will try to find the infimum between a space containing integer reps of SU2 and another containing half-integers only. The virtual spaces of the mps should be alternating between integer and half-integer and this can currently only be done by using the constructor that requires all the virtual spaces.The text was updated successfully, but these errors were encountered: