Implicit QR for rank-structured matrix pencils