full name: tenpy.simulations.measurement.onsite_expectation_value
- tenpy.simulations.measurement.onsite_expectation_value(results, psi, simulation, opname, key=None)¶
Measure expectation values of an onsite operator.
The resulting array of measurements is indexed by lattice indices
(x, y, u)(possibly dropping y and/or u if they are trivial), not by the MPS index. Note that this makes the result independent of the way the MPS winds through the lattice.
The key defaults to