Codes for “Laughlin quasihole geometry from a single snapshot ensemble”
Author
Kaushlendra Kumar
Title
Codes for “Laughlin quasihole geometry from a single snapshot ensemble”
Description
Mathematica implementation of the NCS lattice-Laughlin benchmark, including single-reference kernel reconstruction, local metric and Bargmann-phase recovery, finite-shot reweighting diagnostics, and exact projective compression.
Category
Academic Articles & Supplements
Keywords
fractional quantum Hall effect, Laughlin quasihole, lattice Laughlin state, quantum geometry, quantum geometric tensor, Bargmann phase, snapshot reconstruction, importance sampling, Fisher information, projective geometry
URL
http://www.notebookarchive.org/2026-08-a5kp7qk/
DOI
https://notebookarchive.org/2026-08-a5kp7qk
Date Added
2026-08-22
Date Last Modified
2026-08-22
File Size
2.35 megabytes
Supplements
Rights
CC BY 4.0

This file contains supplementary data for Kaushlendra Kumar, “Laughlin quasihole geometry from a single snapshot ensemble.”
https://arxiv.org/abs/2608.22384
https://arxiv.org/abs/2608.22384
Codes for “Laughlin quasihole geometry from a single snapshot ensemble”
Codes for “Laughlin quasihole geometry from a single snapshot ensemble”
Kaushlendra Kumar
1. Eight-site NCS benchmark
1. Eight-site NCS benchmark
This section fixes the eight-site NCS benchmark used throughout the notebook: the Sierpiński-carpet lattice, the 56 three-particle configurations, and the parameters q = 2, p = 1 and η = 7/8. It then constructs the NCS amplitudes and Born probabilities, with the explicit wavefunction corresponding to Supplement Eq. (66) and the factorization of Eqs. (1)–(2).
In[]:=
sites=N@Flatten@Table[If[{x,y}=={0,0},Nothing,x+Iy],{y,-1,1},{x,-1,1}];ns=Length[sites];np=3;q=2;p=1;eta=(qnp+p)/ns;w0=0.6-0.3I;configs=Subsets[Range[ns],{np}];{ns,np,q,p,eta,Length[configs]}
Out[]=
8,3,2,1,,56
7
8
In[]:=
background = Table[
Exp[-eta Total[Log[Delete[sites - sites[[l]], l]]]], {l, ns}];
phi0 = Table[
Times @@ Flatten@Table[(sites[[c[[a]]]] - sites[[c[[b]]]])^q,
{a, np}, {b, a + 1, np}] * Times @@ background[[c]],
{c, configs}];
f[w_] := Table[(Times @@ (w - sites[[c]]))^p, {c, configs}]
amp[w_] := phi0 f[w]
born[w_] := With[{a = Abs[amp[w]]^2}, a/Total[a]]
p0 = born[w0];
{Length[p0], Total[p0], Max[p0]}
Exp[-eta Total[Log[Delete[sites - sites[[l]], l]]]], {l, ns}];
phi0 = Table[
Times @@ Flatten@Table[(sites[[c[[a]]]] - sites[[c[[b]]]])^q,
{a, np}, {b, a + 1, np}] * Times @@ background[[c]],
{c, configs}];
f[w_] := Table[(Times @@ (w - sites[[c]]))^p, {c, configs}]
amp[w_] := phi0 f[w]
born[w_] := With[{a = Abs[amp[w]]^2}, a/Total[a]]
p0 = born[w0];
{Length[p0], Total[p0], Max[p0]}
Out[]=
{56,1.,0.0959027}
2. Single-reference kernel
2. Single-reference kernel
This section implements the single-reference reconstruction of Supplement Eqs. (3)–(6). From occupation samples drawn only at w0, the known amplitude ratios rn(w) reconstruct the complex kernel and normalized overlaps; Eqs. (15)–(16) give their finite-shot estimator and positivity.
In[]:=
r[w_] := Table[(Times @@ ((w - sites[[c]])/(w0 - sites[[c]])))^p,
{c, configs}]
kExact[w_, v_] := Total[p0 Conjugate[r[w]] r[v]]
overlapExact[w_, v_] :=
kExact[w, v]/Sqrt[Re[kExact[w, w]] Re[kExact[v, v]]]
{kExact[w0, w0], overlapExact[0.4 + 0.1 I, 0.4 + 0.1 I]}
{c, configs}]
kExact[w_, v_] := Total[p0 Conjugate[r[w]] r[v]]
overlapExact[w_, v_] :=
kExact[w, v]/Sqrt[Re[kExact[w, w]] Re[kExact[v, v]]]
{kExact[w0, w0], overlapExact[0.4 + 0.1 I, 0.4 + 0.1 I]}
Out[]=
{1.-1.20371×,1.+2.65339×}
-35
10
-18
10
In[]:=
kHat[c_, w_, v_] := Total[c Conjugate[r[w]] r[v]]/Total[c]
overlapHat[c_, w_, v_] :=
kHat[c, w, v]/Sqrt[Re[kHat[c, w, w]] Re[kHat[c, v, v]]]
mShots = 4000;
nEnsembles = 160;
SeedRandom[19];
counts = Table[
BinCounts[RandomChoice[p0 -> Range[Length[configs]], mShots],
{1, Length[configs] + 1, 1}],
{nEnsembles}];
Dimensions[counts]
overlapHat[c_, w_, v_] :=
kHat[c, w, v]/Sqrt[Re[kHat[c, w, w]] Re[kHat[c, v, v]]]
mShots = 4000;
nEnsembles = 160;
SeedRandom[19];
counts = Table[
BinCounts[RandomChoice[p0 -> Range[Length[configs]], mShots],
{1, Length[configs] + 1, 1}],
{nEnsembles}];
Dimensions[counts]
Out[]=
{160,56}
In[]:=
counts[[1]]
Out[]=
{0,2,3,27,86,30,11,0,129,245,57,28,4,63,143,188,130,10,71,361,96,4,0,21,23,3,28,33,281,380,70,22,2,89,383,48,7,66,299,193,5,0,0,44,84,6,39,79,18,1,40,37,4,6,0,1}
3. Metric and finite-shot reach
3. Metric and finite-shot reach
This section evaluates the local metric coefficient G(w) and its finite-shot reconstruction. The exact covariance, normalization derivative and Berry-curvature calculations check Supplement Eqs. (29), (34) and (38), while Eqs. (53)–(57) describe importance reweighting, the Rényi-2 statistical reach, effective sample size and the reconstructed metric.
In[]:=
xVals[w_] := p Table[Total[1/(w - sites[[c]])], {c, configs}]
gCovariance[w_?NumericQ] := Module[{pw = born[w], x},
x = xVals[w];
Re[pw . Abs[x]^2 - Abs[pw . x]^2]]
logZ[w_] := Log[Total[Abs[amp[w]]^2]]
laplacian[w_, h_] := (logZ[w + h] + logZ[w - h] + logZ[w + I h]
+ logZ[w - I h] - 4 logZ[w])/(4 h^2)
gLaplacian[w_, h_: 0.01] := (4 laplacian[w, h/2] - laplacian[w, h])/3
psi[w_] := With[{a = amp[w]}, a/Norm[a]]
gBerry[w_, h_: 10.^-4] := Module[{s, dx, dy, Dx, Dy},
s = psi[w];
dx = (psi[w + h] - psi[w - h])/(2 h);
dy = (psi[w + I h] - psi[w - I h])/(2 h);
Dx = dx - s (Conjugate[s] . dx);
Dy = dy - s (Conjugate[s] . dy);
Im[Conjugate[Dx] . Dy]]
probe = 0.35 - 0.20 I;
gThreeWays = {gCovariance[probe], gLaplacian[probe], gBerry[probe]};
NumberForm[gThreeWays, 11]
gCovariance[w_?NumericQ] := Module[{pw = born[w], x},
x = xVals[w];
Re[pw . Abs[x]^2 - Abs[pw . x]^2]]
logZ[w_] := Log[Total[Abs[amp[w]]^2]]
laplacian[w_, h_] := (logZ[w + h] + logZ[w - h] + logZ[w + I h]
+ logZ[w - I h] - 4 logZ[w])/(4 h^2)
gLaplacian[w_, h_: 0.01] := (4 laplacian[w, h/2] - laplacian[w, h])/3
psi[w_] := With[{a = amp[w]}, a/Norm[a]]
gBerry[w_, h_: 10.^-4] := Module[{s, dx, dy, Dx, Dy},
s = psi[w];
dx = (psi[w + h] - psi[w - h])/(2 h);
dy = (psi[w + I h] - psi[w - I h])/(2 h);
Dx = dx - s (Conjugate[s] . dx);
Dy = dy - s (Conjugate[s] . dy);
Im[Conjugate[Dx] . Dy]]
probe = 0.35 - 0.20 I;
gThreeWays = {gCovariance[probe], gLaplacian[probe], gBerry[probe]};
NumberForm[gThreeWays, 11]
Out[]//NumberForm=
{0.70431569949,0.70431570007,0.70431569365}
In[]:=
gReweighted[c_, w_] := Module[{u, a, x},
u = c Abs[r[w]]^2;
a = u/Total[u];
x = xVals[w];
Re[a . Abs[x]^2 - Abs[a . x]^2]]
d2[w_] := Log[Total[born[w]^2/p0]]
ts = Subdivide[0., 2.4, 12];
ray = w0 + ts Exp[0.7 I];
gExactRay = gCovariance /@ ray;
gSamples = Table[gReweighted[c, w], {c, counts}, {w, ray}];
gMean = Mean[gSamples];
gSD = StandardDeviation[gSamples];
meffOverM[c_, w_] := Module[{ru = Abs[r[w]]^2, u},
u = Total[c ru];
(u)^2/(Total[c ru^2] Total[c])]
d2Ray = d2 /@ ray;
meffRay = Table[Mean[Table[meffOverM[c, w], {c, counts}]], {w, ray}];
maxBias = Max[Abs[gMean - gExactRay]/gExactRay];
TableForm[
Transpose[{ts, d2Ray, meffRay, gExactRay, gMean, gSD}],
TableHeadings -> {None,
{"t", "D2", "Meff/M", "G exact", "G mean", "G sd"}}]
u = c Abs[r[w]]^2;
a = u/Total[u];
x = xVals[w];
Re[a . Abs[x]^2 - Abs[a . x]^2]]
d2[w_] := Log[Total[born[w]^2/p0]]
ts = Subdivide[0., 2.4, 12];
ray = w0 + ts Exp[0.7 I];
gExactRay = gCovariance /@ ray;
gSamples = Table[gReweighted[c, w], {c, counts}, {w, ray}];
gMean = Mean[gSamples];
gSD = StandardDeviation[gSamples];
meffOverM[c_, w_] := Module[{ru = Abs[r[w]]^2, u},
u = Total[c ru];
(u)^2/(Total[c ru^2] Total[c])]
d2Ray = d2 /@ ray;
meffRay = Table[Mean[Table[meffOverM[c, w], {c, counts}]], {w, ray}];
maxBias = Max[Abs[gMean - gExactRay]/gExactRay];
TableForm[
Transpose[{ts, d2Ray, meffRay, gExactRay, gMean, gSD}],
TableHeadings -> {None,
{"t", "D2", "Meff/M", "G exact", "G mean", "G sd"}}]
Out[]//TableForm=
t | D2 | Meff/M | G exact | G mean | G sd |
0. | 2.22045× -16 10 | 1. | 1.09027 | 1.09078 | 0.0153158 |
0.2 | 0.100245 | 0.904535 | 1.22496 | 1.22578 | 0.024013 |
0.4 | 0.290669 | 0.747638 | 1.30158 | 1.3019 | 0.0335885 |
0.6 | 0.426847 | 0.65252 | 1.19853 | 1.19789 | 0.0341316 |
0.8 | 0.479749 | 0.619014 | 0.930228 | 0.928992 | 0.0250875 |
1. | 0.498263 | 0.607787 | 0.63023 | 0.629047 | 0.0146239 |
1.2 | 0.522608 | 0.593287 | 0.395854 | 0.395022 | 0.00770004 |
1.4 | 0.557756 | 0.572899 | 0.24272 | 0.242216 | 0.00411955 |
1.6 | 0.595052 | 0.552004 | 0.150065 | 0.14978 | 0.00239437 |
1.8 | 0.628203 | 0.534054 | 0.0951009 | 0.0949438 | 0.00152018 |
2. | 0.655231 | 0.519835 | 0.0621745 | 0.0620891 | 0.00102936 |
2.2 | 0.676452 | 0.508921 | 0.0419765 | 0.0419307 | 0.000727285 |
2.4 | 0.69292 | 0.500598 | 0.0292199 | 0.029196 | 0.000529402 |
In[]:=
{Last[d2Ray], Last[meffRay], maxBias}
Out[]=
{0.69292,0.500598,0.0021007}
4. Bargmann phase
4. Bargmann phase
This section reconstructs a gauge-invariant Bargmann phase from three complex overlaps between target states that are all distinct from the prepared reference state. It implements Supplement Eqs. (12), (14)–(15), using the triangular loop specified in Eq. (68), and directly tests recovery of complex off-diagonal information from the reference snapshots.
In[]:=
zeta = Table[0.55 Exp[I (0.25 + 2 Pi (j - 1)/3)], {j, 3}];
loop[o_] := o[[1]] o[[2]] o[[3]];
bargmannExact = Arg@loop[{overlapExact[zeta[[1]], zeta[[2]]],
overlapExact[zeta[[2]], zeta[[3]]], overlapExact[zeta[[3]], zeta[[1]]]}];
bargmannShots = Table[
Arg@loop[{overlapHat[c, zeta[[1]], zeta[[2]]],
overlapHat[c, zeta[[2]], zeta[[3]]],
overlapHat[c, zeta[[3]], zeta[[1]]]}], {c, counts}];
{bargmannExact, Mean[bargmannShots], StandardDeviation[bargmannShots]}
loop[o_] := o[[1]] o[[2]] o[[3]];
bargmannExact = Arg@loop[{overlapExact[zeta[[1]], zeta[[2]]],
overlapExact[zeta[[2]], zeta[[3]]], overlapExact[zeta[[3]], zeta[[1]]]}];
bargmannShots = Table[
Arg@loop[{overlapHat[c, zeta[[1]], zeta[[2]]],
overlapHat[c, zeta[[2]], zeta[[3]]],
overlapHat[c, zeta[[3]], zeta[[1]]]}], {c, counts}];
{bargmannExact, Mean[bargmannShots], StandardDeviation[bargmannShots]}
Out[]=
{0.34237,0.342424,0.0104341}
5. Exact projective compression
5. Exact projective compression
This section checks the exact projective-compression result of Supplement Eqs. (17)–(25). Since d = p Np = 3, the quasihole family spans at most d + 1 = 4 complex vector dimensions; evaluating the state at 40 positions on |w| = 1.5 gives the state matrix of Eq. (24), whose singular values verify that the bound is saturated with rank S = 4 corresponding to a minimal projective span CP^3.
In[]:=
ring = Table[1.5 Exp[2 Pi I j/40], {j, 0, 39}];
stateMatrix = Transpose[amp /@ ring];
sv = SingularValueList[stateMatrix, Tolerance -> 0];
sv = sv/First[sv];
rank = Count[sv, x_ /; x > 10.^-10];
{Take[sv, 4], sv[[5]], rank}
stateMatrix = Transpose[amp /@ ring];
sv = SingularValueList[stateMatrix, Tolerance -> 0];
sv = sv/First[sv];
rank = Count[sv, x_ /; x > 10.^-10];
{Take[sv, 4], sv[[5]], rank}
Out[]=
{{1.,0.662286,0.523241,0.487999},2.46611×,4}
-16
10
6. Summary and figures
6. Summary and figures
This final section collects the benchmark parameters and reconstructed quantities used in Fig. 1 and regenerates the three figure panels. The summary includes the three checks of G in Supplement Eq. (67), the finite-shot diagnostics of Eqs. (55)–(57), the Bargmann-phase test of Eqs. (12) and (68), and the projective-rank check of Eq. (24).
In[]:=
fmt[x_]:=NumberForm[N[x],{8,6}];benchmarkBox=Grid[{{Style["Benchmark",Bold,14],SpanFromLeft},{"N_s",ns},{"N_p",np},{"q",q},{"p",p},{"eta",N[eta]},{"w_0",{Re[w0],Im[w0]}},{"configurations",Length[configs]},{"shots",mShots},{"ensembles",nEnsembles}},Frame->All,Alignment->Left,Spacings->{2,0.7}];geometryBox=Grid[{{Style["Local geometry check",Bold,14],SpanFromLeft},{"G covariance",fmt[gThreeWays[[1]]]},{"G ddbar log Z",fmt[gThreeWays[[2]]]},{"-Omega_xy/2",fmt[gThreeWays[[3]]]}},Frame->All,Alignment->Left,Spacings->{2,0.7}];statisticsBox=Grid[{{Style["Finite-shot reach",Bold,14],SpanFromLeft},{"D2 at far endpoint",fmt[Last[d2Ray]]},{"Meff/M at far endpoint",fmt[Last[meffRay]]},{"maximum relative bias",Row[{NumberForm[100maxBias,{5,3}]," %"}]}},Frame->All,Alignment->Left,Spacings->{2,0.7}];phaseRankBox=Grid[{{Style["Phase and compression",Bold,14],SpanFromLeft},{"Bargmann exact",fmt[bargmannExact]},{"Bargmann reconstructed",Row[{fmt[Mean[bargmannShots]]," ± ",fmt[StandardDeviation[bargmannShots]]}]},{"projective rank",rank},{"nonzero singular values",NumberForm[Take[sv,4],{7,5}]}},Frame->All,Alignment->Left,Spacings->{2,0.7}];summaryPanel=Grid[{{benchmarkBox,geometryBox},{statisticsBox,phaseRankBox}},Alignment->Top,Spacings->{2,1.5}];summaryPanel
Out[]=
|
| ||||||||||||||||||||||||||||
|
| ||||||||||||||||||||||||||||
Fig. 1(a): the exact metric G(w), with the eight sites, the sole prepared reference w_0 (large dot), the reconstruction ray (black) and the phase-test triangle (red).
In[]:=
xy[z_]:={Re[z],Im[z]};sitePts=xy/@sites;rayPts=xy/@ray;triPts=xy/@zeta;w0Pt=xy[w0];gridPts=Range[-1.975,1.975,0.05];gGrid=Table[gCovariance[x+Iy],{y,gridPts},{x,gridPts}];Show[ListDensityPlot[gGrid,DataRange->{{-1.975,1.975},{-1.975,1.975}},InterpolationOrder->2,Mesh->None,PlotRange->All,AspectRatio->1,Frame->False,Axes->False,PlotRangePadding->Scaled[0.02],ColorFunction->"Rainbow",ColorFunctionScaling->True],ListContourPlot[gGrid,DataRange->{{-1.975,1.975},{-1.975,1.975}},Contours->6,ContourShading->False,ContourStyle->Directive[White,Opacity[0.20],Thin]],Graphics[{{White,EdgeForm[Directive[Black,AbsoluteThickness[0.8]]],Disk[#,0.05]&/@sitePts},{Directive[Red,AbsoluteThickness[2.5]],FaceForm[Directive[Red,Opacity[0.18]]],Polygon[triPts],Line[Append[triPts,First[triPts]]],Disk[#,0.04]&/@triPts},{Directive[Black,AbsoluteThickness[2.8]],Arrowheads[0.03],With[{v=Last[rayPts]-w0Pt},Arrow[{w0Pt,w0Pt+0.75v}]]},{Black,EdgeForm[Directive[White,AbsoluteThickness[1.5]]],Disk[w0Pt,0.045]}}]]
Out[]=
Fig. 1(b): reconstruction along the ray from one reference ensemble, against the exact curve, with the scatter over 160 ensembles.
In[]:=
gOne=gSamples[[1]];fig1b=Show[ListLinePlot[Transpose[{ts,gExactRay}],PlotStyle->Directive[Black,AbsoluteThickness[2.2]],InterpolationOrder->2],ListPlot[MapThread[{#1,Around[#2,#3]}&,{ts,gOne,gSD}],PlotStyle->Directive[Black,PointSize[0.015]],PlotMarkers->{Graphics[{Green,EdgeForm[Black],Disk[]}],8}],Frame->False,Axes->True,PlotRange->All,PlotRangePadding->{{Scaled[0.03],Scaled[0.03]},{Scaled[0.05],Scaled[0.05]}}]
Out[]=
Fig. 1(c): the projective compression. Exactly four singular values above the floor; the dashed line marks the exact bound d + 1 = 4.
In[]:=
fig1c=ListLogPlot[Max[#,10.^-18]&/@sv,PlotStyle->Directive[Black,PointSize[0.016]],PlotMarkers->{Graphics[{Blue,EdgeForm[Black],Disk[]}],7},Joined->False,Axes->True,Frame->False,PlotRange->{{0,41},{10.^-18,2}},GridLines->{{rank+0.5},None},GridLinesStyle->Directive[Red,Dashed,AbsoluteThickness[1.5]],PlotRangePadding->{{Scaled[0.02],Scaled[0.02]},{Scaled[0.02],Scaled[0.05]}}]
Out[]=
Cite this as: Kaushlendra Kumar, "Codes for “Laughlin quasihole geometry from a single snapshot ensemble”" from the Notebook Archive (2026), https://notebookarchive.org/2026-08-a5kp7qk
Download
