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
MPOA and theMPSb, use the conjugate gradient method to estimate another MPS that solves the linear system of equations \(A \psi = b\).- Parameters:
- A
MPO|MPOList|MPOSum Matrix product state that will be inverted
- b
MPS|MPSSum Right-hand side of the equation
- maxiter
int,default= 100 Maximum number of iterations
- 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.
- A
- Returns:
MPSApproximate solution to \(A ψ = b\)
floatNorm square of the residual \(\Vert{A \psi - b}\Vert^2\)