mdopt.optimiser.dmrg module#
This module contains the DMRG and the EffectiveOperator classes.
The class structure is inspired by TenPy.
- class mdopt.optimiser.dmrg.DMRG(mps: ExplicitMPS | CanonicalMPS, mpo: List[ndarray], chi_max: int = 10000, cut: float = 1e-17, mode: str = 'SA', silent: bool = False, copy: bool = True)#
Class holding the Density Matrix Renormalisation Group algorithm with two-site updates for a finite-size system with open-boundary conditions.
- run(num_iter: int = 1) None#
Run the algorithm, i.e., run
sweepfornum_iteriterations.
- sweep() None#
One full DMRG sweep (left→right, then right→left).
- update_bond(i: int) None#
Update the bond between sites
iandi+1.
- update_left_environment(i: int) None#
Compute the
left_environmentleft of sitei+1from theleft_environmentleft of sitei.
- update_right_environment(i: int) None#
Compute the
right_environmentright of sitei-1from theright_environmentright of sitei.
- class mdopt.optimiser.dmrg.EffectiveOperator(*args, **kwargs)#
Bases:
LinearOperatorClass to store an effective two-site operator.
In order to take more advantage of the
scipy.sparse.linalgmodule, we make a special class for local effective operators. It allows us to compute eigenvectors more efficiently.Such effective operator is to be diagonalised in the
update_bondmethod of theDMRGclass:---uL uR--- | i j | | vL | | vR | (L)----(mpo_l)----(mpo_r)----(R) | | | | | k l | ---dL dR---
In our convention, the legs of left/right environments (tensors
L/Rin the cartoon) are ordered as follows:(uL/uR, vL/vR, dL/dR)which means “(up, virtual, down)”.