I am playing with a toy model and there is something I can not understand. The problem arises when the Hamiltonian is composed for different terms involving hopping and spin-flip. To be more precise, for a two-component fermion systems, the Hamiltonian reads
For N=2 particles and L=4 sites, results from DMRG are compared to exact diagonalization. If each of the above terms is considered individually (t1=1, t2=0, t3=0 or t1=0, t2=1, t3=0 or t1=0, t2=0, t3=1), results from both methods agree even for excited states. The problem appears when two of the above terms in the Hamiltonian are considered at the same time (the same if all three of them are considered together). Then neither ground state energy is correct. This observation holds for different Nmax (1 or 2) in the BuildFermiOperators and also considering different symmetries, namely if only total number of particles is conserved or if the number of particles in each component is kept fixed.
It is interesting to note that for N=1 and L=4, DMRG results always agree with exact diagonalization. So, do you have an idea about what is going on?
I am using the latest version [68] and Hamiltonian is generated through
I'll need some time to work on this, but the description is pretty good to start with. I'll first check with our exact diagonalization code (then I know if it the problem is more likely located in building the operators or inside the fortran libraries) and start from there.
And thanks for pointing out the other bug in the H.printMPO(). I'll take care of this as well.
Kind regards,
Daniel
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thanks for the complete description of the problem. It sounds to me like
this is an issue with the Jordan-Wigner strings that the code uses to
represent fermions. This is based on your observation that N=1 states are
ok (as there the strings never matter). To check this, you could also
compare the outputs of hard-core bosons with the MPS code and ED. If those
agree, it is an issue with the strings and we can focus our attention
there. Otherwise, we will need to keep digging.
The other "bug" you are noting is due to the fact that the code does not
create all possible Fermi operators acted on with the Jordan-Wigner string
until they are needed. Within AddMPOTerm operators which have these phases
(and are distinct from all others in Operators) are created, and to avoid
any possible naming conflicts OSMPS assigns them a random string. Hence, I
believe this to be the desired behavior.
I'll need some time to work on this, but the description is pretty good to
start with. I'll first check with our exact diagonalization code (then I
know if it the problem is more likely located in building the operators or
inside the fortran libraries) and start from there.
And thanks for pointing out the other bug in the H.printMPO(). I'll take
care of this as well.
Thanks for your fast reply! I have tried bosons and got similar results. Here, I have used nFlavors=2 instead of choosing a non-zero spin. Find below what I found.
For N=1 particle, MPS and ED results agree for bosons and fermions for any set (t1,t2,t3). On the other hand, for N=2 and Nmax=2, results disagree for all combinations of t1,t2 and t3 which I have tested.
However, for N=2 and with at most one particle per site (Nmax=1), the following happens (bosons and fermions have similar behavior).
t1<>t2<>t3<>0 : energy of the states in general disagree (but I have only tried t1<t2<t3);
t1=t2=t3=1: ground state disagrees, first sate agrees;
t1=t2=1, t3=0: ground and first states agrees!!!!!! ;
t1=t3=1, t2=0: ground disagrees, first to fourth states agree.
I have not checked bosons as carefully as I did for fermions before, but there seems to be a consistency among results.
While running these calculations, I have noticed something, which is however disconnected from the original problem (I am sorry if it is not convenient for you to mix different issues in the same message). MPS calculates the right values for excited energies, but sometimes these energies are not connected to the right state. For example, the above Hamiltonian for bosons with n=2, L=4, Nmax=1 and nFlavors=2 with t1=t2=1 and t3=0 gives (successive runs give different ordering):
State: 0 Energy: -4.472135955 Variance: 3.66541818027e-16 Converged: T
State: 1 Energy: -2.82842712475 Variance: 8.73519661497e-17 Converged: T
State: 2 Energy: -8.881784197e-16 Variance: 3.69778549322e-31 Converged: T
State: 3 Energy: -2.82842712475 Variance: 7.85046229342e-17 Converged: T
State: 4 Energy: -2.0 Variance: 1.94289029309e-16 Converged: T
State: 5 Energy: -2.0 Variance: 4.9796626536e-16 Converged: T
State: 6 Energy: -8.881784197e-16 Variance: 8.62816615085e-30 Converged: T
All the energies up to the sixth excited state agree with ED, just the ordering is not correct. I understand that excited states are a way more complicate and that for more complex systems it might not be possible even to calculate the right energies. So, this is not a big issue, since the ground state is always the correct one, but I thought it was worth to tell you about.
Thanks again!
Filipe
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I have worked a bit more on the problem and have identified where the problem comes from. My previous post was not totally right, because I had a small problem with my exact diagonalization code. It looked like results would never totally agree. Now I have fixed this problem and have also checked the bosons case more carefully.
For both bosons and fermions, ED and DMRG agrees for N=1 or N=2 with Nmax=1 with any combination between parameters t1,t2,t3 (ground and excited states). So, the problem arises only when Nmax=2 for N=2 (I did not try N>2 yet).
Cheers,
Filipe
Last edit: Filipe Furlan Bellotti 2016-09-08
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
sorry for the delayed reply, but I have troubles to reproduce this error (let's stay with the bosonic case first). I double-checked the MPS result with a built-in exact diagonalization code and they agree. I have written an ED script just for this problem independent of any MPS code and I the ground state energy agrees in the Nmax=2 and filling N=2 case and for t1=t2=t3 and t1=1, t2=2, t3=3.
If this problem still persists, would you please provide your ED script so that I can double-check more intermediate steps.
Kind regards,
Daniel
P.S. My ED test attached; sorry for the bad style. In fact I had troubles arising from lines 45 and 67 comparing floating points before getting the correct result.
Hello!
I am playing with a toy model and there is something I can not understand. The problem arises when the Hamiltonian is composed for different terms involving hopping and spin-flip. To be more precise, for a two-component fermion systems, the Hamiltonian reads
-t1\sum_i fdagger_0_i f_0_{i+1} -t1\sum_i f_0_i fdagger_0_{i+1} ----> spin-up hopping
-t1\sum_i fdagger_1_i f_1_{i+1} -t1\sum_i f_1_i fdagger_1_{i+1} ----> spin-down hopping
-t2\sum_i fdagger_1_i f_0_{i+1} -t2\sum_i f_1_i fdagger_0_{i+1}
-t2\sum_i fdagger_0_i f_1_{i+1} -t2\sum_i f_0_i fdagger_1_{i+1} ----> spin-orbit coupling
-t3\sum_i fdagger_0_i f_1_i -t3\sum_i fdagger_1_i f_0_i ----> on-site spin-flip
For N=2 particles and L=4 sites, results from DMRG are compared to exact diagonalization. If each of the above terms is considered individually (t1=1, t2=0, t3=0 or t1=0, t2=1, t3=0 or t1=0, t2=0, t3=1), results from both methods agree even for excited states. The problem appears when two of the above terms in the Hamiltonian are considered at the same time (the same if all three of them are considered together). Then neither ground state energy is correct. This observation holds for different Nmax (1 or 2) in the BuildFermiOperators and also considering different symmetries, namely if only total number of particles is conserved or if the number of particles in each component is kept fixed.
It is interesting to note that for N=1 and L=4, DMRG results always agree with exact diagonalization. So, do you have an idea about what is going on?
I am using the latest version [68] and Hamiltonian is generated through
Operators=mps.BuildFermiOperators(Nmax=2, Nmin=0, spin=0.5)
Operators['up-down']=np.dot(Operators ['fdagger_1'],Operators ['f_0'])
Operators['down-up']=np.dot(Operators ['fdagger_0'],Operators ['f_1'])
H=mps.MPO()
H.AddMPOTerm(Operators,'bond',['fdagger_0','f_0'],hparam='t1',weight=-1.0,Phase=True)
H.AddMPOTerm(Operators,'bond',['fdagger_1','f_1'],hparam='t1',weight=-1.0,Phase=True)
H.AddMPOTerm(Operators,'bond',['fdagger_0','f_1'],hparam='t2',weight=-1.0,Phase=True)
H.AddMPOTerm(Operators,'bond',['fdagger_1','f_0'],hparam='t2',weight=-1.0,Phase=True)
H.AddMPOTerm(Operators,'site','up-down',hparam='t3',weight=-1.0)
H.AddMPOTerm(Operators,'site','down-up',hparam='t3',weight=-1.0)
parameters
N=2
L=4
t1=1
t2=1
t3=1
symetry
'Abelian_generators' : ['nftotal'],
'Abelian_quantum_numbers' : [N],
Congratulation for the excellent work you do in this project!
Cheers,
Filipe
ps: an unrelated bug that I have noticed since version [55]. If the H.printMPO() feature is used, the above Hamiltonian is printed as
-1.0t3\sum_i up-down_i + -1.0t3\sum_i down-up_i
-1.0t1\sum_i RPPVDQC7_i f_0_{i+1} + -1.0t1\sum_i 85IZQMF7_i fdagger_0_{i+1} + -1.0t1\sum_i MJJT25HZ_i f_1_{i+1} + -1.0t1\sum_i TNB96QM7_i fdagger_1_{i+1} + -1.0t2\sum_i RPPVDQC7_i f_1_{i+1} + -1.0t2\sum_i 85IZQMF7_i fdagger_1_{i+1} + -1.0t2\sum_i MJJT25HZ_i f_0_{i+1} + -1.0t2\sum_i TNB96QM7_i fdagger_0_{i+1}
Hallo Filipe,
I'll need some time to work on this, but the description is pretty good to start with. I'll first check with our exact diagonalization code (then I know if it the problem is more likely located in building the operators or inside the fortran libraries) and start from there.
And thanks for pointing out the other bug in the H.printMPO(). I'll take care of this as well.
Kind regards,
Daniel
Hi Filipe,
Thanks for the complete description of the problem. It sounds to me like
this is an issue with the Jordan-Wigner strings that the code uses to
represent fermions. This is based on your observation that N=1 states are
ok (as there the strings never matter). To check this, you could also
compare the outputs of hard-core bosons with the MPS code and ED. If those
agree, it is an issue with the strings and we can focus our attention
there. Otherwise, we will need to keep digging.
The other "bug" you are noting is due to the fact that the code does not
create all possible Fermi operators acted on with the Jordan-Wigner string
until they are needed. Within AddMPOTerm operators which have these phases
(and are distinct from all others in Operators) are created, and to avoid
any possible naming conflicts OSMPS assigns them a random string. Hence, I
believe this to be the desired behavior.
-Michael
On Fri, Sep 2, 2016 at 9:52 AM, Daniel Jaschke djaschke@users.sf.net
wrote:
Dear Daniel and Michael,
Thanks for your fast reply! I have tried bosons and got similar results. Here, I have used nFlavors=2 instead of choosing a non-zero spin. Find below what I found.
For N=1 particle, MPS and ED results agree for bosons and fermions for any set (t1,t2,t3). On the other hand, for N=2 and Nmax=2, results disagree for all combinations of t1,t2 and t3 which I have tested.
However, for N=2 and with at most one particle per site (Nmax=1), the following happens (bosons and fermions have similar behavior).
t1<>t2<>t3<>0 : energy of the states in general disagree (but I have only tried t1<t2<t3);
t1=t2=t3=1: ground state disagrees, first sate agrees;
t1=t2=1, t3=0: ground and first states agrees!!!!!! ;
t1=t3=1, t2=0: ground disagrees, first to fourth states agree.
I have not checked bosons as carefully as I did for fermions before, but there seems to be a consistency among results.
While running these calculations, I have noticed something, which is however disconnected from the original problem (I am sorry if it is not convenient for you to mix different issues in the same message). MPS calculates the right values for excited energies, but sometimes these energies are not connected to the right state. For example, the above Hamiltonian for bosons with n=2, L=4, Nmax=1 and nFlavors=2 with t1=t2=1 and t3=0 gives (successive runs give different ordering):
State: 0 Energy: -4.472135955 Variance: 3.66541818027e-16 Converged: T
State: 1 Energy: -2.82842712475 Variance: 8.73519661497e-17 Converged: T
State: 2 Energy: -8.881784197e-16 Variance: 3.69778549322e-31 Converged: T
State: 3 Energy: -2.82842712475 Variance: 7.85046229342e-17 Converged: T
State: 4 Energy: -2.0 Variance: 1.94289029309e-16 Converged: T
State: 5 Energy: -2.0 Variance: 4.9796626536e-16 Converged: T
State: 6 Energy: -8.881784197e-16 Variance: 8.62816615085e-30 Converged: T
All the energies up to the sixth excited state agree with ED, just the ordering is not correct. I understand that excited states are a way more complicate and that for more complex systems it might not be possible even to calculate the right energies. So, this is not a big issue, since the ground state is always the correct one, but I thought it was worth to tell you about.
Thanks again!
Filipe
Hello again,
I have worked a bit more on the problem and have identified where the problem comes from. My previous post was not totally right, because I had a small problem with my exact diagonalization code. It looked like results would never totally agree. Now I have fixed this problem and have also checked the bosons case more carefully.
For both bosons and fermions, ED and DMRG agrees for N=1 or N=2 with Nmax=1 with any combination between parameters t1,t2,t3 (ground and excited states). So, the problem arises only when Nmax=2 for N=2 (I did not try N>2 yet).
Cheers,
Filipe
Last edit: Filipe Furlan Bellotti 2016-09-08
Hallo Filipe,
sorry for the delayed reply, but I have troubles to reproduce this error (let's stay with the bosonic case first). I double-checked the MPS result with a built-in exact diagonalization code and they agree. I have written an ED script just for this problem independent of any MPS code and I the ground state energy agrees in the Nmax=2 and filling N=2 case and for t1=t2=t3 and t1=1, t2=2, t3=3.
If this problem still persists, would you please provide your ED script so that I can double-check more intermediate steps.
Kind regards,
Daniel
P.S. My ED test attached; sorry for the bad style. In fact I had troubles arising from lines 45 and 67 comparing floating points before getting the correct result.