-
Notifications
You must be signed in to change notification settings - Fork 22
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
Add site-dependent QNs numbers #47
Comments
My ultimate plan has always been to make the struct CelledVector{T,F} <: AbstractVector{T}
data::Vector{T}
translatecell::F
end
function my_translatecell_function(x::T, n)
# Function that translates an element of the unit cell by `n` cells
end
CelledVector(mps_tensors, my_translatecell_function) Then, you can define any function you want, which could include both translating the cell tags and shifting the QNs for the case you outline above. |
That seems to fit exactly what I had in mind. |
A prototype seems to be working. I have a very stupid problem to benchmark my code. I am getting an error of the type I do not see where the overload was done for the spins |
Looks like that error shows that you are using the site type julia> using ITensors
julia> s = siteind("Fermion")
(dim=2|id=199|"Fermion,Site")
julia> @show op("N", s);
op("N", s) = ITensor ord=2
Dim 1: (dim=2|id=199|"Fermion,Site")'
Dim 2: (dim=2|id=199|"Fermion,Site")
NDTensors.Dense{Float64, Vector{Float64}}
2×2
0.0 0.0
0.0 1.0 |
I was blind. Thanks for the fix, the generalized cellvectors are working. I will make a PR once the current one is synchronized, probably also including a generalized subspace expansion I needed for my computations. |
Amazing, thanks! |
A quick comment: some default functions for translatecells are not implemented apparently (a colleague was struggling) => probably a consequence of the name change. |
The final step I need for my FQHE code is to implement site-dependent QNs.
I managed to make it work with a little bit of dirty code on ITensors for finite DMRG, so it should be also workable.
Now, it would be logical to implement this at the level of the CelledVectors.
One possibility is to add a functional component to the structure (e.g. named QN_translation_operation) which would be called and applied on the QNs. To make the behavior transparent, I could make its default value "nothing", and add a few if lines in the code that only applies the function if it is assigned/not nothing.
What do you think of this solution?
A description of the implementation of the symmetry I need is given in the Supplemental Materials of https://journals.aps.org/prl/abstract/10.1103/PhysRevLett.110.236801.
Basically, if I note the shifted charge conservation C_n = q N_n - p (for site n at filling p/q), the local momentum operator is K_n = n C_n + s, where s is a constant shift that is fixed at the creation of the MPS. For a well chosen s, the transformation rules for all charge legs would be (c, k) -> (c, k + nsites(\psi) c) for all legs.
The text was updated successfully, but these errors were encountered: