Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Infinite DMRG and canonical form #1

@jhauschild

Description

@jhauschild

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 working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions