Hi Mateusz,
I didn’t manage to follow up on this earlier. Could you please send the model file that you are using?
Michele
-- ETH Zurich Dr. Michele Dolfi Institute for Theoretical Physics HIT G 32.4 Wolfgang-Pauli-Str. 27 8093 Zurich Switzerland
dolfim@phys.ethz.ch www.itp.phys.ethz.ch
+41 44 633 78 56 phone +41 44 633 11 15 fax
On Jan 15, 2017, at 12:28 PM, Michele Dolfi dolfim@phys.ethz.ch wrote:
Dear Mateusz,
Which version of the code are you using? We recently rewrote how measurements are parsed (specially for measurement expressions).
Could you please try with a version newer than r7807?
Best, Michele
-- ETH Zurich Dr. Michele Dolfi Institute for Theoretical Physics HIT G 32.4 Wolfgang-Pauli-Str. 27 8093 Zurich Switzerland
dolfim@phys.ethz.ch mailto:dolfim@phys.ethz.ch www.itp.phys.ethz.ch http://www.itp.phys.ethz.ch/
+41 44 633 78 56 phone +41 44 633 11 15 fax
On 14 Jan 2017, at 18:17, Mateusz Łącki <mateusz.lacki@gmail.com mailto:mateusz.lacki@gmail.com> wrote:
Dear All. I would like to report a likely bug.
I play with a simple transverse ising model for S=1/2. I take a short chain of length say 8, compute magnetization in x and z direction. When I compute the same input with mps_optim and sparsediag i obtain different results. Both codes give me different magnetizatios in mps_optim measurement seems to be wrong by a factor.
I changed the definition of a default model “spin” (see below), the coupling is along x axis and field is along z. I consider the following input:
LATTICE="inhomogeneous chain lattice" MODEL_LIBRARY="models.xml"
MODEL="spin" J=1 SWEEPS=8 chkp_each=8
MEASURE_LOCAL[Local magnetization Xa]=Splus MEASURE_LOCAL[Local magnetization Xb]=Sminus MEASURE_LOCAL[Local magnetization X1]=Sx MEASURE_LOCAL[Local magnetization X2]=Sxx MEASURE_LOCAL[Local magnetization Z]=Sz MAXSTATES=40; NUMBER_EIGENVALUES=1;
{h=0;Gamma=0;L=8}
In the above the Sxx operator is defined exactly the same as Sx:
<SITEOPERATOR name="Sx" site="x"> 1/2*(Splus(x)+Sminus(x)) </SITEOPERATOR>
but with 1/4 factor, not 1/2:
<SITEOPERATOR name="Sxx" site="x"> 1/4*(Splus(x)+Sminus(x)) </SITEOPERATOR>
There are 2 runs that are important for my message:
RUN A): running the above input with sparsediag gives (at any site): Local magnetization Xa=0.5 Local magnetization Xb=0.5 Local magnetization X1=0.5 Local magnetization X2=0.25
Which makes sense, as Sx=0.5*(Jplus + Jminus)
RUN B): running the above input with mps_optim gives (at any site): Local magnetization Xa=0.5 Local magnetization Xb=0.5 Local magnetization X1=1.0 Local magnetization X2=1.0
My conclusion: It seems that measurement ignores the factor 1/4 in the definition of Sxx and 1/2 in the definition of Sx. If it is indeed the case (not stupid mistake on my side), would it be possible to issue a patch?
If I change
<BONDTERM source="i" target="j"> <PARAMETER name="J#" default="J"/> -J#*Sx(i)*Sx(j)*4 </BONDTERM>
into
<BONDTERM source="i" target="j"> <PARAMETER name="J#" default="J"/> -J#*Sxx(i)*Sxx(j)*4 </BONDTERM>
then I get a correct factor 4 reduction in energy. So it seems only the mesurement ignores the numerical factor.
If I exchange x-z direction in the Hamiltonian everything seems fine.
Best, Mateusz Łącki
Comp-phys-alps-users Mailing List for the ALPS Project http://alps.comp-phys.org/ http://alps.comp-phys.org/
List info: https://lists.phys.ethz.ch//listinfo/comp-phys-alps-users Archive: https://lists.phys.ethz.ch//pipermail/comp-phys-alps-users
Unsubscribe by writing a mail to comp-phys-alps-users-leave@lists.phys.ethz.ch.
Comp-phys-alps-users Mailing List for the ALPS Project http://alps.comp-phys.org/
List info: https://lists.phys.ethz.ch//listinfo/comp-phys-alps-users Archive: https://lists.phys.ethz.ch//pipermail/comp-phys-alps-users
Unsubscribe by writing a mail to comp-phys-alps-users-leave@lists.phys.ethz.ch.