TermList¶
full name: tenpy.networks.terms.TermList
parent module:
tenpy.networks.termstype: class
Inheritance Diagram

Methods
|
Initialize self. |
|
Load instance from a HDF5 file. |
|
Order and combine operators in each term. |
|
Export self into a HDF5 file. |
Convert to |
-
class
tenpy.networks.terms.TermList(terms, strength)[source]¶ Bases:
tenpy.tools.hdf5_io.Hdf5ExportableA 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
terms (list 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.strengths (list of float/complex) – For each term in terms an associated prefactor or strength (e.g. expectation value).
-
terms¶ List of terms where each term is a tuple
(opname, i)of an operator name and a site i it acts on.
-
strengths¶ For each term in terms an associated prefactor or strength (e.g. expectation value).
- Type
1D ndarray
-
to_OnsiteTerms_CouplingTerms(sites)[source]¶ Convert to
OnsiteTermsandCouplingTermsPerforms Jordan-Wigner transformation for fermionic operators.
- Parameters
sites (list 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_terms (
OnsiteTerms) – Onsite terms.coupling_terms (
CouplingTerms|MultiCouplingTerms) – Coupling terms. If self contains terms involving more than two operators, aMultiCouplingTermsinstance, otherwise justCouplingTerms.
-
order_combine(sites)[source]¶ Order and combine operators in each term.
- Parameters
sites (list 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.
-
classmethod
from_hdf5(hdf5_loader, h5gr, subpath)[source]¶ Load instance from a HDF5 file.
This method reconstructs a class instance from the data saved with
save_hdf5().
-
save_hdf5(hdf5_saver, h5gr, subpath)[source]¶ Export self into a HDF5 file.
This method saves all the data it needs to reconstruct self with
from_hdf5().This implementation saves the content of
__dict__withsave_dict_content(), storing the format under the attribute'format'.