measurement_wrapper
full name: tenpy.simulations.measurement.measurement_wrapper
parent module:
tenpy.simulations.measurementtype: function
- tenpy.simulations.measurement.measurement_wrapper(function, results_key, **kwargs)[source]
Decorator to transform a function into a measurement function.
As documented in
m_measurement_index(), measurement functions need to take positional argumentsresults, psi, model, simulation. This function is a decorator that wraps a given function not taking those arguments into a measurement function by simply discarding these arguments and saving the returned value in the results.