You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
julia> i =Index(2)
(dim=2|id=241)
julia> is =IndexSet(i, i)
IndexSet{2} (dim=2|id=241) (dim=2|id=241)
julia>ENV["JULIA_DEBUG"] ="ITensors""ITensors"
julia> is =IndexSet(i, i)
IndexSet{2} (dim=2|id=241) (dim=2|id=241)
This could be done in the IndexSet constructor, with the Julia function allunique, i.e. just add @debug allunique(data) || error("Indices must all be unique in IndexSet")here.
The text was updated successfully, but these errors were encountered:
mtfishman
changed the title
Add a debug check that all Indices in an IndexSet are unique
[ITensors] Add a debug check that sets of Index are unique
Apr 29, 2024
Right now, this is allowed, even in debug mode:
This could be done in the IndexSet constructor, with the Julia function
allunique
, i.e. just add@debug allunique(data) || error("Indices must all be unique in IndexSet")
here.The text was updated successfully, but these errors were encountered: