In Mathematica, I can sample a n=1000
normalized Gaussian Orthogonal Ensemble GOE matrix:
n = 1000; m =
RandomVariate[
GaussianOrthogonalMatrixDistribution[Sqrt[2]/Sqrt[n], n]];
And I can get eigenvectors and eigenvalues and ordering them:
{eval, evec} = Eigensystem[m];
imin = Ordering[eval, 1][[1]];
lambda2minlambda1 = Sort[eval][[2]] - Sort[eval][[1]];
How can do this one in Python?
pip install scikit-rmt
# sampling a GOE matrix of size 1000x1000
n=1000
goe = GaussianEnsemble(beta=1, n=n)
# plotting its spectral distribution in the interval (-2,2)
goe.plot_eigval_hist(bins=80, interval=(-2,2), density=True)
But I am not sure if it is normalized. And how to get the eigenvalues and order them?
Aucun commentaire:
Enregistrer un commentaire