import torch


def rand_stiefel(n,p):
    """
    Generate random Stiefel point using qr of random normally distributed
    matrix
    """
    X = torch.randn(n, p)
    q, r = torch.qr(X)
    return q