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

Remove type piracy #53

Open
ryanlevy opened this issue Nov 28, 2024 · 0 comments
Open

Remove type piracy #53

ryanlevy opened this issue Nov 28, 2024 · 0 comments

Comments

@ryanlevy
Copy link
Collaborator

in src/utils.jl we have some type piracy

function ITensors.inds(s::IndsNetwork, v)
return s[v]
end
function ITensors.inds(s::IndsNetwork, verts::Vector)
return reduce(vcat, [inds(s, v) for v in verts])
end
function ITensors.inds(s::IndsNetwork)
return inds(s, collect(vertices(s)))
end
function base(s::IndsNetwork)
indices = inds(s)
dims = dim.(indices)
@assert all(d -> d == first(dims), dims)
return first(dims)
end

We should probably remove these and also be more careful, thinking toward multiple base within the index maps

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