<LATTICES>
 <GRAPH name = "open chain lattice with special edges" dimension="1" vertices="8" edges="7">
  <VERTEX id="1" type="0"><COORDINATE>0</COORDINATE></VERTEX>
  <VERTEX id="2" type="1"><COORDINATE>1</COORDINATE></VERTEX>
  <VERTEX id="3" type="2"><COORDINATE>2</COORDINATE></VERTEX>
  <VERTEX id="4" type="3"><COORDINATE>3</COORDINATE></VERTEX>
  <VERTEX id="5" type="4"><COORDINATE>4</COORDINATE></VERTEX>
  <VERTEX id="6" type="5"><COORDINATE>5</COORDINATE></VERTEX>
  <VERTEX id="7" type="6"><COORDINATE>6</COORDINATE></VERTEX>
  <VERTEX id="8" type="7"><COORDINATE>7</COORDINATE></VERTEX>
  <EDGE source="1" target="2" id="1" type="0" vector="1"/>
  <EDGE source="2" target="3" id="2" type="0" vector="1"/>
  <EDGE source="3" target="4" id="3" type="0" vector="1"/>
  <EDGE source="4" target="5" id="4" type="0" vector="1"/>
  <EDGE source="5" target="6" id="5" type="0" vector="1"/>
  <EDGE source="6" target="7" id="6" type="0" vector="1"/>
  <EDGE source="7" target="8" id="7" type="0" vector="1"/>
 </GRAPH>
</LATTICES>


<MODELS>

<SITEBASIS name="spin-1/2 fermion">
  <QUANTUMNUMBER name="Nup" min="0" max="1" type="fermionic"/>
  <QUANTUMNUMBER name="Ndown" min="0" max="1" type="fermionic"/>
  <QUANTUMNUMBER name="N" min="Nup+Ndown" max="Nup+Ndown"/>
  <OPERATOR name="Nup" matrixelement="Nup"/>
  <OPERATOR name="Ndown" matrixelement="Ndown"/>
  <OPERATOR name="c_down" matrixelement="1">
    <CHANGE quantumnumber="Ndown" change="-1"/>
    <CHANGE quantumnumber="N" change="-1"/>
  </OPERATOR>
  <OPERATOR name="cdag_down" matrixelement="1">
    <CHANGE quantumnumber="Ndown" change="1"/>
    <CHANGE quantumnumber="N" change="1"/>
  </OPERATOR>
  <OPERATOR name="c_up" matrixelement="1">
    <CHANGE quantumnumber="Nup" change="-1"/>
    <CHANGE quantumnumber="N" change="-1"/>
  </OPERATOR>
  <OPERATOR name="cdag_up" matrixelement="1">
    <CHANGE quantumnumber="Nup" change="1"/>
    <CHANGE quantumnumber="N" change="1"/>
  </OPERATOR>
  <OPERATOR name="n" matrixelement="Nup+Ndown"/>
  <OPERATOR name="n_up" matrixelement="Nup"/>
  <OPERATOR name="n_down" matrixelement="Ndown"/>
  <OPERATOR name="double_occupancy" matrixelement="Nup*Ndown"/>
</SITEBASIS>

<BASIS name="spin-1/2 fermion">
  <SITEBASIS ref="spin-1/2 fermion"/>
  <CONSTRAINT quantumnumber="Nup" value="Nup_total"/>
  <CONSTRAINT quantumnumber="Ndown" value="Ndown_total"/>
</BASIS>

<SITEOPERATOR name="double_occupancy" site="x">
  n(x)*(n(x)-1)/2
</SITEOPERATOR>


<BONDOPERATOR name="fermion_hop" source="x" target="y">
  cdag_up(x)*c_up(y)+cdag_up(y)*c_up(x)+cdag_down(x)*c_down(y)+cdag_down(y)*c_down(x)
</BONDOPERATOR>

<HAMILTONIAN name="spin-1/2 fermion">
  <PARAMETER name="J" default="1"/>
  <PARAMETER name="V" default="0"/>
  <PARAMETER name="beta" default="0.618"/>
  <PARAMETER name="phi" default="0"/>
  <PARAMETER name="U" default="0"/>
  <PARAMETER name="X" default="0"/>
  <BASIS ref="spin-1/2 fermion"/>
  <SITETERM site="i">
    <PARAMETER name="U#" default="U"/>
    <PARAMETER name="V#" default="V"/>
    <PARAMETER name="phi#" default="phi"/>
    <PARAMETER name="beta#" default="beta"/>  
<PARAMETER name="X#" default="X"/>  
    V#*cos(2*pi*beta#*X#+phi)*n(i)+U#*n_up(i)*n_down(i)
  </SITETERM> 
  <BONDTERM source="i" target="j">
    <PARAMETER name="J#" default="J"/>
    -J#*fermion_hop(i,j)
  </BONDTERM>
</HAMILTONIAN>

</MODELS>


2015-06-04 21:58 GMT+08:00 Michele Dolfi <dolfim@phys.ethz.ch>:
can you please also attach the lattice and model files?


--
ETH Zurich
Michele Dolfi
Institute for Theoretical Physics
HIT G 32.4
Wolfgang-Pauli-Str. 27
8093 Zurich
Switzerland







On Jun 4, 2015, at 3:48 PM, Cathy Wu <cathy.em2013@gmail.com> wrote:

Dear Michele,
I am using binary code of alps-2.2.b3-win32 on PC and alps-2.2.b3 on cluster. it is succesful to import alps.mpi and alps.hdf5, problem is not able to read the /spectrum/results/OBSERVABLENAME/mean/value  : expectation value of the observable.
Function pyalps.loadIterationMeasurements(resfiles,what="Local Dfraction") gives me back blank array [[[[], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], []]]].

Here attached my code for Aubry Andre model.

parms=[]
parms.append(
      {
        'LATTICE_LIBRARY'           : 'my_lattice.xml',
        'LATTICE'                   : 'open chain lattice with special edges',
'MODEL_LIBRARY'             : 'my_models.xml',
        'MODEL'                     : 'spin-1/2 fermion',
        'CONSERVED_QUANTUMNUMBERS'  : 'Nup,Ndown',
'U':10,
'X0':0,
'X1':1,
'X2':2,
'X3':3,
'X4':4,
'X5':5,
'X6':6,
'X7':7,
'V':2,
        'Nup_total'                 : 4,
        'Ndown_total'               : 4,
'SWEEPS'                    : 4,
        'NUMBER_EIGENVALUES'        : 1,
        'MAXSTATES'                 : 100,
'MEASURE_LOCAL[DoublonFraction]'        : 'double_occupancy',
        'init_state':'local_quantumnumbers',
        'initial_local_Nup'  :'1,0,1,0,1,1,0,0',
        'initial_local_Ndown':'0,1,0,1,0,1,0,1',
        'initial_local_N'    :'1,1,1,1,1,2,0,1',
        'te_order':'second',
        'DT':10./50,
        'TIMESTEPS':50,
        'always_measure':'DoublonFraction',
        'chkp_each':25,
        'measure_each':5,
        'COMPLEX':1
      }
    )

#write the input file and run the simulation
input_file = pyalps.writeInputFiles('parm_local',parms)
res = pyalps.runApplication('mps_evolve',input_file,writexml=True)
#load all measurements for all states
data = pyalps.loadEigenstateMeasurements(pyalps.getResultFiles(prefix='parm_local'))
print data


thanks a lot for your help<328.png>
Good day!

2015-06-04 1:48 GMT+08:00 Michele Dolfi <dolfim@phys.ethz.ch>:
Hi Cathy,

Which version of ALPS are you using?
The lastest binary release on the website was released before we finalized the MPS code interface, and some tutorials actually fail.

Can you send us your python script?


Michele

--
ETH Zurich
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 03 Jun 2015, at 18:31, Cathy Wu <cathy.em2013@gmail.com> wrote:
>
> Hi everyone,
> I have been trying to calculate the expectation value of certain variables defined by 'MEASURE_AVERAGE[NAME]' using mps_evolve function and obtained the output .h5 file by running the function 'loadIterationMeasuremen', energy and parameters were returned, but the measurements were not!!!!
> So i used a h5 file viewer and found out that the results were actually collected under the repository /spectrum/iteration.
> I also tried the 4 tutorial scripts in mps-06-kink file and same story happened. There are two things I want to consult,
> 1. is it correct that the expectation value are stored under spectrum/iteration? and I am also a little baffled why the folders under iteration are named with random numbers.
> 2. how to read the results with functions from alps. I tried to read the .h5 file with h5py module of python and it does not recognize any dataset as 'spectrum'.
>
> Please help!<33F.gif>
> best,