details_simulation.yml

on github (download).

#!/usr/bin/env -S python -m tenpy 

simulation_class : GroundStateSearch

directory: results
output_filename_params:
    prefix: dmrg
    parts:
        algorithm_params.trunc_params.chi_max: 'chi_{0:04d}'
        model_params.L: 'L_{0:d}'
    suffix: .h5
# skip_if_output_exists: True
# overwrite_output: True
save_every_x_seconds: 1800
# save_psi: False  # don't save full wave function - less disk space, but can't resume/redo measurements!

log_params:
    to_file: INFO
    to_stdout: WARN  # always check this output - empty is good
    # format: "{levelname:.4s} {asctime} {message}"

model_class :  SpinChain
model_params :
    L: 32
    bc_MPS: finite
    Jz: 1.

initial_state_params:
    method : lat_product_state
    product_state : [[up], [down]]

algorithm_class: TwoSiteDMRGEngine
algorithm_params:
    trunc_params:
        svd_min: 1.e-8
        chi_max: 100

connect_measurements: 
  - - tenpy.simulations.measurement
    - m_onsite_expectation_value
    - opname: Sz
  - - psi_method
    - wrap correlation_function
    - results_key: '<Sp_i Sm_j>'
      ops1: Sp
      ops2: Sm
  - - simulation_method
    - wrap walltime