@@ -85,11 +85,6 @@ function make_bosonic(A::ITensor, Linds, Rinds)
8585 return permute (A, ordered_inds)
8686end
8787
88- function check_input (:: typeof (map_eigvals), f, A, Linds, Rinds)
89- all (x -> x isa Index, Linds) || error (" Left indices must be a collection of Index" )
90- all (x -> x isa Index, Rinds) || error (" Right indices must be a collection of Index" )
91- end
92-
9388function map_eigvals (f:: Function , A:: ITensor , Linds, Rinds; kws... )
9489 check_input (map_eigvals, f, A, Linds, Rinds)
9590
@@ -119,6 +114,11 @@ function map_eigvals(f::Function, A::ITensor, Linds, Rinds; kws...)
119114 return mapped_A
120115end
121116
117+ function check_input (:: typeof (map_eigvals), f, A, Linds, Rinds)
118+ all (x -> x isa Index, Linds) || error (" Left indices must be a collection of Index" )
119+ all (x -> x isa Index, Rinds) || error (" Right indices must be a collection of Index" )
120+ end
121+
122122# Analagous to `denseblocks`.
123123# Extract the diagonal entries into a diagonal tensor.
124124function diagblocks (D:: Tensor )
0 commit comments