Skip to content

Commit

Permalink
Check inconsistent dimensions by default in TensorNetwork constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
jofrevalles committed Nov 11, 2024
1 parent feccf8f commit 6d7247e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/TensorNetwork.jl
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ struct TensorNetwork <: AbstractTensorNetwork
dict
end

if check_index_sizes !== nothing && check_index_sizes !== false
if check_index_sizes === nothing && check_index_sizes == true
for ind in keys(indexmap) # Check for inconsistent index dimensions
dims = map(tensor -> size(tensor, ind), indexmap[ind])
length(unique(dims)) == 1 ||
Expand Down

0 comments on commit 6d7247e

Please sign in to comment.