seemps.optimization.dmrg#
- seemps.optimization.dmrg(H, guess=None, maxiter=20, tol=1e-10, tol_up=None, tol_eigs=None, strategy=<seemps.state.core.Strategy object>, callback=None)[source]#
Compute the ground state of a Hamiltonian represented as MPO using the two-site DMRG algorithm.
- Parameters:
- H
MPO
|NNHamiltonian
The Hermitian operator that is to be diagonalized. It may be also a nearest-neighbor Hamiltonian that is implicitly converted to MPO.
- guess
Optional
[MPS
] An initial guess for the ground state.
- maxiter
int
Maximum number of steps of the DMRG. Each step is a sweep that runs over every pair of neighborin sites. Defaults to 20.
- tol
float
Tolerance in the energy to detect convergence of the algorithm.
- tol_up
float
,default
= tol If energy fluctuates up below this tolerance, continue the optimization.
- tol_eigs
Optional
[float
],default
= tol Tolerance of Scipy’s eigsh() solver, used internally. Zero means use machine precision.
- strategy
Strategy
Truncation strategy to keep bond dimensions in check. Defaults to DEFAULT_STRATEGY, which is very strict.
- callback
Optional
[Callable
[[MPS
,OptimizeResults
],Any
]] A callable called after each iteration (defaults to None).
- H
- Returns:
OptimizeResults
The result from the algorithm in an
OptimizeResults
object.
Examples
>>> from seemps.hamiltonians import HeisenbergHamiltonian >>> from seemps.optimization import dmrg >>> H = HeisenbergHamiltonian(10) >>> result = dmrg(H)