You are absolutely right @KFrank ! Thanks for pointing out that singular values, and not eigenvalues, are what’s needed here.
A small suggestion: It’s probably worth clarifying the in the code that you used the last right eigenvector, perhaps changing it to torch.linalg.svd(vectors).Vh[-1] adds a little more insight into the entire solution?