using ITensors
i = Index(QN(0,2)=>2,QN(1,2)=>2; tags="i")
j = settags(i,"j")
A = emptyITensor(i,j,dag(i'))
A[1,1,1] = 1.0
C = combiner(i, j; tags="c")
AC = A * C
Ap = AC * dag(C)
@show A
@show Ap
We could check for zero blocks here and drop them. However, checking every block for zeros may not be a cost we want to impose every time an uncombiner is used.
Since it is inconvenient to pass tolerances to contract, we could be very strict with the tolerance there, and then provide a dropzeros[!] function for NDTensors and ITensors.
Uncombining can "generate" nonzero blocks:
gives:
We could check for zero blocks here and drop them. However, checking every block for zeros may not be a cost we want to impose every time an uncombiner is used.
Since it is inconvenient to pass tolerances to contract, we could be very strict with the tolerance there, and then provide a
dropzeros[!]
function for NDTensors and ITensors.