spin_half_species
full name: tenpy.networks.site.spin_half_species
parent module:
tenpy.networks.sitetype: function
- tenpy.networks.site.spin_half_species(SpeciesSite, cons_N, cons_Sz, **kwargs)[source]
Initialize two FermionSite to represent spin-1/2 species.
You can use this directly in the
tenpy.models.model.CouplingMPOModel.init_sites(), e.g., as in thetenpy.models.hubbard.FermiHubbardModel2.init_sites():cons_N = model_params.get('cons_N', 'N', str) cons_Sz = model_params.get('cons_Sz', 'Sz', str) return spin_half_species(FermionSite, cons_N=cons_N, cons_Sz=cons_Sz)
- Parameters:
SpeciesSite (
Site| str) – The (name of the) site class for the species; usually justFermionSite.cons_N (None |
"N", "parity", "None") – Whether to conserve the (parity of the) total particle numberN_up + N_down.cons_Sz (None |
"Sz", "parity", "None") – Whether to conserve the (parity of the) total Sz spinN_up - N_down.
- Returns:
sites (list of SpeciesSite) – Each one instance of the site for spin up and down.
species_names (list of str) – Always
['up', 'down']. Included such that areturn spin_half_species(...)ininit_sites()triggers the use of theMultiSpeciesLattice.