Mixer¶
full name: tenpy.algorithms.dmrg.Mixer
parent module:
tenpy.algorithms.dmrg
type: class
Inheritance Diagram
Methods

Initialize self. 

Perturb the wave function and perform an SVD with truncation. 

Update the amplitude, possibly disable the mixer. 

class
tenpy.algorithms.dmrg.
Mixer
(mixer_params)[source]¶ Bases:
object
Base class of a general Mixer.
Since DMRG performs only local updates of the state, it can get stuck in “local minima”, in particular if the Hamiltonain is longrange – which is the case if one maps a 2D system (“infinite cylinder”) to 1D – or if one wants to do singlesite updates (currently not implemented in TeNPy). The idea of the mixer is to perturb the state with the terms of the Hamiltonian which have contributions in both the “left” and “right” side of the system. In that way, it adds fluctuation of the quantum numbers and nonzero contributions of the longrange terms  leading to a significantly improved convergence of DMRG.
The strength of the perturbation is given by the amplitude of the mixer. A good strategy is to choose an initially significant amplitude and let it decay until the perturbation becomes completely irrelevant and the mixer gets disabled.
This original idea of the mixer was introduced in [White2005]. [Hubig2015] discusses the mixer and provides an improved version.
 Parameters
env (
MPOEnvironment
) – Environment for contraction<psiHpsi>
for latermixer_params (dict) –
Optional parameters as described in the following table. Use
verbose>0
to print the used parameters during runtime.key
type
description
amplitude
float
Initial strength of the mixer. (Should be << 1.)
decay
float
To slowly turn off the mixer, we divide amplitude by decay after each sweep. (Should be >= 1.)
disable_after
int
We disable the mixer completely after this number of sweeps.

perturb_svd
(engine, theta, i0, update_LP, update_RP)[source]¶ Perturb the wave function and perform an SVD with truncation.
 Parameters
 Returns
U (
Array
) – Leftcanonical part of theta. Labels'(vL.p0)', 'vR'
.S (1D ndarray  2D
Array
) – Without mixer just the singluar values of the array; with mixer it might be a general matrix; see comment above.VH (
Array
) – Rightcanonical part of theta. Labels'vL', '(vR.p1)'
.err (
TruncationError
) – The truncation error introduced.