read_opsum
Reads an OpSum object from a TOML file.
Definition
Parameters
Name | Description | |
---|---|---|
file | FileToml object from which the OpSum is read | |
tag | tag which holds the information in the TOML file about the OpSum |
Data format
An OpSum can be defined in a TOML file as a simple list. The entries of the list are themselves also lists, which contain two or more entries:
- The first entry must be either a string or a real / complex number denoting the coupling constant of the term.
- The second entry must be a string and denotes the operator type
- The (optional) following entries are integer numbers which denote the sites of the Op
Here is typical example of a OpSum specification in a TOML file:
Interactions = [
['J1', 'SdotS', 0, 1],
['J1', 'SdotS', 1, 2],
['J1', 'SdotS', 2, 0],
['Jchi', 'ScalarChirality', 0, 1, 2],
]