[0.5.0] - 2019-12-18

Backwards incompatible changes

Changed

  • Addition/subtraction of Array: check whether the both arrays have the same labels in differnt order, and in that case raise a warning that we will transpose in the future.

  • Made tenpy.linalg.np_conserved.Array.get_block() public (previously tenpy.linalg.np_conserved.Array._get_block).

  • groundstate() now returns a tuple (E0, psi0) instead of just psi0. Moreover, the argument charge_sector was added.

  • Simplification in the Lattice: Instead of having separate arguments/attributes/functions for 'nearest_neighbors', 'next_nearest_neighbors', 'next_next_nearest_neighbors' and possibly (Honeycomb) even 'fourth_nearest_neighbors', 'fifth_nearest_neighbors', collect them in a dictionary called pairs. Old call structures still allowed, but deprecated.

  • issue #94: Array addition and inner() should reflect the order of the labels, if they coincided. Will change the default behaviour in the future, raising FutureWarning for now.

  • Default parameter for DMRG params: increased precision by setting P_tol_min down to the maximum of 1.e-30, lanczos_params['svd_min']**2 * P_tol_to_trunc, lanczos_params['trunc_cut']**2 * P_tol_to_trunc by default.

Added

Fixed

  • MPO expectation_value() did not work for finite systems.

  • Calling compute_K() repeatedly with default parameters but on states with different chi would use the chi of the very first call for the truncation parameters.

  • allow MPSEnvironment and MPOEnvironment to have MPS/MPO with different length

  • group_sites() didn’t work correctly in some situations.

  • matvec_to_array() returned the transposed of A.

  • tenpy.networks.mps.MPS.from_full() messed up the form of the first array.

  • issue #95: blowup of errors in DMRG with update_env > 0. Turns out to be a problem in the precision of the truncation error: TruncationError.eps was set to 0 if it would be smaller than machine precision. To fix it, I added from_S().