Dear ALPS,
I'm having some troubling getting a sensible result using DMRG with ALPS
2.3.0 on a simple transverse Ising model (i.e. using the "spin" model with
Jz != 0, Gamma != 0). Other methods seem to get the correct result with the
same parameters. It seems to be the Gamma term which causes the trouble.
I've pasted a script below which demonstrates the problem. The script gives
me the following output, with the second number being the ground state
energy found by each method:
Model fulldiag: {10.0: -5.3178022046739857}
Model sparsediag: {10.0: -5.3178022046739937}
Model mps_optim: {10.0: -5.3178022046739919}
Model dmrg: {10.0: -213.49032836522568}
Adjusting the various DMRG parameters produces similar results of E0 ~=
-210. I assume I am doing something wrong, or perhaps the Gamma term isn't
supported by DMRG? I have searched the mailing list archive without
success. Ultimately, I want to use DMRG on a more complex model which
includes a term similar to the Gamma / Sx term in the spin model.
Thank you for your great work,
Alex Henry
The script:
##########################
import pyalps
import numpy as np
import matplotlib.pyplot as plt
import copy
import math
models = ['fulldiag', 'sparsediag', 'mps_optim', 'dmrg']
parms = [{
'LATTICE' : "chain lattice",
'MODEL' : "spin",
'local_S' : 0.5,
'Jxy' : 0,
'Jz' : 1,
'Gamma' : 1,
'h' : 0,
'NUMBER_EIGENVALUES' : 1,
'L' : 10,
}]
def process(prefix, prog):
input_file = pyalps.writeInputFiles(prefix, parms)
res = pyalps.runApplication(prog, input_file)
data =
pyalps.loadEigenstateMeasurements(pyalps.getResultFiles(prefix=prefix))
return data
def get_results(d):
E0 = {}
for Lsets in d:
L = pyalps.flatten(Lsets)[0].props['L']
allE = []
for q in pyalps.flatten(Lsets):
allE += list(q.y)
allE = np.sort(allE)
E0[L] = allE[0]
return E0
results = {}
for model in models:
name = "ising_" + model
data = process(name, model)
results[model] = (get_results(data))
for model in models:
print "Model " + model + ": " + str(results[model])
#############################