Template Function blockLanczosBI

Function Documentation

template<typename TYPE, typename HilbertField>
bool blockLanczosBI(TYPE &H, vector<vector<HilbertField>> &phi_R, vector<vector<HilbertField>> &phi_L, vector<matrix<HilbertField>> &A, vector<matrix<HilbertField>> &B, vector<matrix<HilbertField>> &C, int &M0, bool verb = false)

Block Lanczos biorthogonalization method (non-symmetric / two-sided version)

Builds biorthogonal block Krylov subspaces for a Hermitian matrix H from separate right starting block phi_R and left starting block phi_L. Left and right Lanczos vectors W_j and V_j satisfy: <W_j[k] | V_j[l]> = delta_{kl}

The non-symmetric block three-term recurrences are: H V_j = V_{j+1} B_j + V_j A_j + V_{j-1} C_{j-1}^H H W_j = W_{j+1} C_j + W_j A_j^H + W_{j-1} B_{j-1}^H

The projected block-tridiagonal matrix T = W^H H V is: T[j*p+k, j*p+l] = A_j(k,l) (diagonal, generally non-Hermitian) T[j*p+k, (j+1)*p+l] = C_j^H(k,l) (superdiagonal) T[(j+1)*p+k, j*p+l] = B_j(k,l) (subdiagonal)

When phi_L == phi_R the method reduces to the standard symmetric blockLanczos, with A_j Hermitian and C_j = B_j.

Breakdown occurs when C_j becomes singular (right/left Krylov spaces become linearly dependent), which is detected and triggers an early exit.

Parameters:
  • H – Object with mult_add(x, y): y += H*x (H assumed Hermitian: H = H^H)

  • phi_R – Right starting block: p vectors of dimension dim. Not modified on output.

  • phi_L – Left starting block: p vectors of dimension dim. Not modified on output.

  • A – Diagonal blocks A_j (output). Not Hermitian in general when phi_L != phi_R.

  • B – Right off-diagonal blocks B_j (upper triangular, from QR of right residual).

  • C – Left off-diagonal blocks C_j (from biorthogonal factorisation of left residual).

  • M0 – Maximum number of block steps on input; actual number on output.

  • verb – Verbose flag.

Returns:

true if the off-diagonal block norms fell below accur_band_lanczos.