[0.5.0] - 2019-12-18
Backwards incompatible changes
Major rewriting of the DMRG Engines, see issue #39 and issue #85 for details. The
EngineCombine
andEngineFracture
have been combined into a singleTwoSiteDMRGEngine
with an Therun
function works as before. In case you have directly used theEngineCombine
orEngineFracture
, you should update your code and use theTwoSiteEngine
instead.Moved
init_LP
andinit_RP
method fromMPS
intoMPSEnvironment
andMPOEnvironment
.
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 (previouslytenpy.linalg.np_conserved.Array._get_block
).groundstate()
now returns a tuple(E0, psi0)
instead of justpsi0
. 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
tenpy.algorithms.mps_common
with theSweep
class andEffectiveH
to be aOneSiteH
orTwoSiteH
.Single-Site DMRG with the
SingleSiteDMRG
.Example function in
examples/c_tebd.py
how to run TEBD with a model originally having next-nearest neighbors.increase_L()
to allow increasing the unit cell of an MPS.Additional option
order='folded'
for theChain
.tenpy.algorithms.exact_diag.ExactDiag.from_H_mpo()
wrapper as replacement fortenpy.networks.mpo.MPO.get_full_hamiltonian()
andtenpy.networks.mpo.MPO.get_grouped_mpo()
. The latter are now deprecated.Argument max_size to limit the matrix dimension in
ExactDiag
.tenpy.linalg.sparse.FlatLinearOperator.from_guess_with_pipe()
to allow quickly converting matvec functions acting on multi-dimensional arrays to a FlatLinearOperator by combining the legs into a LegPipe.tenpy.tools.math.speigsh()
for hermitian variant ofspeigs()
Allow for arguments
'LA', 'SA'
inargsort()
.tenpy.linalg.lanczos.lanczos_arpack()
as possiple replacement of the self-implemented lanczos function.tenpy.algorithms.dmrg.full_diag_effH()
as another replacement oflanczos()
.The new DMRG parameter
'diag_method'
allows to select a method for the diagonalization of the effective Hamiltonian. Seetenpy.algorithms.dmrg.DMRGEngine.diag()
for details.dtype attribute in
EffectiveH
.tenpy.linalg.charges.LegCharge.get_qindex_of_charges()
to allow selecting a block of an Array from the charges.tenpy.algorithms.mps_common.EffectiveH.to_matrix
to allow contracting an EffectiveH to a matrix, as well as metadatatenpy.linalg.sparse.NpcLinearOperator.acts_on
andtenpy.algorithms.mps_common.EffectiveH.N
.argument only_physical_legs in
tenpy.networks.mps.MPS.get_total_charge()
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
andMPOEnvironment
to have MPS/MPO with different lengthgroup_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()
.