Particle Number Conservation in tJ model

How do I use this algorithm? What does that parameter do?
Post Reply
Master99
Posts: 1
Joined: 24 Jul 2023, 09:19

Particle Number Conservation in tJ model

Post by Master99 »

Hello,

I want to calculate gs energy and excited states energies of tJ model for J=0 by using DMRG. I put p_state = ['up', 'down', 'empty', 'empty']*(L//4) for half filling. But I am not sure abot conservation of number particles. How to implement it for tJ model. Also, I want to add some magnetic field and potential for this model. Is there any possibility to do it?

Thanks.

The definition of the model is

Code: Select all

L = 12
J = 0
def example_run():
    M = tj_model.tJChain({"L": L, 'J': J})
    p_state = ['up', 'down', 'empty', 'empty']*(L//4)
    psi0 = MPS.from_product_state(M.lat.mps_sites(), p_state, bc = M.lat.bc_MPS)
    dmrg_params = {
        'mixer': True, 
        'trunc_params': {
            'chi_max': 8,
            'svd_min': 1.e-10,
        },
        'max_E_err': 1.e-10,
        'verbose': 1,
        'max_sweeps':20,
    }
    states = dmrg_params['orthogonal_to'] = []
    for i in range(3):
        psi = psi0.copy()
        results = dmrg.run(psi, M, dmrg_params)
        states.append(psi)
        print("Energy per site: ", results['E'])

if __name__ == "__main__":
    example_run()
User avatar
Johannes
Site Admin
Posts: 428
Joined: 21 Jul 2018, 12:52
Location: TU Munich

Re: Particle Number Conservation in tJ model

Post by Johannes »

The tenpy.models.tj_model.tJModel defines the options cons_N and cons_Sz - just set them as you need them, and make sure your initial state is in the charge sector you want - for the initial product state you wrote, you get average density of 2/4 = 1/2 and spin Sz=0.

You can also easily define a custom subclass of the model, and override `init_terms()` to add some more couplings, e.g. as you said some magnetic field:

Code: Select all

class tJChainField(tJChain):
    def init_terms(self, model_params):
        super().init_terms(model_params) # keep terms in parent model
        h = model_params.get('h', 0.)
        self.add_onsite(h, 0, 'Sz') 
Note that if you add local Sx/Sy fields, you no longer can use the Sz charge conservation - just set the corresponding parameter to False then.
Post Reply