<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">
<p style="margin-top:0;margin-bottom:0">Dear all,</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0">I found an interesting wrong var assignment in ALPS MPS Project version: MAQUIS repo r4143 (2013-2014). It appears both on OSX bmg package version and builds from source code version on Linux. You can use the following
 simple script to reappear the problem:</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0">********************************************************</p>
<p># </p>
<p>#  Author: Rongyang Sun <sun-rongyang@outlook.com></p>
<p>#  Date: 2017-12-13 11:59</p>
<p>#  Last Modified Date: 2017-12-13 11:59</p>
<p>#  Last Modified By: Rongyang Sun <sun-rongyang@outlook.com></p>
<p>#  </p>
<p>#  Description: A demo to show the interesting bug</p>
<p># </p>
<p><br>
</p>
<p>import pyalps</p>
<p><br>
</p>
<p>#prepare the input parameters</p>
<p>parms = [ { </p>
<p>        'LATTICE'                   : "open chain lattice", </p>
<p>        'MODEL'                     : "spin",</p>
<p>        'CONSERVED_QUANTUMNUMBERS'  : 'N,Sz',</p>
<p>        'Sz_total'                  : 0,</p>
<p>        'J'                         : 1,</p>
<p>        'spin'                      : 1,</p>
<p>        'SWEEPS'                    : 4,</p>
<p>        'NUMBER_EIGENVALUES'        : 1,</p>
<p>        'L'                         : 10,</p>
<p>        'MAXSTATES'                 : 100</p>
<p>       } ]</p>
<p><br>
</p>
<p>input_file = pyalps.writeInputFiles('bug',parms)</p>
<p>res = pyalps.runApplication('mps_optim',input_file,writexml=True)</p>
<p>data = pyalps.loadEigenstateMeasurements(pyalps.getResultFiles(prefix='bug'),verbose=True)</p>
<p><br>
</p>
<p>print("\nMODEL: {0}".format(str(data[0][0].props['MODEL'])))</p>
<p><br>
</p>
<p>********************************************************<br>
</p>
<p><br>
</p>
<p>It will return "MODEL: 1" not the right "MODEL" parameter because I define an unused parameter 'spin' with value 1. Once a parameter with a name which appears at the value of 'MODEL', it will be replaced by the value of the parameter. It is more severe for
 't-J' model case. if you set 't': 1.0 and 'J': 0.5, 'MODEL' will be assigned as 0.5 which equals 1.0('t') - 0.5('J')! I have checked the output hdf5 file and found that the wrong replace had happened in the file. That means it may be a bug about ALPS MPS code.</p>
<p><br>
</p>
<p style="margin-top:0;margin-bottom:0">Best regards,</p>
<p style="margin-top:0;margin-bottom:0">Rongyang Sun</p>
</div>
</body>
</html>