Implementing 'new' models
Posted: 16 Oct 2018, 01:53
Community forum for the Tensor Network Python (TeNPy) Package
https://tenpy.johannes-hauschild.de/
toycodes
folder of the tenpy git repository. Note that these toycodes (and codes from (i),(ii)) are completely separate from the rest of TeNPy, they use just pure python/numpy functionalities, you don't even need to install TeNPy to run them.Code: Select all
leg = npc.LegCharge.from_trivial(d)
Ok. so I'm already back, violating my own commitments , but I got stuck on your examples for the XXZ and TFI chain in https://tenpy.github.io/intro_model.html. There you set the lattice like so:
Code: Select all
# 4) lattice
bc = 'periodic' if bc_MPS == 'infinite' else 'open'
lat = Chain(L, site, bc=bc, bc_MPS=bc_MPS)
Code: Select all
TypeError: __init__() got an unexpected keyword argument 'bc'
Code: Select all
print(inspect.getsource(Chain.__init__))
# ...
def __init__(self, L, site, bc_MPS='finite'):
Code: Select all
bc = 'periodic' if bc_MPS == 'infinite' else 'open'
Code: Select all
lat = Chain(L, site, bc_MPS=bc_MPS)
git pull
(and if necessary, compile the np_conserved parts again).That's what I hoped
And that shouldn't happen