ITensors.jl icon indicating copy to clipboard operation
ITensors.jl copied to clipboard

Make certain delta contractions return views of the original ITensor storage

Open mtfishman opened this issue 4 years ago • 2 comments

Right now, delta contractions like randomITensor(i, j) * delta() and randomITensor(i, j) * delta(dag(j), j') make copies of the ITensor. However, we've decided that they should avoid copying the ITensor storage, so should return views to the tensor storage (like doing replaceinds). This would technically be breaking so we'll do it for the v0.2 release.

mtfishman avatar Feb 03 '21 18:02 mtfishman

Also see discussion in PR #569.

mtfishman avatar Feb 03 '21 19:02 mtfishman

Also see issue #618 for a proposal on how to do this in a way that is not too confusing in terms of floating point operations and the view behavior. So in that proposal, the current behavior of delta would remain, and a A * delta(One()) could be a non-copying contraction of A.

mtfishman avatar Apr 06 '21 01:04 mtfishman