joselado / dmrgpy

DMRGPy is a Python library to compute quasi-one-dimensional spin chains and fermionic systems using matrix product states with DMRG as implemented in ITensor. Most of the computations can be performed both with DMRG and exact diagonalization for small systems, which allows one to benchmark the results.
GNU General Public License v3.0
87 stars 20 forks source link

Specify half-filling fermionchain.Spinful_Fermionic_Chain #20

Closed HamidArianZad closed 1 year ago

HamidArianZad commented 1 year ago

Hi Jose!

I realized that how it is possible to tune the total number of spinless particles in your sample code: https://github.com/joselado/dmrgpy/blob/master/examples/total_particle_number/main.py

Is the procedure of finding the total number of spinless electrons described in above code applicable for the case: fermionchain.Spinful_Fermionic_Chain, when I want to have the Hubbard model in half-filling such that there is an imbalance term|N_up - N_dn| = 2? that means <gs|Sz_total|gs> = 1.

In your code at sufficiently low values of the chemical potential (mu < -3.5) the total number of spinless fermions reaches its highest value ne = 4 that means in half filling case we have ne = 2. For the case spinful fermionic chain I found that the total number of electrons for i in range(L): Nop = Nop + fc.N[i] gives one-quarter number of total particles. However, it needs to take into account the sum of total number of particles with spin up (N_up) and those with spins down (N_dn) all together to get the total number of particles N_total in half-filling. Is that right?

joselado commented 1 year ago

Hi HamidArianZad,

yes, you could control the number of particles with a chemical potential also in the case of spinful fermions.

For a spinful system, one needs to consider both spin and spin down when counting the number of electrons. You can address each of them separately with fc.Nup and fc.Ndn, and the total with Nup + Ndn.

Best regards, Jose