TermList

class tenpy.networks.terms.TermList(terms, strength)[source]

Bases: object

A list of terms (=operator names and sites they act on) and associated strengths.

A representation of terms, similar as OnsiteTerms, CouplingTerms and MultiCouplingTerms.

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 OnsiteTerms and CouplingTerms

to_OnsiteTerms_CouplingTerms(self, sites)[source]

Convert to OnsiteTerms and CouplingTerms

Performs 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.

Returns
onsite_termsOnsiteTerms

Onsite terms.

coupling_termsCouplingTerms | MultiCouplingTerms

Coupling terms. If self contains terms involving more than two operators, a MultiCouplingTerms instance, otherwise just CouplingTerms.

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.

See also

order_and_combine_term

does it for a single term.