the truncation in dmrg
Posted: 08 Jan 2019, 03:36
I think the following finding should be noticed by everyone who uses tenpy.
When I run dmrg for xxz chian, I found that the result will be strongly dependents on the parameter "svd_min", and this doesn't make sense.
I have run the following test to show the problem.
I'm confused, what may cause this problem?
Thanks,
Qicheng
When I run dmrg for xxz chian, I found that the result will be strongly dependents on the parameter "svd_min", and this doesn't make sense.
I have run the following test to show the problem.
I'm confused, what may cause this problem?
Thanks,
Qicheng
Code: Select all
def DMRG_XXZ(D0, svd_min, L=48, S=0.5, bc_MPS='finite'):
print("finite dmrg, XXZ chain")
model_params = dict(L=L, Jx=1, Jy=1, Jz=D0, conserve='best',
S=S, bc_MPS=bc_MPS, verbose=0)
M = SpinChain(model_params)
psi = MPS.from_product_state(M.lat.mps_sites(), ([1, 0] * L)[:L], bc=bc_MPS)
dmrg_params = {
'mixer': None,
'trunc_params': {
'chi_max': 512,
'svd_min': svd_min
},
'max_E_err': 1.e-10,
'verbose': 1
}
dmrg.run(psi, M, dmrg_params)
E = np.sum(psi.expectation_value(M.H_bond[1:]))
print("E = {E:.13f}".format(E=E))
print("final bond dimensions: ", psi.chi)
return E, psi
def test_dmrg_xxz():
svd_mins = []
psis = []
Ss = []
S_half = []
for n in range(20):
svd_min = (0.5*(n+1)+1.5)*1.e-12
svd_mins += [svd_min]
a = DMRG_XXZ(4, svd_min)
psis += [a[1]]
Ss.append(a[1].entanglement_entropy())
S_half += [Ss[n][23]]
pl.figure()
pl.plot(svd_mins, S_half, 'ob-')
pl.xlabel('svd_min$')
pl.ylabel('entanglement entropy')
pl.savefig('test_svd_min.pdf')
return svd_mins, psis, Ss, S_half