Returns:
      A named tuple (Q, R).
Examples:
  >>> A = torch.tensor([[12., -51, 4], [6, 167, -68], [-4, 24, -41]])
  >>> Q, R = torch.linalg.qr(A)
  >>> Q
  tensor([[-0.8571,  0.3943,  0.3314],
          [-0.4286, -0.9029, -0.0343],
          [ 0.2857, -0.1714,  0.9429]])
  >>> R
  tensor([[ -14.0000,  -21.0000,   14.0000],
          [   0.0000, -175.0000,   70.0000],
          [   0.0000,    0.0000,  -35.0000]])
  >>> (Q @ R).round()
  tensor([[  12.,  -51.,    4.],
          [   6.,  167.,  -68.],
          [  -4.,   24.,  -41.]])
  >>> (Q.T @ Q).round()
  tensor([[ 1.,  0.,  0.],
          [ 0.,  1., -0.],
          [ 0., -0.,  1.]])
  >>> Q2, R2 = torch.linalg.qr(A, mode='r')
  >>> Q2
  tensor([])
  >>> torch.equal(R, R2)
  True
  >>> A = torch.randn(3, 4, 5)
  >>> Q, R = torch.linalg.qr(A, mode='complete')
  >>> torch.dist(Q @ R, A)
  tensor(1.6099e-06)
