|
pos_eosp.append(pos_rec.pop(p_max)) |
I think here the code stores a wrong index number into pos_eosp, since in the end of every iteration, a MPS is projected and thus one local tensor (at p_max) of it gets removed, so all the indices following p_max will be shifted by 1. Essentially p_max is an index into the current MPS (which may be projected), not an index into the initial MPS.
Python-for-Tensor-Network-Tutorial/Library/MatrixProductState.py
Line 213 in 4c89b07
I think here the code stores a wrong index number into
pos_eosp, since in the end of every iteration, a MPS is projected and thus one local tensor (atp_max) of it gets removed, so all the indices followingp_maxwill be shifted by 1. Essentiallyp_maxis an index into the current MPS (which may be projected), not an index into the initial MPS.