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

Swap the vertex naming convention of inner_network #108

Open
mtfishman opened this issue Jul 30, 2023 · 0 comments
Open

Swap the vertex naming convention of inner_network #108

mtfishman opened this issue Jul 30, 2023 · 0 comments

Comments

@mtfishman
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant