Template Function combine_for_gf

Function Documentation

template<typename T>
matrix_continued_fraction<T> combine_for_gf(const matrix_continued_fraction<T> &e, const matrix_continued_fraction<T> &h)

Combine two MCFs into a single one whose evaluate() gives G_h(z) + G_e(z)^T directly.

Assembles the direct-sum block-tridiagonal T = T_e ⊕ T_h (same blocks as direct_sum()) but uses a non-square weight

W_combined = [conj(W_e)] (first p rows: conjugated electron weight) [W_h ] (second p rows: hole weight)

of size 2p × p. Because W_combined has p columns, evaluate() returns a p×p Green function rather than 2p×2p:

G(z) = W_combined^H F_combined(z) W_combined = W_e^T F_e(z) W_e* + W_h^H F_h(z) W_h

For T = double (real Hamiltonian): F_e is complex-symmetric and W_e is real, so W_e^T F_e W_e* = G_e(z) = G_e(z)^T. The result is exact.

For T = Complex: exact when time-reversal symmetry ensures G_e = G_e^T (the common case). For Hamiltonians that break time-reversal the approximation replaces G_e^T with W_e^T F_e W_e*; in that case use two separate evaluate() calls instead.