Skip to content

Commit

Permalink
use TupleTools.sort
Browse files Browse the repository at this point in the history
  • Loading branch information
kmp5VT committed Dec 1, 2023
1 parent bc7c400 commit 3eadb7b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ function permutedims_combine(

# Now that the indices are permuted, compute
# which indices are now combined
combdims_perm = sort(_permute_combdims(combdims, perm))
combdims_perm = TupleTools.sort(_permute_combdims(combdims, perm))
comb_ind_loc = minimum(combdims_perm)

# Determine the new index before combining
Expand Down Expand Up @@ -117,7 +117,7 @@ function permutedims_combine_output(

# Now that the indices are permuted, compute
# which indices are now combined
combdims_perm = sort(_permute_combdims(combdims, perm))
combdims_perm = TupleTools.sort(_permute_combdims(combdims, perm))

# Permute the nonzero blocks (dimension-wise)
blocks = nzblocks(a_src)
Expand Down
1 change: 1 addition & 0 deletions src/ITensors.jl
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ using Random
using SerializedElementArrays
using StaticArrays
using TimerOutputs
using TupleTools
using Zeros

#####################################
Expand Down
4 changes: 2 additions & 2 deletions src/physics/fermions.jl
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,8 @@ end
# may be a tuple of QNIndex, so convert to a Vector{Index}
indsR = collect(input_indsR)

nlabelsT1 = NDTensors.sort(labelsT1; rev=true)
nlabelsT2 = NDTensors.sort(labelsT2)
nlabelsT1 = TupleTools.sort(labelsT1; rev=true)
nlabelsT2 = TupleTools.sort(labelsT2)

# Make orig_labelsR from the order of
# indices that would result by just
Expand Down

0 comments on commit 3eadb7b

Please sign in to comment.