QZ iteration failure investigation
Kwant modes calculation is reasonably reliable. Nevertheless we know that in some cases it fails due to an instability of Schur decomposition within LAPACK. While I'm unsure if we can do anything to resolve the problem, we should try to understand what is happening. As a start we should collect specific examples of such failures.
Recently @dvarjas has encountered a modest size
(h, t) matrix pencil that causes QZ iteration to fail at almost all values of energy, this could be a good starting point.