-
Notifications
You must be signed in to change notification settings - Fork 22
Closed
Description
Given an ITensorNetwork formed from the inner product of two ITensorNetworks, trying to delete a vertex or contract a vertex onto another raises an error that the corresponding vertex doesn't exist.
Mininal Working Example:
using ITensors
using ITensorNetworks
dims = (2,2)
n = prod(dims)
g = named_grid(dims)
s = siteinds("S=1/2", g)
ψ_peps = ITensorNetwork(s, v -> "↑")
tn = inner(ψ_peps, sim(dag(ψ_peps), sites=[]))
display(tn[(2,1,2)])
tn = ITensors.contract(tn, (2, 1,2) => (1, 1,2))
Raises the following output:
The issue seems to track down to attempting to remove a vertex (using the overloaded rem_vertex! from the graphs julia package) from the inner product tensor network.
Another Minimal Working Example which raises an issue when trying to form an inner product from an ITensorNetwork which has a vertex deleted from it:
using ITensors
using ITensorNetworks
using MultiDimDictionaries
using NamedGraphs
using Graphs
dims = (2,2)
n = prod(dims)
g = named_grid(dims)
s = siteinds("S=1/2", g)
ψ_peps = ITensorNetwork(s, v -> "↑")
rem_vertex!(ψ_peps, (1,2))
display(ψ_peps)
tn = inner(ψ_peps, sim(dag(ψ_peps), sites=[]))
Raising the output:
Metadata
Metadata
Assignees
Labels
No labels