physicskit.rmt#
physicskit.rmt – a random matrix theory library organized around Dyson’s threefold way, validated against exact theory and seminal-paper results.
- class physicskit.rmt.Spectrum(eigenvalues, n, beta, ensemble, scale=1.0, eigenvectors=None)[source]#
Bases:
objectEigenvalues drawn from a
MatrixEnsemble.- Parameters:
- beta: float | None#
Dyson index of the ensemble that produced this spectrum, or None for ensembles outside Dyson’s threefold way (e.g.
BuresHallEnsemble,GraphLaplacianEnsemble).- Type:
float or None
- eigenvalues: ndarray#
Raw (unnormalized) eigenvalues, one row per independent draw.
- Type:
numpy.ndarray, shape (n_samples, n)
- eigenvectors: ndarray | None = None#
Eigenvectors as columns, matching
eigenvaluescolumn-for-column (eigenvectors[s][:, i]is the eigenvector foreigenvalues[s, i]). Only present when the ensemble was sampled withsample(return_eigenvectors=True); None otherwise.mis usuallynbut can differ for ensembles whose eigenvalue count isn’t exactlyn(seen_sampleselsewhere in this package for the analogous eigenvalue-count caveat).- Type:
numpy.ndarray, shape (n_samples, m, n), or None
- property flat: ndarray#
All eigenvalues from all samples, raveled into one 1-D array.
- Returns:
numpy.ndarray – 1-D array of all eigenvalues, shape
(n_samples * eigenvalues.shape[1],).