I am not sure but ALPS may can only measure overlap between two existing MPS files. Maybe you can create the trivial 'local_quantumnumbers' MPS file by running `mps_optim` using a blank Hamiltonian starting from the 'local_quantumnumbers' initial state that you want.

Best,
Rongyang

From: Comp-phys-alps-users <comp-phys-alps-users-bounces@lists.phys.ethz.ch> on behalf of Ñ <yangchao@iphy.ac.cn>
Sent: Monday, March 26, 2018 18:54
To: comp-phys-alps-users@lists.phys.ethz.ch
Subject: Re: [ALPS-users] mps_overlap
 

Thanks for your help. I am trouble with another problem. I use the 'mps_evolve' with the initial state set to be 'local_quantumnumbers', how can I set the 'MEASURE_OVERLAP[Overlap]'? 


Best wishes!


Appendx:

Length = 12
Length_half=Length/2
N = 100
T = 2.0
dt = T / N
model = OrderedDict()
model['LATTICE'] = 'open chain lattice'
model['L'      ] = Length
model['MODEL'                   ] = 'spin'
model['CONSERVED_QUANTUMNUMBERS'] = 'Sz'
model['Sz_total'                ] = 0
model['Jxy'                     ] = 1.
model['Jz'                      ] = 0.6
model['MAXSTATES'] = 40
# model['MEASURE_LOCAL[Overlap]'] = 'local_quantumnumbers'
initial_temp=[]
for j in range(Length):
 num=str(0.5*(-1)**(j+1))
 initial_temp.insert(j,num)
local_temp=','.join(initial_temp)
parms=[]
p = deepcopy(model)
p['init_state'      ] = 'local_quantumnumbers'
p['initial_local_S' ] = ','.join(['0.5']*Length)
p['initial_local_Sz'] = local_temp
p['te_order' ] = 'second'
p['DT'       ] = dt
p['TIMESTEPS'] = N
p['tau'      ] = T
p['MEASURE_OVERLAP[Overlap]'] = ???
p['ALWAYS_MEASURE'] = 'Overlap'
p['chkp_each'     ] = N
p['measure_each'  ] = 5
p['COMPLEX'       ] = 1
parms.append(p)

input_file_2 = pyalps.writeInputFiles('parms', parms)
res_2= pyalps.runApplication('mps_evolve', input_file_2)

-----Original Messages-----
From:"Rongyang Sun" <sun-rongyang@outlook.com>
Sent Time:2018-03-07 12:41:14 (Wednesday)
To: "comp-phys-alps-users@lists.phys.ethz.ch" <comp-phys-alps-users@lists.phys.ethz.ch>
Cc:
Subject: Re: [ALPS-users] mps_overlap

Dear Chao,


It is easy to use this application on the command line:


    mps_overlap --mps1 MPS1.task.out.chkp --mps2 MPS2.task.out.chkp


You can also type `mps_overlap -h` to see help text. If you want to use python, `subprocesses.call()` function from `subprocesses` module or `os.system()' from `os` module will help you.


Best,

Rongyang


From: Comp-phys-alps-users <comp-phys-alps-users-bounces@lists.phys.ethz.ch> on behalf of Ñ <yangchao@iphy.ac.cn>
Sent: Wednesday, March 7, 2018 11:50:15 AM
To: comp-phys-alps-users@lists.phys.ethz.ch
Subject: [ALPS-users] mps_overlap
 
Dear All
I would like to use application 'mps_overlap' to calculate the overlap of two MPS wavefunctions with the checkpoint files MPS1.task.out.chkp and MPS2.task.out.chkp. However, I do not see any tutorial or document about how to use 'mps_overlap' with python. So how can I get the overlap of these wavefunctions?


Best wishes!
Yang Chao