Hello Leo!
Perform the eigendecomposition of your matrix and then take the square-root of your eigenvalues. (If any of your eigenvalues of your semi-definite matrix show up as numerically negative, replace them with zero.)
For more detail, see this post:
Best.
K. Frank