Random Matrix Tools

Subroutines for producing random matrices out of classical compact Lie groups [O(N), U(N) and USp(2N)], Ginibre's Ensembles [GinOE(N), GinUE(N) and GinSE(N)], Gaussian's Ensembles [GOE(N), GUE(N) and GSE(N)] and Dyson's Circular Ensembles [COE(N), CUE(N) and CSE(N)].

 
Subroutine’s Name Precision Version Compatibility
GinOE.f Single 1.0.0 Fortran 90
Uses:  rgnf_lux.f
Description: 

Generator of REAL N x N non symmetric matrices drawn according to the Ginibre Orthogonal Ensemble.

 
Subroutine’s Name Precision Version Compatibility
GinUE.f Complex 1.0.0 Fortran 90
Uses:  rgnf_lux.f
Description: 

Generator of CPXL N x N non Hermitian matrices drawn according to the Ginibre Unitary Ensemble.

 
Subroutine’s Name Precision Version Compatibility
GinSE.f Complex 1.0.0 Fortran 90
Uses:  rgnf_lux.f
Description: 

Generator of QUATERNIONIC N x N non self dual matrices, representable as CPLX 2N x 2N ones, drawn according to the Ginibre Symplectic Ensemble.

 
Subroutine’s Name Precision Version Compatibility
GOE.f Single 1.0.0 Fortran 90
Uses:  rgnf_lux.f
Description: 

Generator of REAL N x N symmetric matrices drawn according to the Gaussian Orthogonal Ensemble.

 
Subroutine’s Name Precision Version Compatibility
GUE.f Complex 1.0.0 Fortran 90
Uses:  rgnf_lux.f
Description: 

Generator of CPXL N x N Hermitian matrices drawn according to the Gaussian Unitary Ensemble.

 
Subroutine’s Name Precision Version Compatibility
GSE.f Complex 1.0.0 Fortran 90
Uses:  rgnf_lux.f
Description: 

Generator of QUATERNIONIC N x N self dual matrices, representable as CPLX 2N x 2N ones, drawn according to the Gaussian Symplectic Ensemble.

 
The six subroutines here below, namely Haar_O_N.f , Haar_U_N.f , Haar_USp_2N.f , COE.f , CUE.f and CSE.f , are designed on the algorithms described in the interesting paper:

Francesco Mezzadri
How to Generate Random Matrices from the Classical Compact Groups
Notices of the AMS 54(5), 592-604 (2007)
 
Subroutine’s Name Precision Version Compatibility
Haar_O_N.f Single 1.0.0 Fortran 90
Uses:  rgnf_lux.f , GinOE.f
Description: 

This Program produce N x N REAL Random Orthogonal Matrices distributed according to the Haar measure, making use of the QR decomposition of N x N REAL Random (non symmetric) Matrices from the Ginibre Ensemble. The QR decomposition is performed by means of (N-1) Householder reflections.

 
Subroutine’s Name Precision Version Compatibility
Haar_U_N.f Complex 1.0.0 Fortran 90
Uses:  rgnf_lux.f , GinUE.f
Description: 

This Program produce N x N CPLX Random Unitary Matrices distributed according to the Haar measure, making use of the QR decomposition of N x N CPLX Random (non Hermitian) Matrices from the Ginibre Ensemble. The QR decomposition is performed by means of (N-1) Householder reflections.

 
Subroutine’s Name Precision Version Compatibility
Haar_USp_2N.f Complex 1.0.0 Fortran 95
Uses:  rgnf_lux.f , GinSE.f
Description: 

This program produces 2N x 2N Random Unitary Symplectic Matrices distributed according to their Haar measure, making use of the QR decomposition of 2N x 2N Quaternionic Random (non Self-Dual) Matrices from the Ginibre Ensemble. The QR decomposition is performed by means of (N-1) Householder reflections.

 
Subroutine’s Name Precision Version Compatibility
COE.f Complex 1.0.0 Fortran 90
Uses:  rgnf_lux.f , GinUE.f , Haar_U_N.f
Description: 

Produces N x N CPLX Random Unitary Symmetric matrices from the Dyson's Circular Orthogonal Ensemble [COE]. The code take N as imput and give as output a Random Matrix at each call.

 
Subroutine’s Name Precision Version Compatibility
CUE.f Complex 1.0.0 Fortran 90
Uses:  rgnf_lux.f , GinUE.f , Haar_U_N.f
Description: 

Produces N x N CPLX Random Unitary matrices from the Dyson's Circular Unitary Ensemble [CUE]. The code take N as imput and give as output a Random Matrix at each call.

 
Subroutine’s Name Precision Version Compatibility
CSE.f Complex 1.0.0 Fortran 90
Uses:  rgnf_lux.f , GinUE.f , Haar_U_N.f
Description: 

Produces 2N x 2N CPLX Random Unitary matrices from the Dyson's Circular Symplectic Ensemble [CSE]. The code take N as imput and give as output a Random Matrix at each call.

 
Figure: a test for the Dyson's Circular Ensembles

Empirical histograms of the density of the eigenvalues and of the spacing distributions compared with the Wigner Surmises for the COE, CUE and CSE. The data are computed from the eigenvalues of ten thousand 50×50 random unitary matrices, output of the subroutines COE.f, CUE.f and CSE.f. In panel (a) the density of the phases of the unimodular eigenvalues are collected in a 30 bins histogram for all the 3 universality classes, using different symbols for each of them, whereas in panel (c) the histogram consists of 700 bins and the universality classes are distinguished by changing colors. In panels (b) and (d) a similar analysis is performed on the level spacing of the phases, and the Wigner Surmises are plotted in solid black lines for comparison.