Skip to content

ITensorNetworkFunction constructor does not have correct siteinds #34

@ryanlevy

Description

@ryanlevy

The following conversion will fail to contract properly

let
     L = 10
     g = named_grid((L, 1))
     s = continuous_siteinds(g; map_dimension=2)

     x0, y0 = 0.5, 0.75
     ψ = delta_p(s, [x0, y0], [1, 2])
     @assert evaluate(ψ, [x0, y0], [1, 2])  1
     # test random point
     @assert evaluate(ψ, [y0, x0], [1, 2])  0

     # convert to itensornetwork then back, passing s
     ψ2 = ITensorNetworkFunction(itensornetwork(ψ),s)
     @assert evaluate(ψ2, [x0, y0], [1, 2]) 1
     @assert evaluate(ψ2, [y0, x0], [1, 2])  0

     # **The problem!**
     ψ3 = ITensorNetworkFunction(itensornetwork(ψ))
     @assert evaluate(ψ3, [x0, y0], [1, 2])  1 # zero, error
     @assert evaluate(ψ3, [y0, x0], [1, 2])  0
end

I assume its from the siteinds, but haven't investigated further

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions