You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
mtfishman
changed the title
[NDTensors] [BUG] YOUR SHORT DESCRIPTION OF THE BUG HERE
[NDTensors] [BUG] Issue with constructing an ITensor from a sliced Tensor
May 10, 2024
As discussed with @kmp5VT, probably we should not expect to support this syntax anyway, i.e. it doesn't make much sense to call ITensor(::Tensor, inds).
Instead, ITensorMPOCompression.jl should be extracting the storage:
using ITensors: Index, ITensor, randomITensor
using NDTensors: Tensor
i, j =Index.((4, 4))
it =randomITensor(i, j)
t =Tensor(it)
t_sub = t[1:2, 1:2]
i_sub, j_sub =Index.((2, 2))
ITensor(storage(t_sub), (i_sub, j_sub))
However, that appears to hit some bugs of its own: #1438
Looks like the function
ITensorMPOCompression.get_subtensor_wrapper(::DenseTensor, inds, ::UnitRange{Int}...)
defined in ITensorMPOCompression.jl here:https://github.com/JanReimers/ITensorMPOCompression.jl/blob/e1aa17a7f7900d092f147f69a0c5631e610025ad/src/subtensor.jl#L171-L175
is hitting a bug in
NDTensors.jl
. Here is a minimal example reproducing the bug:which outputs:
with versions:
@kmp5VT
The text was updated successfully, but these errors were encountered: