Skip to content
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

[BUG] hassameinds in deprecate_make_inds_match! gives false even when @show siteinds((A,x)) @show siteinds(ydag) give the same result #100

Open
VinceNeede opened this issue Nov 27, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@VinceNeede
Copy link

I'm performing inner(psi', A, psi) where psi is an MPS with a link between the first and last site, while A is an MPO where the first and the last are not linked. What happens is that A*psi deletes the bound between the first and the last site, so when performing the multiplication with psi' the links do not match, but the site inds (which should be the important ones) do. In particular:

hassameinds(siteinds, ydag, (A, x)) returns False
But
@show siteinds((A,x)) @show siteinds(ydag)
Shows
siteinds((A, x)) = Vector{Index{Int64}}[[(dim=3|id=207|"R54_qp,Site,n=1")'], [(dim=3|id=812|"R54_qp,Site,n=2")'], [(dim=3|id=57|"R54_qp,Site,n=3")'], [(dim=3|id=140|"R54_qp,Site,n=4")']]

siteinds(ydag) = Index{Int64}[(dim=3|id=207|"R54_qp,Site,n=1")', (dim=3|id=812|"R54_qp,Site,n=2")', (dim=3|id=57|"R54_qp,Site,n=3")', (dim=3|id=140|"R54_qp,Site,n=4")']
I tried to bypass this check by commenting the line:
ydag, A, x = deprecate_make_inds_match!(dot, ydag, A, x; make_inds_match)
in the function _log_or_not_dot, and it does not give any error

@VinceNeede VinceNeede added the bug Something isn't working label Nov 27, 2024
@mtfishman mtfishman transferred this issue from ITensor/ITensors.jl Nov 27, 2024
@mtfishman mtfishman changed the title [ITensors] [BUG] hassameinds in deprecate_make_inds_match! gives false even when @show siteinds((A,x)) @show siteinds(ydag) give the same result [BUG] hassameinds in deprecate_make_inds_match! gives false even when @show siteinds((A,x)) @show siteinds(ydag) give the same result Nov 27, 2024
@mtfishman
Copy link
Member

I've moved this issue to the ITensorMPS.jl repository since that is where the MPS/MPO code is being developed now. I think the short answer here is that it sounds like your MPS in the structure of an periodic MPS, and most functions don't handle that well right now.

ITensorNetworks.jl handles periodic MPS in a more elegant way but isn't really ready for general use. Probably right now it is best for you to write your own sets of functions like inner that extends the current code to periodic MPS (say called inner_periodic), or just use an open boundary condition MPS and snake the extra periodic bond through the MPS.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants