Sorry,the formatting on the page is out of order, so I send the email again.
Dear Rongyang,
Thank you for your help and sugggestions. I will pay attention to the details when I use ALPS and try to use ALPS MPS library to do DMRG simulation.
Though the parameter works, I still have problems.
i) The ground state energy is E0= -11.1895. But I have checked it by matlab and quspin using ED method, the results calculated by the two softwares are the same E0=-10.0499. Then I asked my friend to calculate the same model with the same parameters by itensor and he also got E0=-10.0499. I suspect that there is still a problem exist in my XML files.
ii) I try to use ALPS MPS. And I will read the paper about ALPS MPS for more details later.When I use open chain lattice, it can run. But when I use 2 band sublattice open chain lattice, it shows --------------------------------------------------- Running task 1. This binary contains symmetries: nu1 MAQUIS repo r4143 Temporary storage is disabled Restoring state. Will start again at site -1 in sweep 30 MPS initialization has finished... Measurements. Measuring n Energy: 1 This task took 0.313551 seconds. Finished with everything. ------------------------------------------------ Why?
iii) I want to write the tunneling rate t as a function of the position. -------------------------------------------------- import pyalps import numpy as np parms = [ { #'LATTICE' : "2 band sublattice open chain lattice", 'LATTICE' : "open chain lattice", 'LATTICE_LIBRARY': './lattices.xml', 'MODEL' : "sublattice boson Hubbard", 'MODEL_LIBRARY': './models.xml', 'CONSERVED_QUANTUMNUMBERS' : 'N', 'T' : 0, 't0' : 3-2*np.cos(x*np.pi+np.pi), #'t1' : 1, 'SWEEPS' : 30, 'MAXSTATES' : 300, 'init_state' : "thin" , 'NUMBER_EIGENVALUES' : 1, 'L' : 4, 'Nmax' : 1, 'N_total' : 2, 'MEASURE_LOCAL[n]' : 'n' } ] input_file = pyalps.writeInputFiles('ssh',parms) res = pyalps.runApplication('mps_optim',input_file,writexml=True) ------------------------------- Then I got the error: --------------------------------------------------- Traceback (most recent call last): File "./ssh.py", line 12, in <module> 't0' : 3-2*np.cos(x*np.pi+np.pi), NameError: name 'x' is not defined -------------------------------------------------- So how can I define the parameter when it is changed by site position?
Hi Yulian,
For problem i), I will check your model XML lib carefully and replay later.
For problem ii), The ALPS MPS app can detect the incomplete simulation and restore it. See the output: -------------------------- ... Restoring state. Will start again at site -1 in sweep 30 ... -------------------------- So you should another simulation basename which is given by the statement in your simulation script: -------------------------- input_file = pyalps.writeInputFiles('ssh',parms) --------------------------
or remove all the files and folders starting with 'ssh' under your simulation work directory before a new simulation task begin.
For problem iii), on the one hand, it is an error for your Python programming. You can not use a name "x" here before you define it in the above statements in your script. You may need to read some guide about Python programming. Try to find some quick tour, that is enough for you to write some simulation script. On the other hand, you can not define a position dependent parameter using this way. You should do it by defining a lattice graph whose sites all with a different type. As far as I know, it can not be implemented straightforwardly. You can generate a uniform lattice graph first, and then modify the types of each site. Finally, use the modified lattice graph in your simulation. I have implemented this feature in my ALPS enhancement tool, alpskit: https://github.com/sun-rongyang/alpskit. But I am sorry that it just a draft with doc missed. The related function is at https://github.com/sun-rongyang/alpskit/blob/8c898ba38c64bb1e798fc14d33df014.... You can refer to it. I will try to go back to complete the project.
Best, RY [https://avatars0.githubusercontent.com/u/20738314?s=400&v=4]https://github.com/sun-rongyang/alpskit/blob/8c898ba38c64bb1e798fc14d33df014ff79ba8a2/src/alpskit/lattice.py#L14
sun-rongyang/alpskithttps://github.com/sun-rongyang/alpskit/blob/8c898ba38c64bb1e798fc14d33df014ff79ba8a2/src/alpskit/lattice.py#L14 Python package to enhance ALPS. Contribute to sun-rongyang/alpskit development by creating an account on GitHub. github.com
________________________________ From: Comp-phys-alps-users comp-phys-alps-users-bounces@lists.phys.ethz.ch on behalf of yulian chen cyl119zj@gmail.com Sent: Tuesday, October 23, 2018 17:36 To: comp-phys-alps-users@lists.phys.ethz.ch Subject: Re: [ALPS-users] parameter t' does not seem to work
Sorry,the formatting on the page is out of order, so I send the email again.
Dear Rongyang,
Thank you for your help and sugggestions. I will pay attention to the details when I use ALPS and try to use ALPS MPS library to do DMRG simulation.
Though the parameter works, I still have problems.
i) The ground state energy is E0= -11.1895. But I have checked it by matlab and quspin using ED method, the results calculated by the two softwares are the same E0=-10.0499. Then I asked my friend to calculate the same model with the same parameters by itensor and he also got E0=-10.0499. I suspect that there is still a problem exist in my XML files.
ii) I try to use ALPS MPS. And I will read the paper about ALPS MPS for more details later.When I use open chain lattice, it can run. But when I use 2 band sublattice open chain lattice, it shows --------------------------------------------------- Running task 1. This binary contains symmetries: nu1 MAQUIS repo r4143 Temporary storage is disabled Restoring state. Will start again at site -1 in sweep 30 MPS initialization has finished... Measurements. Measuring n Energy: 1 This task took 0.313551 seconds. Finished with everything. ------------------------------------------------ Why?
iii) I want to write the tunneling rate t as a function of the position. -------------------------------------------------- import pyalps import numpy as np parms = [ { #'LATTICE' : "2 band sublattice open chain lattice", 'LATTICE' : "open chain lattice", 'LATTICE_LIBRARY': './lattices.xml', 'MODEL' : "sublattice boson Hubbard", 'MODEL_LIBRARY': './models.xml', 'CONSERVED_QUANTUMNUMBERS' : 'N', 'T' : 0, 't0' : 3-2*np.cos(x*np.pi+np.pi), #'t1' : 1, 'SWEEPS' : 30, 'MAXSTATES' : 300, 'init_state' : "thin" , 'NUMBER_EIGENVALUES' : 1, 'L' : 4, 'Nmax' : 1, 'N_total' : 2, 'MEASURE_LOCAL[n]' : 'n' } ] input_file = pyalps.writeInputFiles('ssh',parms) res = pyalps.runApplication('mps_optim',input_file,writexml=True) ------------------------------- Then I got the error: --------------------------------------------------- Traceback (most recent call last): File "./ssh.py", line 12, in <module> 't0' : 3-2*np.cos(x*np.pi+np.pi), NameError: name 'x' is not defined -------------------------------------------------- So how can I define the parameter when it is changed by site position?
comp-phys-alps-users@lists.phys.ethz.ch