[v0.11.0] - 2024-02-20
Release Notes
Several fixes and additions have accumulated since the last release.
We now officially support python 3.12.
If you have ever defined a custom model and used
add_multi_coupling_term()
with plus_hc=True,
please note issue #218!
Additionally, there are several bugfixes listed in the changelog below that may have caused silent problems (wrong results without raising errors) in some cases.
Changelog
Backwards incompatible changes
nothing yet
Added
ClockModel
,ClockChain
andClockSite
Simulation parameters
Simulation.measure_at_algorithm_checkpoints
andSimulation.canonicalize_before_measurement
BaseMPSExpectationValues
parent class to unify the framework of computing expectation values and correlation functions inMPS
andMPSEnvironment
Abstract
BaseEnvironment
parent class forMPSEnvironment
andMPOEnvironment
Add phi_ext parameter to
FermionModel
,BoseHubbardModel
andFermiHubbardModel
.Option allow_incommensurate for
from_lat_product_state()
.Most “important” objects (this obvious involves some judgement calls, regarding what counts as important) are now directly exposed in the top-level namespace of the tenpy package, i.e. you can now
from tenpy import MPS, tensordot, TwoSiteDMRGEngine
orimport tenpy as tp
and then usetp.tensordot
etc. All objects which are not “private” and/or “implementation details” are exposed in the subpackage namespace, e.g. you canfrom tenpy.networks import MPOGraph
.Overlaps of finite, shifted/translated MPS in
overlap_translate_finite()
.New MPS construction method
from_product_mps_covering()
as a generalization of from_singlets.
Changed
Change the build system and metadata declaration to
pyproject.toml
format. This makes installation more future-proof and stable, but should not affect how tenpy is used, once installed.Allow couplings parameters in the
MixedXKModel
methodsadd_inter_ring_hopping()
,add_intra_ring_hopping()
,add_inter_ring_interaction()
, andadd_inter_ring_interaction()
to vary with x.Renamed the module
lanczos
totenpy.linalg.krylov_based
.The
move_right
attribute ofSweep
now supports a third value,None
, in addition toTrue, False
.None
means that the sweep will not move at all, i.e. the next update will be at the same position than the current one. This happens e.g. in TDVP.Mixers have been generalized and are no longer specialized for use in DMRG. Method names and signatures have been changed. The mixer classes are now implemented in
tenpy.linalg.algorithms.mps_common
. Backwards-compatible wrappers with the old method names and signatures will be kept intenpy.linalg.algorithms.dmrg
until v1.0.Introduce
IterativeSweeps
to generalize algorithms that repeat sweeps until convergence. In particular this makes the convergence check a modular method which can be easily adapted via subclass.New
estimate_simulation_RAM()
to estimate the RAM requiremensts of a simulation before actually running it (issue #305 and issue #342).
Fixed
Potentially serious bug issue #260 that the sorted flag of
LegCharge
was not set correctly inqr()
.from_infiniteT_canonical()
should now work with arbitrary charges of the original model, and has the option to double the number of charges to separately conserve the charges on each the physical and ancilla legs.Fix a wrong total charge in
apply_zipup()
.Fix issue #218 that
add_multi_coupling_term()
with plus_hc=True didn’t correctly add the hermitian conjugate.Fix issue #210 that
psi_AKLT()
had typos and wrong canonical form for finite systems.Fix that the MPS
apply_local_op()
with local multi-site operators didn’t correctly track the norm with renormalize=False.We now update the norm of the MPS in
update_bond()
. If the parameterpreserve_norm
isTrue
(which is the default for real time evolution) this has no effect when usingrun()
or similar, since the MPS norm is reset after the timestep anyway. It does, however, change the behavior ifpreserve_norm
isFalse
.issue #265 that MPO methods
make_U_I()
, make_U_II, apply_naively and apply_zipup just ignored the explicit_plus_hc flag of the MPO, possibly giving completely wrong results without raising errors.Make sure that
eigh()
doesn’t have aLegPipe
on the second (=new) leg.issue #289 that
correlation_length()
raised errors for charge_sector np ndarrays. Further, allow to pass multiple charge sectors to loop over at once, add argument return_charges. Also, provide acorrelation_length_charge_sectors()
convenience function to return valid charge sectors.issue #153 that DMRG energy convergence criterion was verified after an arbitrarily large energy increase.