Tutorials:ModelHOWTO
From ALPSWiki
As part of the ALPS project we need to describe quantum lattice models in a common format. The lattice descriptions using the lattice schema are associated with basis and Hamiltonian descriptions for each site and bond in the lattice.
A model library file starts with the element <MODEL>, and can contain any of the following:
- The basis of a single site
- The basis of the full lattice model
- Quantum operators
- Hamiltonian descriptions
Contents |
The basis of a single site
Basis states of a single site are described by one or more quantumnumbers as in:
<SITEBASIS name="hardcore boson"> <QUANTUMNUMBER name="N" min="0" max="1"/> </SITEBASIS> <SITEBASIS name="spin-1/2"> <QUANTUMNUMBER name="Sz" min="-1/2" max="1/2"/> </SITEBASIS> <SITEBASIS name="fermion"> <QUANTUMNUMBER name="Nup" min="0" max="1" type="fermionic"/> <QUANTUMNUMBER name="Ndown" min="0" max="1" type="fermionic"/> </SITEBASIS>
The <SITEBASIS> takes a name attribute by which it can later be referenced.
The <QUANTUMNUMBER> elements each take a name, and minimum and maximum values in the min and max attributes. The quantum numbers can take values between min, min+1, min+2 ... up to max. Optionally, a type attribute can be set to bosonic (the default) or fermionic. It should be set to fermionic when the quantum number is a fermionic number operator. This information will be used when determining commutation relation between operators on different sites.
The range of the quantum numbers can be parametrized by input parameters, and default can be specified such as in
<SITEBASIS name="boson"> <PARAMETER name="Nmax" default="infinity"/> <QUANTUMNUMBER name="N" min="0" max="Nmax"/> </SITEBASIS> <SITEBASIS name="spin"> <PARAMETER name="S" default="1/2"/> <QUANTUMNUMBER name="Sz" min="-S" max="S"/> </SITEBASIS>
The basis of the full lattice model
The basis set of a lattice model is specified by giving the basis for each type of sites (vertices) in the lattice. If there is just one type of sites, only one site basis needs to be given as in:
<BASIS name="spin">
<SITEBASIS ref="spin"/>
</BASIS>
<BASIS name="spin">
<SITEBASIS name="spin-1">
<QUANTUMNUMBER name="Sz" min="-1" max="1"/>
</SITEBASIS>
</BASIS>
The basis again takes a name attribute and contains a <SITEBASIS> element which is used as default for all sites. The <SITEBASIS> can either reference a previously defined one by a ref attribute or just declare the full site basis as above.
Optionally, the <SITEBASIS> can take a type argument, specifying which site (vertex) it applies to. This allows more complex basis sets to be constructed, with different local site bases depending on the site type, such as in:
<BASIS name="Kondo lattice"> <SITEBASIS type="0" ref="fermion"/> <SITEBASIS type="1" ref="spin-1/2"/> </BASIS>
Finally, the basis can be restricted by specifying a constraint on the sums of certain quantum numbers. For example to specify a basis for a spin model with total value of spin Sz_total, a <CONSTRAINT> element can be added:
<BASIS name="spin"> <SITEBASIS ref="spin"/> <CONSTRAINT quantumnumber="Sz" value="Sz_total"/> </BASIS>
Quantum operators
The basic quantum operators from which the Hamilton operators will be built are specified by a name, matrix element and optionally the changes the operator causes in quantum numbers. Examples are:
<OPERATOR name="Splus" matrixelement="sqrt(S*(S+1)-Sz*(Sz+1))"> <CHANGE quantumnumber="Sz" change="1"/> </OPERATOR> <OPERATOR name="Sminus" matrixelement="sqrt(S*(S+1)-Sz*(Sz-1))"> <CHANGE quantumnumber="Sz" change="-1"/> </OPERATOR> <OPERATOR name="Sz" matrixelement="Sz"/> <OPERATOR name="b" matrixelement="sqrt(N)"> <CHANGE quantumnumber="N" change="-1"/> </OPERATOR> <OPERATOR name="bdag" matrixelement="sqrt(N+1)"> <CHANGE quantumnumber="N" change="1"/> </OPERATOR> <OPERATOR name="n" matrixelement="N"/>
In the specification of the matriy element, the value of the quantum numbers of the state can be referred to through the name of the quantum number (Sz in these examples)
Hamiltonian descriptions
With these elements we can now describe the Hamiltonian of a model. A simple hard-core boson model could be:
<HAMILTONIAN name="hardcore boson">
<PARAMETER name="mu" default="0"/>
<PARAMETER name="t" default="1"/>
<PARAMETER name="t'" default="1"/>
<BASIS ref="hardcore boson"/>
<SITETERM type="0">
-mu*n
</SITETERM>
<BONDTERM type="0" source="i" target="j">
-t*(bdag(i)*b(j)+bdag(j)*b(i)))
</BONDTERM>
<BONDTERM type="1" source="i" target="j">
-t'*(bdag(i)*b(j)+bdag(j)*b(i)))
</BONDTERM>
</HAMILTONIAN>
First, default values can be specified for parameters such as coupling constants by using <PARAMETER> elements.
Next, one <BASIS> element specifes the basis used for the model, either fully specified inline or by a reference (using the ref attribute).
The terms of the Hamiltonian are next specified by site terms, associated with the sites of the lattice and bond terms, associated with the bonds. Each of the <SITETERM> and <BONDTERM> elements can optionally take a type attribute. This type attribute specifies at which type of site (bond) the term will be applied. These are the same types specified in the lattice description. Omitting the type attribute applies the term to all sites or bonds for which no other term is explcitly specifed.
The <SITETERM> elements contain terms of the Hamiltonian associated with a single site. In the above example the term mu refers to the parameter mu while the term n refers to the operator n described above.
In the <BONDTERM> elements, operators referring to two different sites need to be specfied. This is done by adding the site index in parentheses after the operator, e.g. as in n(i) to act on site i. The source and target attributes specify which variables to use for specifying the sites (i and j in the example).
Extensions to more complex terms, such as 3- and 4-site terms are in preparation and will be included here as soon as the ALPS libraries support such terms.
