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') tuple[TypeAliasForwardRef('~seemps.state.MPS'), float][source]#
Solve an inverse problem \(A x = b\) for an MPO A and an MPS b using DMRG.
Given the
MPOA and theMPSb, use the DMRG method to estimate another MPS that solves the linear system of equations \(A \\psi = b\). Convergence is determined by the residual \(\\Vert{A \\psi - b}\\Vert\) being smaller than tol.- Parameters:
- A
MPO The linear operator that on the left-hand-side of the equation.
- b
MPS The state at the right-hand-side of the equation.
- guess
MPS,default=b An initial guess for the ground state.
- maxiter
int,default= 20 Maximum number of steps of the DMRG. Each step is a sweep that runs over every pair of neighborin sites. Defaults to 20.
- atol, rtol
float Absolute and relative tolerance for the convergence of the algorithm. norm(A@x - b) <= max(rtol * norm(b), atol). Defaults are rtol=1e-5 and atol=0
- strategy
Strategy,default=DEFAULT_STRATEGY Truncation strategy to keep bond dimensions in check. Defaults to DEFAULT_STRATEGY, which is very strict.
- method: str, default = ‘bicgstab’
One of ‘cg’, ‘bicg’, ‘bicgstab’
- A
- Returns:
MPSThe unknown \(x\).
floatResidual \(\Vert{A x - b}\Vert\).