seemps.solve.bicgs_solve#

seemps.solve.bicgs_solve(A: TypeAliasForwardRef('~seemps.operators.MPO') | TypeAliasForwardRef('~seemps.operators.MPOList') | TypeAliasForwardRef('~seemps.operators.MPOSum'), b: TypeAliasForwardRef('~seemps.state.MPS') | TypeAliasForwardRef('~seemps.state.MPSSum'), guess: TypeAliasForwardRef('~seemps.state.MPS') | None = None, maxiter: int = 100, atol: float = 0.0, rtol: float = 1e-5, strategy: Strategy = DEFAULT_STRATEGY) tuple[TypeAliasForwardRef('~seemps.state.CanonicalMPS'), float][source]#

Approximate solution of \(A \psi = b\).

Given the MPO A and the MPS b, use the conjugate gradient method to estimate another MPS that solves the linear system of equations \(A \psi = b\).

Parameters:
AMPO | MPOList | MPOSum

Matrix product state that will be inverted

bMPS | MPSSum

Right-hand side of the equation

maxiterint, default = 100

Maximum number of iterations

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.

Returns:
MPS

Approximate solution to \(A ψ = b\)

float

Norm square of the residual \(\Vert{A \psi - b}\Vert^2\)