Skip to content

Constructing a Tree Tensor Network Operator doesn't work on integer labelled vertices #51

Closed
ITensor/DataGraphs.jl
#15
@JoeyT1994

Description

@JoeyT1994

The following code:

using ITensors
using ITensorNetworks
using NamedGraphs
using Graphs

n =2
g = NamedGraph(path_graph(n))
s = siteinds("S=1/2", g)

ops = OpSum()
ops += 1.0, "Sz", 1, "Sz", 2

@show TTN(ops, s)

produces the error:

image

Which goes away if one names the vertices of g as tuples instead of Integers.

Is this unexpected? Or is TTN() only defined for IndexNetworks labelled with tuples?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions