-
Notifications
You must be signed in to change notification settings - Fork 139
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
The state returned by DMRG with inifinte boundary conditions is not in the canonical form.
from tenpy.networks.mps import MPS
from tenpy.models.spins import SpinChain
from tenpy.algorithms import dmrg
M = SpinChain({'L': 2, 'Jz': 1.5, 'bc_MPS': 'infinite', 'verbose': 0})
psi = MPS.from_product_state(M.lat.mps_sites(),[0,1],bc='infinite')
dmrg_params = {'mixer': None, 'trunc_params': {'chi_max': 100, 'svd_min': 1.e-10},
'verbose': 0, 'min_sweeps': 20}
info = dmrg.run(psi, M, dmrg_params)
print("norm_test: ", psi.norm_test())
print("E_DMRG = ", info['E'])
print("S = ", psi.entanglement_entropy())
print("bring to canonical form")
psi.canonical_form()
print("in canonical form.")
print("norm_test: ", psi.norm_test())
print("S = ", psi.entanglement_entropy())Using another library, I get an energy of E=-0.52343171716 and entropy S=0.5083 at the same parameters.
While the energy seems to fit up to 7 digits, the returned entropy S=1.201 is completely off, and norm_test indicates a large error; after calling canonical_from, S = 0.50827.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working