({{, (RefLink[CircularUnitaryMatrixDistribution, paclet:ref/CircularUnitaryMatrixDistribution])[n] 
represents a circular unitary matrix distribution with matrix dimensions {n,n}.}})

OpenersNotesSection(Spacer1)Details

(RefLink[CircularUnitaryMatrixDistribution, paclet:ref/CircularUnitaryMatrixDistribution]) is also known as circular unitary ensemble, or CUE.

(RefLink[CircularUnitaryMatrixDistribution, paclet:ref/CircularUnitaryMatrixDistribution]) represents a uniform distribution over the unitary square matrices of dimension n, also known as the Haar measure on the unitary group U(n).

The dimension parameter n can be any positive integer.

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

OpenersPrimaryExamplesSection(Spacer1)Examples  (11)

OpenersExampleSection0(Spacer1)Basic Examples  (2)

Generate a random CUE matrix:

RandomVariate[CircularUnitaryMatrixDistribution[3]]

Verify that the matrix is unitary:

UnitaryMatrixQ[%]

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

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

OpenersExampleSection1(Spacer1)Scope  (3)

Generate a random unitary matrix:

RandomVariate[CircularUnitaryMatrixDistribution[2]]

Generate a set of random unitary matrices:

RandomVariate[CircularUnitaryMatrixDistribution[2],2]

Compute statistical properties numerically:

gap𝒟=MatrixPropertyDistribution[Max[Differences[Sort[Arg[Eigenvalues[𝓂]]]]],𝓂\[Distributed]CircularUnitaryMatrixDistribution[50]];

NExpectation[Sinc[δ],δ\[Distributed]gap𝒟]

OpenersExampleSection3(Spacer1)Applications  (4)

Define distribution of complex arguments of random matrix eigenvalues:

evs𝒟=MatrixPropertyDistribution[Arg[Eigenvalues[x]],x\[Distributed]CircularUnitaryMatrixDistribution[2]];

Sample the phases of eigenvalues followed by random permutations:

φs=RandomSample/@RandomVariate[evs𝒟,10^5];

Visualize joint phase distribution together with the closed form (RefLink[PDF, paclet:ref/PDF]):

Show[
Histogram3D[φs,{-Pi,Pi,0.25},PDF],
Plot3D[(1/(8(Pi^2)))Abs[Exp[I ϕ1]-Exp[I ϕ2]]^2,{ϕ1,-Pi,Pi},{ϕ2,-Pi,Pi},PlotStyle->None,MeshStyle->Thick]]

The number of permutations ℐ(k,n) of k elements in which the longest increasing subsequence is at most of length n can computed by averaging over ((Abs[Tr[(Subscript[𝒰, n])]])^(2 k)), where (Subscript[𝒰, n]) are drawn from (RefLink[CircularUnitaryMatrixDistribution, paclet:ref/CircularUnitaryMatrixDistribution])[n]:

{k,n}={6,2};

NExpectation[ℐ,ℐ\[Distributed]MatrixPropertyDistribution[((Abs[Tr[𝒰]])^(2k)),𝒰\[Distributed]CircularUnitaryMatrixDistribution[n]]]

Compare with direct count:

Count[Permutations[Range[k]],perm_/;Length[LongestOrderedSequence[perm]]≤n]

The joint distribution of the eigenvalues for (RefLink[CircularUnitaryMatrixDistribution, paclet:ref/CircularUnitaryMatrixDistribution]) is also Boltzmann distribution of Dyson's Coulomb gas on a circle with inverse temperature β==2. The average Hamiltonian per particle of the system is (without kinetic terms):

hamiltonian[Z_]:=Module[{n=Length[Z]},
Log[n]/2-Sum[Total[Log[Abs[Differences[Z,1,k]]]],{k,n-1}]/n
]

Define the distribution of the value of the Hamiltonian on random CUE matrix:

h𝒟=MatrixPropertyDistribution[hamiltonian[Eigenvalues[x]],x\[Distributed]CircularUnitaryMatrixDistribution[n]];

Compute the sample mean of the Hamiltonian for systems of different size:

means=Table[{n,Mean[RandomVariate[h𝒟,1000]]},{n,10,60,10}]

Plot the sample means and compare them with thermodynamic limit:

Show[ListPlot[means,PlotStyle->{Red,PointSize[Medium]},Filling->Axis,PlotRange->{0,0.22},AxesLabel->{"N","⟨H⟩"}],Plot[((1-EulerGamma)/2),{x,0,60}]]

Construct Brownian motion on CUE by using matrices from (RefLink[GaussianUnitaryMatrixDistribution, paclet:ref/GaussianUnitaryMatrixDistribution]) as infinitesimal generators:

mats=RandomVariate[GaussianUnitaryMatrixDistribution[0.1,2],100000];
mats=MatrixExp[I #]&/@mats;

Generate a Brownian path with initial matrix sampled from (RefLink[CircularUnitaryMatrixDistribution, paclet:ref/CircularUnitaryMatrixDistribution]):

initial=RandomVariate[CircularUnitaryMatrixDistribution[2]];
res=FoldList[#2.#1&,initial,mats];

Compute the phase of the eigenvalues and compare them with the PDF of the eigenvalues of matrices from (RefLink[CircularUnitaryMatrixDistribution, paclet:ref/CircularUnitaryMatrixDistribution]):

phases=RandomSample/@Arg[Eigenvalues/@res];

Show[
Histogram3D[phases,{-Pi,Pi,0.25},PDF],
Plot3D[(1/(8(Pi^2)))Abs[Exp[I ϕ1]-Exp[I ϕ2]]^2,{ϕ1,-Pi,Pi},{ϕ2,-Pi,Pi},PlotStyle->None,MeshStyle->Thick]]

OpenersExampleSection4(Spacer1)Properties & Relations  (2)

Distribution of phase angle of the eigenvalues:

dim=300;
args=RandomVariate[MatrixPropertyDistribution[Arg[Eigenvalues[x]],x\[Distributed]CircularUnitaryMatrixDistribution[dim]],100];

Histogram[Join@@args,{-Pi,Pi,2Pi/40},PDF]

Compute the spacing between eigenvalues:

diffs=Join@@Map[Composition[Differences,Sort],(args/(2Pi))dim];

Compare the histogram of sample level spacings with the closed form, also known as Wigner surmise for Dyson index 2:

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

Show[Histogram[diffs,{0.1},PDF],Plot[WignerSurmisePDF[x,2],{x,0,2.5}]]

For eigenvectors of (RefLink[CircularUnitaryMatrixDistribution, paclet:ref/CircularUnitaryMatrixDistribution]) with dimension n large, the scaled modulus of the elements is (χ^2) distributed:

𝒟=MatrixPropertyDistribution[Flatten[Abs[Eigenvectors[𝓂]]^2],𝓂\[Distributed]CircularUnitaryMatrixDistribution[50]];

data=2Normalize[Join@@RandomVariate[𝒟,100],Mean];

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

Show[Histogram[data,"Scott",PDF],Plot[PDF[ChiSquareDistribution[2],x],{x,0,9}]]

({{DocumentationFooterIconsRelatedFunction.png, ({{See Also}, {(RefLink[CircularOrthogonalMatrixDistribution, paclet:ref/CircularOrthogonalMatrixDistribution])  ▪  (RefLink[CircularSymplecticMatrixDistribution, paclet:ref/CircularSymplecticMatrixDistribution])  ▪  (RefLink[CircularRealMatrixDistribution, paclet:ref/CircularRealMatrixDistribution])  ▪  (RefLink[CircularQuaternionMatrixDistribution, paclet:ref/CircularQuaternionMatrixDistribution])  ▪  (RefLink[MatrixPropertyDistribution, paclet:ref/MatrixPropertyDistribution])}})}})

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