torch.linalg.qr
torch.linalg.qr(A, mode='reduced', *, out=None)
Computes the QR decomposition of a matrix.
Letting \mathbb{K} be \mathbb{R} or \mathbb{C}, the full QR
   decomposition of a matrix A \in \mathbb{K}^{m \times n} is
   defined as
  A = QR\mathrlap{\qquad Q \in \mathbb{K}^{m \times m}, R \in
  \mathbb{K}^{m \times n}}

where Q is orthogonal in the real case and unitary in the complex
   case, and R is upper triangular with real diagonal (even in the
   complex case).
When m > n (tall matrix), as R is upper triangular, its last m
   - n rows are zero. In this case, we can drop the last m - n
   columns of Q to form the reduced QR decomposition:
  A = QR\mathrlap{\qquad Q \in \mathbb{K}^{m \times n}, R \in
  \mathbb{K}^{n \times n}}

The reduced QR decomposition agrees with the full QR decomposition
   when n >= m (wide matrix).
Supports input of float, double, cfloat and cdouble dtypes. Also