Generating Random Gaussian States

Initialization

Get["http://www.fmt.if.usp.br/~gtlandi/download/melt.m"]
LoadPlotStyling[];

Needs["MaTeX`"];
SetOptions[MaTeX,
"Preamble"->{"
\\usepackage{xcolor,txfonts} 
\\usepackage{amsmath}
\\DeclareMathOperator*{\\argmax}{arg\\,max}
\\DeclareMathOperator*{\\argmin}{arg\\,min}
\\definecolor{royalpurple}{HTML}{7851a9}
\\definecolor{RoyalBlue}{rgb}{0.25, 0.41, 0.88}
"}];

https://mathematica.stackexchange.com/questions/6355/how-can-one-define-an-infix-operator-with-an-arbitrary-unicode-character

(*Defines an arbitrary binary operation with Infix*)

MakeExpression[RowBox[{x_,"⊞",y_}],StandardForm]:=MakeExpression[RowBox[{"FlatJoin","[",x,",",y,"]"}],StandardForm]

FlatJoin/:MakeBoxes[FlatJoin[x_,y_],StandardForm]:=RowBox[{MakeBoxes[x,StandardForm],"⊞",MakeBoxes[y,StandardForm]}]

Random Quantum Covariance Matrix

We first define the symplectic form:

J[n_]:=KroneckerProduct[IdentityMatrix[n/2],(({{0, 1}, {-1, 0}}))];
J[4]//MatrixForm
Eigenvalues@(I %)

And GOE matrices with variance (σ^2):

ClearAll[GOE]
G[n_,σ_:1]:=(1/(Sqrt[n]))RandomVariate@GaussianOrthogonalMatrixDistribution[σ, 2n];
G[1]//MatrixForm

Generating Random Gaussian States

The ensemble of Random Quantum Covariance Matrices (RQCM), denoted by RQCM(2n, σ), has elements:

(Subscript[S, G]) := G + (Subscript[λ, max])[i (Subscript[J, 2n]) - G](Subscript[I, 2n])
 
 There G is drawn from the GOE ensemble G ∈ GOE(2n, σ) and (Subscript[J, 2n])  is the symplectic form defined above.

(*Finds the closest valid CM to G*)
ClosestGaussian[G_]:=With[{λ=Max@Eigenvalues[I J[Length@G]-G]},
G+Max@{0,λ }IdentityMatrix[Length@G]
]

(*Generates a RQCM*)
RQCM[n_, σ_:1]:=ClosestGaussian[G[n,σ]]

Validity of Gaussian states: 

A valid CM should obey

S + i (Subscript[J, 2n]) ≥ 0,

which we can express in terms of its minimum eigenvalue. Namely, it should be larger than or equal than zero.

GaussianQ[G_]:=Min@Eigenvalues[G+I J[Length@G]];

So, consider the GOE matrix:

(Subscript[G, 0])=G[1];(Subscript[G, 0])//MatrixForm

This is not a valid CM, since we have:

GaussianQ@(Subscript[G, 0])

However, by properly shifting it, we get a valid Gaussian state:

H=ClosestGaussian@(Subscript[G, 0]);H//MatrixForm

(*Smallest eigenvalue of H - (Subscript[iJ, 2n]), should be non-negative*)
Chop@GaussianQ@H

Eigenvalues of the RQCM ensemble

For convenience we define the “numerical Free Convolution”:

A_ ⊞ B_:=Eigenvalues[A+B];

In order to find the distribution of eigenvalues in the QRCM ensemble, we compute the convolution (numerically) of three different GOE matrices with the symplectic form -- changing σ:

n = 1000;
(Subscript[μ, σ])=G[n,#]⊞ (I J[2n])&/@{2,1,0.5};

Analytically, the distribution looks like:

R[σ_]:=(1+(σ/4)((Sqrt[8+(σ^2)])-σ))(Sqrt[1+(σ/2)((Sqrt[8+(σ^2)])+σ)]);
DSc[x_,σ_]:=(((Sqrt[4(σ^2)-(((x-m))^2)])/(2π (σ^2)))Boole[Abs[x-m]<2σ])/.(m-> R[σ]);

By doing so, we get:

GaussianMeasurePlot=Show[
Histogram[
(Subscript[μ, σ])
,{"Raw",50}
,"PDF" (*PDF and not probability here*)
,Frame->True
,FrameLabel->{MaTeX["x",Magnification->1.5],MaTeX["\\mu_\\sigma(x)",Magnification->1.5]}
,PlotRangeClipping->False
,LabelStyle->Directive[Black,FontFamily->"Times", 14]
,ChartStyle->{RGBColor[0.32,0.7,0.34],RGBColor[0.5,0.27,0.5],RGBColor[1,0.51,0.5]}
,ImageSize->400
,PlotRange->{0,0.5}
,ChartLegends->Placed[SwatchLegend[{MaTeX[StringTemplate["`1`"][#],Magnification-> 1.25]&/@{"2","1","0.5"}},LegendLabel->MaTeX["\\sigma",Magnification-> 1.5]],{1.0,0.5}]
]
(*,Plot[DSc[x,#]&/@{2,1,0.5}//Evaluate
,{x,-5,5}
,PlotStyle->{RGBColor[0.32,0.7,0.34],RGBColor[0.5,0.27,0.5],RGBColor[1,0.51,0.5]}
]*)
]

Measure of the QRCMs: 

Since the symplectic form has just eigenvalues +1 or -1, it works as a “Bernoulli distribution”, and the result above corresponds to the convolution:

((1/2)(Subscript[δ, 1]) +(1/2) (Subscript[δ, -1])) ⊞ (Subscript[SC, σ]), where (Subscript[SC, σ]) is the semicircular distribution (Subscript[SC, σ]) := ((Sqrt[4(σ^2)-(((x-m))^2)])/(2π (σ^2)))(Subscript[1, |x<2σ|])(x)dx.

The analytical result can be obtained by using the Stieltjes’ inversion formula from the R-transform obtained from this problem:

(Subscript[ℛ, (Subscript[μ, σ])])(z) = (Subscript[ℛ, Bernoulli])(z) + (Subscript[ℛ, (Subscript[SC, σ])])(z) = (((Sqrt[1 + 4(z^2)]) -1)/(2z))+ σ z.

which lead us to some complicated cubic roots.

Very interestingly, we can see that we have “phase-transition” on the support of the matrices of this example at σ = 1. One has:

• Support on two intervals for σ > 1
• Support on a single interval for  σ < 1

Note that a similar convolution with CUE instead of GOE matrices leads to a very different distribution. Namely, the arcsine distribution:


This arises, for example, when one computes the eigenvalues of U A U † + B, with A and B being diagonal and deterministic and U being a CUE element.

One of the useful things we can do with these results is to compute a few relevant quantities from the RQCM. For instance, let us consider the purity:

𝒫[S_]:=(1/(Sqrt[Det[S]]));

We compute it for σ = 0.5 and σ = 2:

PurityListA=𝒫/@(RQCM[#, 0.5]&/@Range[1,30]);
PurityListB=𝒫/@(RQCM[#, 2]&/@Range[1,30]);

Purity of the QRCM: 

For a normalized RQCM(2n, (σ/(Sqrt[2n]))), we can define the quantity:

LD(σ) := (∫_(R(σ) - 2σ)^(R(σ) + 2σ)) ln(x) (Subscript[dSC, R(σ), σ])(x);

such that, for asymptotic n, we have

-(1/n)log 𝒫(S)  → LD(σ). Or, equivalently:

𝒫(S)   ~ (e^(-n LD(σ) ))

The dashed lines correspond to the analytical prediction:

LD[σ_]:=NIntegrate[Log[x]DSc[x,σ],{x,R[σ]-2σ, R[σ]+2σ}]

ldA=LD[0.5];
ldB=LD[2];
Show[
(*Numerics*)
ListLogPlot[
{PurityListA,PurityListB}
,Joined->True
,PlotStyle->{RGBColor[0.32,0.7,0.34],RGBColor[1,0.51,0.5]}
,FrameTicks->{{logticks[-20,2,3],Automatic},{Automatic,Automatic}}
,FrameLabel->{MaTeX["n",Magnification-> 2],MaTeX["\\mathcal{P}(S_\\rho)",Magnification-> 2]}
,PlotLegends->Placed[SwatchLegend[
MaTeX[StringTemplate["`1`"][#],Magnification-> 1.25]&/@{"0.5","2"}
,LegendLabel->MaTeX["\\sigma",Magnification-> 1.5]]
,{1.0,0.5}
]
,ImageSize->400
],

(*Analytics*)
LogPlot[
{Exp[-n ldA],Exp[-n ldB]}
,{n,1,30}
,PlotStyle-> {{Black,Dashed},{Black,Dashed}}
]
]

Finally, in the paper they also provide analytical computations for the symplectic eigenvalues  from the 𝒮-transform. We omit that part here and show only the numerics. Nevertheless, this computation is useful be cause 

i) it immediately provides an energy upper bound for the CM, and

ii) also provides insight in any quantities which might depend on them.

See a review on: https://arxiv.org/pdf/2106.11965. 

- A pedagogical tutorial on symplectic eigenvalues (Subscript[ν, i]) and derivations can be found here: https://markwilde.com/teaching/2019-spring-gqi/scribe-notes/lecture-10-scribed.pdf

Show[
Histogram[
SymplecticEigenvalues@RQCM[500,#]&/@{2,1,0.5}
,{"Raw",50}
,"PDF" (*PDF and not probability here*)
,Frame->True
,FrameLabel->{MaTeX["x",Magnification->1.5],MaTeX["\\nu_i",Magnification->1.5]}
,PlotRangeClipping->False
,LabelStyle->Directive[Black,FontFamily->"Times", 14]
,ChartStyle->{RGBColor[0.32,0.7,0.34],RGBColor[0.5,0.27,0.5],RGBColor[1,0.51,0.5]}
,ImageSize->400
,PlotRange->{0,1}
,ChartLegends->Placed[SwatchLegend[{MaTeX[StringTemplate["`1`"][#],Magnification-> 1.25]&/@{"2","1","0.5"}},LegendLabel->MaTeX["\\sigma",Magnification-> 1.5]],{1.0,0.5}]
]
]

Note that the smaller the value of σ, the more concentrated the symplectic eigenvalues are around 1, and the purer the state is.