Add QR decomposition function