Engineering Stable Discrete-Time Quantum Dynamics via a Canonical QR Decomposition