Skip to content

Latest commit

 

History

History
106 lines (93 loc) · 8.13 KB

v0.8.0.rst

File metadata and controls

106 lines (93 loc) · 8.13 KB

[v0.8.0] - 2021-03-19

Release Notes

First of all: We have optimized the cython parts such that they can now link directly against MKL and have been optimized for the case of small blocks inside charge-conserved tensors. During compilation, TeNPy now checks whether MKL is available, and then directly links against it. This changed the depencies: in particular, when you created a conda environment for TeNPy, it is highly recommended to start off with a new one based on the environment.yml file. If you want to continue using the existing conda environment, you need to conda install mkl-devel before compilation. Additionally, when you use the conda-forge channel of conda, you should pin blas to use MKL by conda install libblas=*=*mkl.

Another great reason to update are simulation classes and a console script tenpy-run to allow running and even resuming a simulation when it aborted! See /intro/simulations for details.

Further, there is a big change in verbosity: we switched to using Python's default logging mechanism. This implies that by default you don't get any output besides error messages and warning any more, at least not in pre-simulation setups. See /intro/logging on how to get the output back, and what to change in your code.

Finally, note that the default (stable) git branch was renamed from master to main.

Changelog

Backwards incompatible changes

  • Drop official support for Python 3.5.
  • tenpy.linalg.np_conserved.from_ndarray: raise ValueError instead of just a warning in case of the wrong non-zero blocks. This behaviour can be switched back with the new argument raise_wrong_sector.
  • Argument v0 of tenpy.networks.mps.MPS.TransferMatrix.eigenvectors is renamed to v0_npc; v0 now serves for non-np_conserved guess.
  • Default parameters for lattice initialization in the following classes changed. In particular, the bc_MPS parameter now defaults to 'finite'.
    • tenpy.models.hofstadter.HofstadterFermions
    • tenpy.models.hofstadter.HofstadterBosons
    • tenpy.models.toric_code.ToricCode
  • Renamed tenpy.algorithms.tebd.Engine to tenpy.algorithms.tebd.TEBDEngine and tenpy.algorithms.tdvp.Engine to tenpy.algorithms.tdvp.TDVPEngine to have unique algorithm class-names.
  • When running, no longer print stuff by default. Instead, we use Python's logging mechanism. To enable printing again, you need to configure the logging to print on "INFO" level (which is the default when running from command line)

    As part of this big change in the way verbosity is handled, there were many minor changes:
    • rename Config.print_if_verbose to ~tenpy.tools.params.Config.log
    • deprecate the verbose class argument of the ~tenpy.tools.params.Config
    • deprecate the verbose class attribute of all classes (if they had it).
    • change argument names of ~tenpy.tools.params.
  • Changed default parameter (actually in /changelog/v0.8.4), namely to use the :cfgDMRGEngine.mixer for ~tenpy.algorithms.dmrg.SingleSiteDMRG by default.

Added

  • Simulation class ~tenpy.simulation.simulation.Simulation and subclasses as a new extra layer for handling the general setup.
  • Command line script tenpy-run and ~tenpy.run_simulation for setting up a simulation.
  • ~tenpy.networks.mps.MPS.entanglement_entropy_segment2
  • ~tenpy.networks.mps.MPS.apply_product_op
  • tenpy.linalg.sparse.FlatLinearOperator.eigenvectors and ~tenpy.linalg.sparse.FlatHermitianOperator.eigenvectors to unify code from tenpy.networks.mps.TransferMatrix.eigenvectors and tenpy.linalg.lanczos.lanczos_arpack.
  • tenpy.tools.misc.group_by_degeneracy
  • tenpy.tools.fit.entropy_profile_from_CFT and tenpy.tools.fit.central_charge_from_S_profile
  • tenpy.networks.site.Site.multiply_operators as a variant of ~tenpy.networks.site.Site.multiply_op_names accepting both string and npc arrays.
  • tenpy.tools.events.EventHandler to simplify call-backs e.g. for measurement codes during an algorithms.
  • tenpy.tools.misc.find_subclass to recursively find subclasses of a given base class by the name. This function is now used e.g. to find lattice classes given the name, hence supporting user-defined lattices defined outside of TeNPy.
  • tenpy.tools.misc.get_recursive and ~tenpy.tools.misc.set_recursive for nested data strucutres, e.g., parameters.
  • tenpy.tools.misc.flatten to turn a nested data structure into a flat one.
  • tenpy.networks.mps.InitialStateBuilder to simplify building various initial states.
  • Common base class tenpy.algorithms.Algorithm for all algorithms.
  • Common base class tenpy.algorithms.TimeEvolutionAlgorithm for time evolution algorithms.
  • tenpy.models.lattice.Lattice.Lu as a class attribute.
  • tenpy.models.lattice.Lattice.find_coupling_pairs to automatically find coupling pairs of 'nearest_neighbors' etc..
  • tenpy.models.lattice.HelicalLattice allowing to have a much smaller MPS unit cell by shifting the boundary conditions around the cylinder.
  • tenpy.networks.purification_mps.PurificationMPS.from_infiniteT_canonical for a canonical ensemble.

Changed

  • For finite DMRG, :cfgDMRGEngine.N_sweeps_check now defaults to 1 instead of 10 (which is still the default for infinite MPS).
  • Merge tenpy.linalg.sparse.FlatLinearOperator.npc_to_flat_all_sectors into ~tenpy.linalg.sparse.FlatLinearOperator.npc_to_flat, merge tenpy.linalg.sparse.FlatLinearOperator.flat_to_npc_all_sectors into ~tenpy.linalg.sparse.FlatLinearOperator.flat_to_npc.
  • Change the chinfo.names of the specific ~tenpy.networks.site.Site classes to be more consistent and clear.
  • Add the more powerful tenpy.networks.site.set_common_charges to replace tenpy.networks.site.multi_sites_combine_charges.
  • Allow swap_op='autoInv' for tenpy.networks.mps.MPS.swap_sites and explain the idea of the swap_op.
  • The tenpy.models.model.CouplingMPOModel.init_lattice now respects new class attributes ~tenpy.models.model.CouplingMPOModel.default_lattice and ~tenpy.models.model.CouplingMPOModel.force_default_lattice.
  • Support additional priority argument for ~tenpy.models.lattice.get_order_grouped, 122.
  • Warn if one of the add_* methods of the CouplingMPOModel gets called after initialization.

Fixed

  • Sign error for the couplings of the tenpy.models.toric_code.ToricCode.
  • The form of the eigenvectors returned by tenpy.networks.mps.TransferMatrix.eigenvectors was dependent on the charge_sector given in the initialization; we try to avoid this now (if possible).
  • The charge conserved by SpinHalfFermionSite(cons_Sz='parity') was weird.
  • Allow to pass npc Arrays as Arguments to ~tenpy.networks.mps.MPS.expectation_value_multi_sites and other correlation functions (116).
  • tenpy.tools.hdf5_io did not work with h5py version >= (3,0) due to a change in string encoding (117).
  • The overall phase for the returned W from ~tenpy.networks.mps.MPS.compute_K was undefined.
  • tenpy.networks.mpo.MPO.expectation_value didn't work with max_range=0
  • The default trunc_par for tenpy.networks.mps.MPS.swap_sites, ~tenpy.networks.mps.MPS.permute_sites and ~tenpy.networks.mps.MPS.compute_K was leading to too small chi for intial MPS with small chi.
  • 120 Lattice with different sites in the unit cell.
  • Index offset in tenpy.networks.mps.MPS.expectation_value_term for the sites to be used.
  • 121 tenpy.networks.mps.MPS.correlation_length worked with charge_sector=0, but included additional divergent value with charge_sector=[0].
  • Some MPS methods (correlation function, expectation value, ...) raised an error for negative site indices even for infinite MPS.
  • Warn if we add terms to a couplingMPOMOdel after initialization