quimb icon indicating copy to clipboard operation
quimb copied to clipboard

2x2 PEPS has on-site cyclic indices

Open KTBieniasz opened this issue 1 year ago • 1 comments

What happened?

When creating a cyclic 2x2 PEPS the individual tensors are themselves cyclic, i.e. each tensor has the form T_{ikik}. Below is an output from the minimal example. Note that each internal index is repeated in every tensor.

What did you expect to happen?

All indices within a tensor should be unique

Minimal Complete Verifiable Example

qtn.PEPS.rand(2,2,2, cyclic=True)

Relevant log output

PEPS(tensors=4, indices=8, Lx=2, Ly=2, max_bond=2)
Tensor(shape=(2, 2, 2, 2, 2), inds=[_40a938AABqo, _40a938AABqp, _40a938AABqo, _40a938AABqp, k0,0], tags={I0,0, X0, Y0}),
Tensor(shape=(2, 2, 2, 2, 2), inds=[_40a938AABqq, _40a938AABqp, _40a938AABqq, _40a938AABqp, k0,1], tags={I0,1, X0, Y1}),
Tensor(shape=(2, 2, 2, 2, 2), inds=[_40a938AABqo, _40a938AABqr, _40a938AABqo, _40a938AABqr, k1,0], tags={I1,0, X1, Y0}),
Tensor(shape=(2, 2, 2, 2, 2), inds=[_40a938AABqq, _40a938AABqr, _40a938AABqq, _40a938AABqr, k1,1], tags={I1,1, X1, Y1}),

Anything else we need to know?

No response

Environment

Quimb version 1.8.4

KTBieniasz avatar Sep 10 '24 11:09 KTBieniasz

Thanks for the issue! Yes the problem is that the index name is mapped from the coordinate pair it links, and for L=2 PBC the coordinate pair is the same for both 'inner' and 'outer' bonds. Probably some simple explicit handling of the L=1,2 case is needed.

jcmgray avatar Sep 10 '24 15:09 jcmgray