Template Function blockLanczosSVD

Function Documentation

template<typename TYPE, typename HilbertField>
bool blockLanczosSVD(TYPE &H, vector<vector<HilbertField>> &phi, vector<matrix<HilbertField>> &A, vector<matrix<HilbertField>> &B, int &M0, bool verb = false)

Block Lanczos method with Hermitian (polar-decomposition) off-diagonal blocks.

Variant of blockLanczos() in which the off-diagonal coupling blocks B[j] are Hermitian positive semi-definite instead of upper-triangular.

The block three-term recurrence is identical: H Q_j = Q_{j-1} B_{j-1}^H + Q_j A_j + Q_{j+1} B_j

but now B_j = B_j^H (Hermitian PSD), so the projected block-tridiagonal matrix has equal sub- and super-diagonal blocks: T[j,j+1] = B_j = T[j+1,j]^H.

This is achieved by replacing the QR factorisation of the residual block Z with a polar decomposition:

  1. Compute the p×p Gram matrix G_{kl} = <Z[k]|Z[l]>

  2. Eigendecompose G = V D V^H (D real non-negative)

  3. B_j = V sqrt(D) V^H (Hermitian square root of G)

  4. Q_{j+1}[:,l] = sum_k (V D^{-1/2} V^H)_{kl} Z[k]

Deflation is triggered when a singular value sqrt(D[m]) < accur_deflation.

Parameters:
  • H – Object with a mult_add(x, y) method: y += H*x

  • phi – Starting block of p vectors (each of size dim). Orthonormalized internally.

  • A – Diagonal blocks A[j] (p×p Hermitian matrices, output).

  • B – Off-diagonal blocks B[j] (p×p Hermitian PSD matrices, output).

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

  • verb – Verbose flag.

Returns:

true if the lowest eigenvalue converged within M0 steps, false otherwise.