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

Known ITensorNetwork based Bugs #25

Open
JoeyT1994 opened this issue Apr 26, 2024 · 2 comments
Open

Known ITensorNetwork based Bugs #25

JoeyT1994 opened this issue Apr 26, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@JoeyT1994
Copy link
Owner

JoeyT1994 commented Apr 26, 2024

Couple of bugs that we know exist and stem from ITensorNetworks.jl

  1. If a ITensorNetwork function f maps to 0 for a given x (because its projection ends up with 0 tensors) then calling calculate_fx(f, x) will yield Nan because the BP contraction backend in ITensorNetworks.jl doesn't correctly handle 0 tensors. A small change to ITensorNetworks.jl should fix this. For now we have to do calculate_fx(f, x; alg = "exact") to deal with it.
  2. There seem to be some numerical issues with calling a TNO-TNS contraction with contract(O::ITensorNetwork, f::ITensorNetwork) when the bond dimension of the TNS f is 1. This is presumably stemming from something in the TTN code in ITensorNetworks.jl
@ryanlevy
Copy link
Collaborator

In v0.11.5 of ITensorNetworks, if all the vertices are integers, the alg="bp" fails

ERROR: LoadError: MethodError: induced_subgraph(::ITensorNetwork{Int64}, ::Vector{Int64}) is ambiguous.

Candidates:
  induced_subgraph(graph::DataGraphs.AbstractDataGraph, subvertices)
    @ DataGraphs ~/.julia/packages/DataGraphs/2Mi8t/src/abstractdatagraph.jl:385
  induced_subgraph(g::T, vlist::AbstractVector{U}) where {U<:Integer, T<:Graphs.AbstractGraph}
    @ Graphs ~/.julia/packages/Graphs/S7tMY/src/operators.jl:657

Possible fix, define
  induced_subgraph(::T, ::AbstractVector{U}) where {U<:Integer, T<:DataGraphs.AbstractDataGraph}

@mtfishman
Copy link
Collaborator

Could you make a PR to DataGraphs.jl fixing that issue? As a reference, this is how it is fixed in NamedGraphs.jl:
https://github.com/mtfishman/NamedGraphs.jl/blob/0feb5396d9aa0142cd4292f138ccf17d83f8339b/src/namedgraph.jl#L219-L238

@ryanlevy ryanlevy added the bug Something isn't working label May 10, 2024
@ryanlevy ryanlevy changed the title Known Bugs Known ITensorNetwork based Bugs Sep 3, 2024
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

3 participants