TermList¶
full name: tenpy.networks.terms.TermList
parent module:
tenpy.networks.termstype: class
-
class
tenpy.networks.terms.TermList(terms, strength)[source]¶ Bases:
objectA list of terms (=operator names and sites they act on) and associated strengths.
A representation of terms, similar as
OnsiteTerms,CouplingTermsandMultiCouplingTerms.This class does not store operator strings between the sites. Jordan-Wigner strings of fermions are added during conversion to (Multi)CouplingTerms.
- Parameters
- termslist of list of (str, int)
List of terms where each term is a list of tuples
(opname, i)of an operator name and a site i it acts on. For Fermions, the order is the order in the mathematic sense, i.e., the right-most/last operator in the list acts last.- strengthslist of float/complex
For each term in terms an associated prefactor or strength (e.g. expectation value).
- Attributes
- termslist of list of (str, int)
List of terms where each term is a tuple
(opname, i)of an operator name and a site i it acts on.- strengths1D ndarray
For each term in terms an associated prefactor or strength (e.g. expectation value).
Methods
order_combine(self, sites)Order and combine operators in each term.
to_OnsiteTerms_CouplingTerms(self, sites)Convert to
OnsiteTermsandCouplingTerms-
to_OnsiteTerms_CouplingTerms(self, sites)[source]¶ Convert to
OnsiteTermsandCouplingTermsPerforms Jordan-Wigner transformation for fermionic operators.
- Parameters
- siteslist of
Site Defines the local Hilbert space for each site. Used to check whether the operators need Jordan-Wigner strings. The length is used as L for the onsite_terms and coupling_terms.
- siteslist of
- Returns
- onsite_terms
OnsiteTerms Onsite terms.
- coupling_terms
CouplingTerms|MultiCouplingTerms Coupling terms. If self contains terms involving more than two operators, a
MultiCouplingTermsinstance, otherwise justCouplingTerms.
- onsite_terms
-
order_combine(self, sites)[source]¶ Order and combine operators in each term.
- Parameters
- siteslist of
Site Defines the local Hilbert space for each site. Used to check whether the operators anticommute (= whether they need Jordan-Wigner strings) and for multiplication rules.
- siteslist of
See also
order_and_combine_termdoes it for a single term.