full name: tenpy.simulations.measurement.m_measurement_index
- tenpy.simulations.measurement.m_measurement_index(results, psi, model, simulation, results_key='measurement_index')¶
‘Measure’ the index of how many mearuements have been performed so far.
The parameter description below documents the common interface of all measurement functions that can be registered to simulations.
See Measurements for Simulations for the general setup using measurements.
Changed in version 0.10.0: The model parameter is new! Any measurement function for simulations now has to accept this as keyword argument!
results (dict) – A dictionary with measurement results performed so far. Instead of returning the result, the output should be written into this dictionary under an appropriate key (or multiple keys, if applicable).
model – Tensor network state and matching model (with same sites/indexing) to be measured. Usually shorthand for
simulation.model, respectively, but can be different, e.g., when grouping sites. See
Simulation) – The simulation class. This gives also access to the model, algorithm engine, etc.
results_key (str) – The key under which to save data in results. For some measurement functions optional, e.g in this case. Note that a single measurement function can add results under multiple keys, if desired.
**kwargs – Other optional keyword arguments for individual measurement functions. Those are documented inside each measurement function.