-
Notifications
You must be signed in to change notification settings - Fork 34
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
Manually defining MPOs #254
Comments
Thanks for opening an issue, I didn't realize people were using this to manually construct the MPO. I'm definitely not against having a better interface for this, so I'll gladly add this feature back. Your implementation definitely looks close to what I would do as well. If I may ask, my main question to you is mostly what should be supported, and what you would think of as a convenient interface. I'll gladly help with the implementation, but figuring out what is useful tends to be a hard problem 😬 Here are some thoughts: If you have access to the virtualspaces in advance, everything is somewhat easy: S = spacetype(t) # t is any of the operators
T = scalartype(t) # desired element type
A = MPSKit.jordanmpotensortype(spacetype(t), scalartype(t))(undef, V_left * P, P * V_right)
# fill tensors as wanted:
A[i, 1, 1, j] = O_ij Automatically determining the virtualspaces for a single tensor can also be supported, but the simple option can only do so in the case where there is at least 1 tensor in every row and every column, otherwise it needs to assume some default. (typically you don't want empty rows/columns, so that might not be a problem?) Automatically determining the virtualspaces for an entire MPO has slightly more information, and should be able to deduce more of the virtualspaces. If I recall correctly, the previous versions also supported having What should be a convenient interface for this? Do you want to enter a Alternatively, would it be sufficient to simply provide a function that automatically attempts to deduce spaces? Something like |
Thanks for getting back to me so quickly! Entering a Also, if a combination of row and column has no tensor, then I think you can safely assume that it is a singlet. Else the MPO would be creating zero using a non-trivial representation. |
I have an initial implementation that I think is working (linked PR). It would be really great if you could test it out and see if it doesn't break, and even better if you could provide some more trying examples that I could use as tests. |
I am interested in Hamiltonians that includes all-to-all interactions like
This can implemented as an MPO
As far as I can tell$H$ , so I want manually enter the $A_n$ .
FiniteMPOHamiltonian(lattice::AbstractArray{<:VectorSpace}, local_operators)
generates a very inefficient MPO forIn v0.12
MPOHamiltonian(x::AbstractArray{<:Any,3})
was removed which seems to make manual input much more involved. What is the recommended way of inputting the above example?My attempt at mimicking the behavior of
MPOHamiltonian(x::AbstractArray{<:Any,3})
:The text was updated successfully, but these errors were encountered: