[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,ClockChainandClockSiteSimulation parameters
Simulation.measure_at_algorithm_checkpointsandSimulation.canonicalize_before_measurementBaseMPSExpectationValuesparent class to unify the framework of computing expectation values and correlation functions inMPSandMPSEnvironmentAbstract
BaseEnvironmentparent class forMPSEnvironmentandMPOEnvironmentAdd phi_ext parameter to
FermionModel,BoseHubbardModelandFermiHubbardModel.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, TwoSiteDMRGEngineorimport tenpy as tpand then usetp.tensordotetc. 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.tomlformat. This makes installation more future-proof and stable, but should not affect how tenpy is used, once installed.Allow couplings parameters in the
MixedXKModelmethodsadd_inter_ring_hopping(),add_intra_ring_hopping(),add_inter_ring_interaction(), andadd_inter_ring_interaction()to vary with x.Renamed the module
lanczostotenpy.linalg.krylov_based.The
move_rightattribute ofSweepnow supports a third value,None, in addition toTrue, False.Nonemeans 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.dmrguntil v1.0.Introduce
IterativeSweepsto 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
LegChargewas 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_normisTrue(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_normisFalse.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 aLegPipeon 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.