Skip to main content

linsolve

Function linsolve 

Source
pub fn linsolve(
    operator: &TensorTrain,
    rhs: &TensorTrain,
    init: TensorTrain,
    options: &LinsolveOptions,
) -> Result<TensorTrain>
Expand description

Solve (a₀ + a₁ * A) * x = b for x.

§Arguments

  • operator - The operator A (MPO as TensorTrain)
  • rhs - The right-hand side b (MPS as TensorTrain)
  • init - Initial guess for x (MPS as TensorTrain, consumed)
  • options - Solver options

§Returns

The solution x as a TensorTrain.

§Errors

Returns an error if:

  • Any tensor train is empty
  • nhalfsweeps is not a multiple of 2
  • The solver fails internally