  We derive a method to efficiently compute the Green function of on arbitrary
Hamiltonians defined on semi-infinite and periodic quasi-one-dimensional
lattices. Computing the Green function is the backbone of quantum transport,
electronic structure or linear response computations. Our method constitutes a
"deflation optimization" of a well established algorithm often used in quantum
transport that is based on generalized Schur factorizations of the linearized
quadratic eigenvalue equation for the transfer matrix. Our deflation
optimization may greatly reduce the number of degrees of freedom that must be
processed in the Schur factorization. Deflation must be supplemented by a
Jordan-block reconstruction of generalized eigenvectors, also developed here in
detail. The overhead of deflation plus reconstruction is minimal as compared to
the typical reduction in factorization runtime. Furthermore, by avoiding
inverses of ill-conditioned matrices, the algorithm remains numerically stable.
