Recent Changes - Search:

HomePage

PmWiki

pmwiki.org

MpLocalExpectation

This tool calculates the local expectation value of an operator <O(i)> for a range of lattice sites.

Matrix Product Toolkit version HEAD-0.7.4.0 (subversion tree rev 802)
Compiled on Dec 10 2007 at 11:47:35
usage: mp-localexpectation <lattice> <psi> <operator> <first> <last>

The operator must be defined in the SiteBlock of the model, and is therefore limited to a local quantity. The 'first' and 'last' indices are raw indices of the n'^th' A-matrix, NOT the coordinates defined by the lattice.

This tool is roughly equivalent to running mp-expectation in a loop:

for i in `seq $first $last` ; do mp-expectation psi "$operator($i)" ; done

but it is much more efficient, requiring only a single sweep to obtain all values.

Examples

To obtain the local particle density N at each of the first 40 sites of a particle model, use

mp-localexpectation lattice psi N 1 40

See also

Edit - History - Print - Recent Changes - Search
Page last modified on January 09, 2008, at 01:49 PM