psi_method

tenpy.simulations.measurement.psi_method(results, psi, model, simulation, method, key=None, **kwargs)[source]

Generic function to measure arbitrary method of psi with given additional kwargs.

Deprecated since version 0.10.0: Instead of using this function tenpy.simulations.measurement.psi_method() as a global measurement wrapper function, you can now directly use “psi_method” as module_name and replace the connect_measurements simulation parameter entries as follows:

An old python entry for connect_measurements
    ['tenpy.simulations.measurement',
     'psi_method',
     {'method': 'correlation_function',
      'key': '<Sp_i Sm_j>',
      'ops1': 'Sp',
      'ops2': 'Sm'}]
can get replaced with new entry:
    ['psi_method',
     'wrap correlation_function',
     {'results_key': '<Sp_i Sm_j>',
      'ops1': 'Sp',
      'ops2': 'Sm'}]
Similarly, an old yaml entry for connect_measurements
    - - tenpy.simulations.measurement
      - psi_method
      - method: correlation_function
        key: '<Sp_i Sm_j>'
        ops1: Sp
        ops2: Sm
can get replaced with new yaml:
    - - psi_method
      - wrap correlation_function
      - results_key: '<Sp_i Sm_j>'
        ops1: Sp
        ops2: Sm

The new way is now the preferred way of measuring psi methods, the old way is deprecated. Note the additional “wrap “ in the function name, which indicates that the specified function just returns the results and does not take results, model, simulation as arguments, hence we need a wrapper function for the measurement. Also note the renaming of key to results_key.

Parameters:
  • results – See measurement_index().

  • psi – See measurement_index().

  • model – See measurement_index().

  • simulation – See measurement_index().

  • key – See measurement_index().

  • method (str) – Name of the method of psi to call. key defaults to this if not specified.

  • **kwargs – further keyword arguments given to the method