measurement_index

tenpy.simulations.measurement.measurement_index(results, psi, simulation, key='measurement_index')[source]

‘Measure’ the index of how many mearuements have been performed so far.

The parameter description below also documents the common interface of all measurement functions, that can be registered to simulations.

Parameters
  • 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).

  • psi – Tensor network state to be measured. Shorthand for simulation.psi.

  • simulation (Simulation) – The simulation class. This gives also access to the model, algorithm engine, etc.

  • key (str) – (Optional.) The key under which to save in results.

  • **kwargs – Other optional keyword arguments for individual measurement functions. Those are documented inside each measurement function.