[v0.9.0] - 2021-09-21

Release Notes

It’s been a while, so we have a bunch of new features, in particular quite some progress with the simulation classes. The DMRG mixer has been rewritten, and the setup for orthogonal excitations with DMRG has been adjusted a bit. If you already used the simulation class setup, watch out for the renaming of the simultion_class(_name) and the change of the default separater for recursive keys. Apart form that, there are not major incompatibilities compared to v0.8.4

Special thanks go to Wilhelm Kadow for great work on the mixed real- and momentum-space representation for models!

Support Python 3.6 to 3.9

Changelog

Backwards incompatible changes

  • Renamed the simulation_class_name argument/parameter to simulation_class of run_simulation() for more consistency with remaining simulation parameters.

  • change default separator for tenpy.tools.misc.get_recursive(), set_recursive(), update_recursive(), and flatten() to '.' instead of '/'. Also, get_recursive() now supports a default argument.

  • replace the orthogonal_to option of tenpy.algorithms.mps_common.Sweep by an orthogonal_to keyword argument for the class and it’s init_env().

  • deprecated options: - sweep_0 for sweep classes; use sweeps in the resume_data instead.

  • Require context-manager-style setup for Simulation classes.

  • Replace the SingleSiteMixer and TwoSiteMixer with the SubspaceExpansion; major rewriting of the mixer code. Further, we now reactivate/reset the Mixer whenever growing the bond dimension due to chi_list in DMRG. The new option DMRGEngine.chi_list_reactivates_mixer allows to disable this.

Added

Changed

  • tenpy.tools.misc.find_subclass() now directly raises an error if no subclass with that name is found.

  • Renamed the logging_params to log_params.

  • tenpy.simulations.measurement.correlation_length() now supports a unit keyword. If it is not given explicitly, a warning is raised.

  • tenpy.networks.mps.MPS.canonical_form() now supports an argument envs_to_update to allow keeping MPS/MPOEnvironments consistent.

  • keyword argument sequential_simulations for tenpy.algorithms.algorithm.Algorithm.get_resume_data().

  • Allow to select the distribution of the generated U for the RandomUnitaryEvolution. For randomly perturbing an MPS in randomized() or the new perturb(), select the distribution suitable to preserve the dtype of the MPS.

  • Rewriting of the DensityMatrixMixer.

  • Generalize conserve argument of the Site subclasses, e.g. SpinHalfSite, to handle None and False the same way as a string 'None'. The string is the new, documented way to disable charge conservation.

Fixed

  • (!) Missing + h.c. in tenpy.networks.mpo.MPOEnvironment.full_contraction() when H.explicit_plus_hc was True. This caused wrong energies being reported during DMRG when explicit_plus_hc was used.

  • (!) The DMRG mixers didn’t respect/handle the explicit_plus_hc of MPOs correctly. This might have lead to an insufficient subspace expandsion.

  • Always return psi in the tenpy.algorithms.algorithm.Algorithm.get_resume_data(). Optionally, this can be a copy, e.g. if psi.canonical_form needs to be called at the end of the algorithm, which would render the environments invalid.

  • Use logging in simulation only after calling setup_logging().

  • issue #99 and issue #113 by allowing to either reinitialize the environment from scratch, and/or to updating the environments in psi.canonical_form().

  • issue #137 additional error check for from_lat_product_state() with HelicalLattice.

  • Missing return in resume_run() broke simulation resume for DMRG.

  • Simulation checkpoints during DMRG resulted in MPS failing test_sanity() during load.