({{, (RefLink[GaussianSymplecticMatrixDistribution, paclet:ref/GaussianSymplecticMatrixDistribution])[σ,n] 
represents a Gaussian symplectic matrix distribution with matrix dimensions {2 n,2 n} over the field of complex numbers and scale parameter σ.}, {, (RefLink[GaussianSymplecticMatrixDistribution, paclet:ref/GaussianSymplecticMatrixDistribution])[n]
represents a Gaussian symplectic matrix distribution with unit scale parameter.}})

OpenersNotesSection(Spacer1)Details

(RefLink[GaussianSymplecticMatrixDistribution, paclet:ref/GaussianSymplecticMatrixDistribution]) is also known as Gaussian symplectic ensemble, or GSE.

(RefLink[GaussianSymplecticMatrixDistribution, paclet:ref/GaussianSymplecticMatrixDistribution]) is a distribution of symplectic Hermitian matrix (x+(x^†)-J.(((x+(x^†)))^ᵀ).J)/4, where x is a complex square matrix with independent identically distributed real and imaginary matrix elements that follow (RefLink[NormalDistribution, paclet:ref/NormalDistribution])[0,σ], and where J is the skew-symmetric matrix (RefLink[KroneckerProduct, paclet:ref/KroneckerProduct])[{{0,-1},{1,0}},(RefLink[IdentityMatrix, paclet:ref/IdentityMatrix])[n]].

Quaternion Hermitian matrix z in a Gaussian symplectic matrix distribution has the block structure (({{(Subscript[z, 0])+i (Subscript[z, 1]), (Subscript[z, 2])+i (Subscript[z, 3])}, {i (Subscript[z, 3])-(Subscript[z, 2]), (Subscript[z, 0])-i (Subscript[z, 1])}})), where (Subscript[z, 0]) is a real symmetric matrix with matrix dimensions {n,n}, and (Subscript[z, 1]), (Subscript[z, 2]),(Subscript[z, 3]) are real anti-symmetric matrices with matrix dimensions {n,n}.

The probability density for z is proportional to exp(-(1/(2(σ^2))) Tr[z.z]).

The scale parameter σ can be any positive number and dimension parameter n can be any positive integer.

(RefLink[GaussianSymplecticMatrixDistribution, paclet:ref/GaussianSymplecticMatrixDistribution]) can be used with such functions as (RefLink[MatrixPropertyDistribution, paclet:ref/MatrixPropertyDistribution]), (RefLink[EstimatedDistribution, paclet:ref/EstimatedDistribution]), and (RefLink[RandomVariate, paclet:ref/RandomVariate]).

OpenersPrimaryExamplesSection(Spacer1)Examples  (13)

OpenersExampleSection0(Spacer1)Basic Examples  (3)

Generate a pseudorandom matrix:

n=50;
mat=RandomVariate[GaussianSymplecticMatrixDistribution[n]];

MatrixPlot[mat//Arg,PlotTheme->"Minimal",ImageSize->Small]

Check that the matrix is Hermitian:

HermitianMatrixQ[mat]

Check that is also quaternion self-dual:

𝒥=KroneckerProduct[{{0,-1},{1,0}},IdentityMatrix[n]];
mat.𝒥==𝒥.Transpose[mat]

Represent the joint distribution of eigenvalues of a random matrix by (RefLink[MatrixPropertyDistribution, paclet:ref/MatrixPropertyDistribution]) and sample from it:

RandomVariate[MatrixPropertyDistribution[Eigenvalues[x],x\[Distributed]GaussianSymplecticMatrixDistribution[4]]]

Mean and variance:

Mean[GaussianSymplecticMatrixDistribution[1,2]]//MatrixForm

Variance[GaussianSymplecticMatrixDistribution[1,2]]//MatrixForm

OpenersExampleSection1(Spacer1)Scope  (4)

Generate a single pseudorandom matrix:

RandomVariate[GaussianSymplecticMatrixDistribution[2]]

Generate a set of pseudorandom matrices:

RandomVariate[GaussianSymplecticMatrixDistribution[2],2]

Compute statistical properties numerically:

λmax𝒟=MatrixPropertyDistribution[Max[Eigenvalues[𝓂]],𝓂\[Distributed]GaussianSymplecticMatrixDistribution[25]];

NExpectation[(Sqrt[1+(λ^2)]),λ\[Distributed]λmax𝒟]

Distribution parameters estimation:

dist=GaussianSymplecticMatrixDistribution[3,3];sample=RandomVariate[dist,10^3];

Estimate the distribution parameters from sample data:

edist=EstimatedDistribution[sample,GaussianSymplecticMatrixDistribution[σ,n]]

Compare (RefLink[LogLikelihood, paclet:ref/LogLikelihood]) of the distributions:

LogLikelihood[#,sample]&/@{edist,dist}

OpenersExampleSection3(Spacer1)Applications  (2)

Sample eigenvalue spacing distribution in a 2-by-2 GSE matrix:

dist=MatrixPropertyDistribution[{-1,1}.MinMax[Eigenvalues[𝓂]],𝓂\[Distributed]GaussianSymplecticMatrixDistribution[2]];

gaps=Normalize[RandomVariate[dist,10000],Mean];

Compare the histogram with the closed form, also known as Wigner surmise for Dyson index β=4:

WignerSurmisePDF[x_,β:4]:=(64/(9 Pi))^3 x^4 Exp[(-64/(9 Pi)) x^2]

Show[Histogram[gaps,{0.1},PDF],Plot[WignerSurmisePDF[x,4],{x,0,2.5}]]

Sample the joint distribution of eigenvalues of 2-by-2 GSE matrix:

λ𝒟=MatrixPropertyDistribution[Eigenvalues[𝓂],𝓂\[Distributed]GaussianSymplecticMatrixDistribution[2]];

Generically, eigenvalues have multiplicity 2:

RandomVariate[λ𝒟]//Tally

Use (RefLink[RandomSample, paclet:ref/RandomSample]) to randomly permute eigenvalues to compensate for algorithm-specific ordering:

evs=RandomSample[Take[Sort[#],{1,-1,2}]]&/@RandomVariate[λ𝒟,10^5];

Visualize estimated density:

SmoothHistogram3D[evs]

Compare the estimated density to the known closed form result:

LevelDistribution[n_Integer,β_]:=ProbabilityDistribution[(1/(((2π))^(n/2)))((∏_j^n)((Gamma[1+(β/2)])/(Gamma[1+((β j)/2)])))((∏_(i=1)^n)(∏_j^(i-1))((Abs[(Subscript[λ, i])-(Subscript[λ, j])])^β))Exp[-(1/2)(∑_(i=1)^n)((Subscript[λ, i])^2)],Array[{(Subscript[λ, #]),-∞,∞}&,n,1,Sequence]]

Evaluate the density for the case of 2-by-2 GSE matrices:

pdf=PDF[LevelDistribution[2,4],{λ1,λ2}]

Compare the density to the histogram density estimate from the sample:

Show[Histogram3D[evs,{0.5},PDF,ChartStyle->Opacity[0.5],PlotRange->All],
Plot3D[pdf,{λ1,-4,4},{λ2,-4,4},PlotStyle->None,MeshStyle->Thick,PlotRange->All]]

Confirm the agreement with a goodness-of-fit test:

DistributionFitTest[evs,LevelDistribution[2,4]]

OpenersExampleSection4(Spacer1)Properties & Relations  (4)

Each realization of (RefLink[GaussianSymplecticMatrixDistribution, paclet:ref/GaussianSymplecticMatrixDistribution]) is a Hermitian matrix:

n=500;
mat=RandomVariate[GaussianSymplecticMatrixDistribution[n]];

HermitianMatrixQ[mat]

Furthermore, a sample matrix from (RefLink[GaussianSymplecticMatrixDistribution, paclet:ref/GaussianSymplecticMatrixDistribution]) satisfies quaternion self-duality condition:

𝒥=KroneckerProduct[{{0,-1},{1,0}},IdentityMatrix[n,SparseArray]];
mat.𝒥==𝒥.Transpose[mat]

(RefLink[MatrixExp, paclet:ref/MatrixExp]) applied to i x with x sampled from (RefLink[GaussianSymplecticMatrixDistribution, paclet:ref/GaussianSymplecticMatrixDistribution]) is unitary symplectic matrix:

m=MatrixExp[I RandomVariate[GaussianSymplecticMatrixDistribution[2]]]

UnitaryMatrixQ[m]

𝒥=KroneckerProduct[{{0,-1},{1,0}},IdentityMatrix[2,SparseArray]];
Chop[m.𝒥.Conjugate[m]]==𝒥

Spectral density of large GSE matrix converges to (RefLink[WignerSemicircleDistribution, paclet:ref/WignerSemicircleDistribution]):

n=300;
eigvs=RandomVariate[MatrixPropertyDistribution[Eigenvalues[x],x\[Distributed]GaussianSymplecticMatrixDistribution[n]],20];

Compare the histogram with the PDF:

Show[Histogram[(Join@@eigvs)/Sqrt[2n],{0.1},PDF],Plot[PDF[WignerSemicircleDistribution[2],x],{x,-2,2}]]

The distribution of scaled largest eigenvalue of large GSE matrices converges to (RefLink[TracyWidomDistribution, paclet:ref/TracyWidomDistribution]):

n=256;
le=RandomVariate[MatrixPropertyDistribution[(Max[Eigenvalues[x]]-2Sqrt[2.n])(n/4)^(1/6),x\[Distributed]GaussianSymplecticMatrixDistribution[n]],512];

Compare sample histogram with the (RefLink[PDF, paclet:ref/PDF]) of (RefLink[TracyWidomDistribution, paclet:ref/TracyWidomDistribution])[4]:

Show[Histogram[le,Automatic,PDF],Plot[PDF[TracyWidomDistribution[4],x ],{x,-5,2},PlotStyle->Thick]]

({{DocumentationFooterIconsRelatedFunction.png, ({{See Also}, {(RefLink[GaussianUnitaryMatrixDistribution, paclet:ref/GaussianUnitaryMatrixDistribution])  ▪  (RefLink[GaussianOrthogonalMatrixDistribution, paclet:ref/GaussianOrthogonalMatrixDistribution])  ▪  (RefLink[MatrixPropertyDistribution, paclet:ref/MatrixPropertyDistribution])  ▪  (RefLink[MatrixNormalDistribution, paclet:ref/MatrixNormalDistribution])  ▪  (RefLink[HermitianMatrixQ, paclet:ref/HermitianMatrixQ])}})}})

({{DocumentationFooterIconsRelatedGuide.png, ({{Related Guides}, {▪(RefLinkPlain[Matrix Distributions, paclet:guide/MatrixDistributions])}})}})