Swap the vertex naming convention of `inner_network`
Opened this issue · 0 comments
mtfishman commented
Currently in inner_network
, bra vertices are given the name (v, 1)
and ket vertices are given the name (v, 2)
, for example:
julia> x = random_ttn(siteinds("S=1/2", path_graph(3)))
TreeTensorNetwork{Int64} with 3 vertices:
3-element Vector{Int64}:
1
2
3
and 2 edge(s):
1 => 2
2 => 3
with vertex data:
3-element Dictionaries.Dictionary{Int64, Any}
1 │ ((dim=2|id=808|"S=1/2,Site,n=1"),)
2 │ ((dim=2|id=193|"S=1/2,Site,n=2"),)
3 │ ((dim=2|id=123|"S=1/2,Site,n=3"),)
julia> inner_network(x, x)
ITensorNetwork{Tuple{Int64, Int64}} with 6 vertices:
6-element Vector{Tuple{Int64, Int64}}:
(1, 1)
(2, 1)
(3, 1)
(1, 2)
(2, 2)
(3, 2)
and 7 edge(s):
(1, 1) => (2, 1)
(1, 1) => (1, 2)
(2, 1) => (3, 1)
(2, 1) => (2, 2)
(3, 1) => (3, 2)
(1, 2) => (2, 2)
(2, 2) => (3, 2)
with vertex data:
6-element Dictionaries.Dictionary{Tuple{Int64, Int64}, Any}
(1, 1) │ ((dim=2|id=808|"S=1/2,Site,n=1"),)
(2, 1) │ ((dim=2|id=193|"S=1/2,Site,n=2"),)
(3, 1) │ ((dim=2|id=123|"S=1/2,Site,n=3"),)
(1, 2) │ ((dim=2|id=808|"S=1/2,Site,n=1"),)
(2, 2) │ ((dim=2|id=193|"S=1/2,Site,n=2"),)
(3, 2) │ ((dim=2|id=123|"S=1/2,Site,n=3"),)
I think it would be nicer if this convention was reversed.