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 MPO A and the MPS b, 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:
AMPO

The linear operator that on the left-hand-side of the equation.

bMPS

The state at the right-hand-side of the equation.

guessMPS, default = b

An initial guess for the ground state.

maxiterint, 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, rtolfloat

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

strategyStrategy, 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’

Returns:
MPS

The unknown \(x\).

float

Residual \(\Vert{A x - b}\Vert\).