seemps.solve.dmrg_solve#
- seemps.solve.dmrg_solve(A: MPO, b: MPS, guess: TypeAliasForwardRef('~seemps.state.MPS') | None = None, maxiter: int = 20, atol: float = 0, rtol: float = 1e-5, strategy: Strategy = DEFAULT_STRATEGY, method: str = 'bicgstab', compute_residuals: bool = True) tuple[TypeAliasForwardRef('~seemps.state.MPS'), float | None][source]#
Solve \(A x = b\) for an MPO A and an MPS b using two-site DMRG.
- Parameters:
- A
MPO Linear operator on the left-hand side.
- b
MPS Right-hand side.
- guess
MPS|None,default=None Initial guess (defaults to b).
- maxiter
int,default= 20 Maximum number of sweeps.
- atol, rtol
float Convergence tolerance. With
compute_residuals=True, convergence requiresnorm(A@x - b) <= max(rtol * norm(b), atol). Withcompute_residuals=False, the relative change of the solution between sweeps is used instead. Defaults are rtol=1e-5 and atol=0.- strategy
Strategy,default=DEFAULT_STRATEGY Truncation strategy for the bond dimension.
- method
str,deafult= ‘bicgstab’ Iterative solver:
'cg','bicg','bicgstab','gmres', or'lgmres'.- compute_residualsbool,
default=True If True, check the full residual at each sweep for convergence (robust). If False, use a cheaper relative-change criterion (faster).
- A
- Returns: