Recent Changes - Search:




The mp-expectation command calculates the expectation value of an operator with finite support. The wavefunction can be finite, infinite, or infinite-boundary.


mp-expectation [options] <psi> <operator> [psi2]

calculates {$\bigbraket{\mbox{psi}}{\mbox{operator}}{\mbox{psi2}}$}

The operator must be defined over a finite range of lattice sites, it is not possible to use mp-iexpectation to evaluate TriangularMPO's or ProductMPO's as these have infinite support. For infinite wavefunctions, it is not possible to calculate mixed expectation values where psi2 is different to psi1.



show help message

-r, --real

display the real part of the result

-i, --imag

display the imaginary part of the result

If none of --real or --imag is specified, the default is to show both the real and imaginary parts.


  1. local magnetization at site 5

    mp-expectation psi lat:"Sz(5)"
  2. correlations of an SU(2) spin chain

    mp-expectation psi lat:"inner(S(0),S(1))"

See also

  • To calculate expectation values of TriangularMPO's, see MpIMoments
  • To calculate expectation values of ProductMPO's, see MpIOverlap
Edit - History - Print - Recent Changes - Search
Page last modified on October 13, 2017, at 06:56 AM