[ENHANCEMENT] Define LinearAlgebra.diag
and LinearAlgebra.diagind
for ITensors
#805
Labels
enhancement
New feature or request
Define overloads of
LinearAlgebra.diag
andLinearAlgebra.diagind
for ITensors to make it easier to work with diagonal entries (iterate, modify, etc.). A corner case will be figuring out how to handle the block sparse case in a good way (i.e. only iterating over the diagonals of nonzero diagonal blocks, if that is the desired behavior).Note that conversion to
Tensor
can help with manipulating diagonal entries:The text was updated successfully, but these errors were encountered: