alphaFeedback

WorksPhysics and Astronomy

Moments of Random Permanents and Hafnians: A Replica Approach

AI contributions
Not recorded for this paper
View details

Abstract

Using contour-integral representations of the permanent and of the Hafnian, we turn the computation of their moments for random matrices into a replica calculation, analogous to that of the moments of the partition function of a mean-field spin glass. For the 2k2k-th moment of N×NN\times N matrices with independent entries, the dominant saddle point is replica symmetric for k>2k>2, and we obtain in closed form the exponential growth rate, the prefactor and the first 1/N1/N correction, in agreement with exact enumerations. The growth rate depends only on whether the entries are real or complex; higher cumulants affect only the prefactor and the 1/N1/N term. At k=2k=2 the replica-symmetric solution becomes unstable, separating a power-law bulk of the distribution from a large-deviation tail, which we compute. The results apply to boson sampling with single photons and with squeezed light.

Introduction

Determinants are famous for their cancellations; permanents for what happens when those cancellations disappear. For an N×NN \times N matrix MM, the determinant

det⁡M=∑σ∈SNsgn⁡(σ)∏iMi,σ(i)\operatorname{det} M = \sum_{\sigma\in S_N} \operatorname{sgn}(\sigma) \prod_{i} M_{i,\sigma(i)}

assigns a sign to each permutation. Swapping two rows or two columns reverses its value, so identical rows or columns make it vanish. This alternating structure permits efficient Gaussian elimination.

In the eighteenth century, Vandermonde studied products of differences that helped shape the theory of alternating functions [1], closely related to the determinant now bearing his name [2]. Cauchy subsequently spoke of fonctions symétriques permanentes [3], and it was Muir [4] who applied Cauchy’s expression “permanent” to the signless matrix sum

per⁡M=∑σ∈SN∏i=1NMi,σ(i).\operatorname{per} M = \sum_{\sigma\in S_N} \prod_{i=1}^{N} M_{i,\sigma(i)}.

The missing signs look like a minor edit, yet determinants admit polynomial-time evaluation, while the inclusion-exclusion method uses O(N2N)O(N 2^N) operations in the worst case [5, 6]. A remarkable difference in complexity.

Valiant proved that exact permanent evaluation is #P\#\mathrm{P}-complete even for zero–one matrices [7]. The class #P\#\mathrm{P} concerns counting efficiently checkable solutions, and these zero–one permanents count perfect matchings in bipartite graphs. This is a worst-case exact result; nonnegative permanents, for example, admit randomized relative approximation [8].

Caianiello translated the permutation bookkeeping into physical terms. In seminal studies of quantum-field combinatorics, he linked bosonic contractions to signless sums and related pairing structures, placing permanents and Hafnians within the language of quantum particle statistics [9, 10, 11, 12] [13]. For noninteracting fermions, occupied one-particle orbitals give a Slater determinant [14]. The difference between bosonic and fermionic exchange thus gives the old distinction between two permutation sums a concrete physical setting.

Over the last two decades, this connection has become operational in photonics. Scheel showed in 2004 [15], before the boson-sampling proposal of Aaronson and Arkhipov [16], that transition amplitudes of indistinguishable photons in passive linear-optical networks involve permanents of interferometer submatrices. For a given input-output photon pattern, the probability is proportional to the squared modulus of such a permanent. The optical device generates samples without returning the complex permanent: estimating the probability of a very rare output by repeated counting can itself require many trials.

Sampling hardness and evaluating an individual permanent are therefore distinct questions, as is the problem of establishing that a measured distribution agrees with the intended one. The proposed advantage concerns drawing such outputs; its strongest claims for approximate, noisy sampling require additional complexity conjectures [16].

A number of mathematical problems remain open in this context. Tao and Vu focused on the permanents of random Bernoulli matrices, whose entries are independently chosen to be +1 or −1 with equal probability [17]. While the determinant moments of matrices with independent Gaussian entries are well understood and can be computed exactly, the Bernoulli case is more intricate, and a systematic study of high-order moments appears to be lacking. In this article, we investigate the moments of permanents for both Gaussian and Bernoulli random matrices.

Integrated photonic experiments made the permanent connection accessible to measurement. Broome and collaborators tested two- and three-photon interference in a tunable six-mode circuit [18]; Spring and collaborators sampled three- and four-photon outputs on a six-mode chip [19]. Tillmann and collaborators studied three photons in five-mode written waveguides [20], while Crespi and collaborators realized a laser-written five-mode interferometer and compared three-photon counts with permanent-based predictions [21]. These experiments test the underlying interference at small photon numbers; they do not themselves establish a classical-computation speedup.

Validation studies subsequently tested specific alternatives to genuine bosonic sampling [22]. In particular, Walschaers et al. proposed efficiently accessible statistics of two-mode photon-number correlations as a benchmark against distinguishable-particle and selected mimic models [23]; related signatures were later measured on an integrated chip [24].

A boson sampling experiment is deceptively simple: a certain number of photons are injected into the input ports, interact with a linear system, and ultimately are detected at the output ports. See the schematic in Figure 1. However, the underlying problem is extremely complex, involving advanced combinatorics, permanents, and Hafnians. The benchmark compares the mean, standard deviation, and skewness of the correlations across output-mode pairs, without reconstructing every output probability. These selective tests do not certify an arbitrary full output distribution.

Scheme of a boson sampling experiment

Figure 1. Scheme of a boson sampling experiment. Photons are injected into the input ports, interact with a linear system and are detected at the output ports. We shall assume that the system is lossless and no “collisions” occur (namely photons are detected at different output ports).

Another photonic route, Gaussian boson sampling, employs squeezed inputs rather than fixed numbers of single photons. Hamilton et al. showed that its ideal, number-resolved output probabilities involve Hafnians, highlighting both the reach of photonic sampling and the importance of distinguishing the underlying matrix functions [25].

In a recent large-scale experiment, Pan and collaborators realized Gaussian boson sampling with 1,024 squeezed states in 8,176 modes, registering events with up to 3,050 detector clicks and benchmarking the outputs against classical models [26]. This samples Gaussian outputs, rather than directly measuring individual permanents. For random interferometers, even the statistics of permanent-dependent outcomes pose subtle questions. Random permanents have their own mathematical history [27] and have not been systematically approached using the methods of statistical mechanics (a notable exception is [28]).

Here we study the statistics of random permanents and Hafnians, rather than the evaluation of a prescribed instance.

Section II defines normalized moments for real and circular complex random matrices and derives the contour-integral representation of the permanent that will be used in the rest of the paper.

Section III turns the moments of real permanents into a replica calculation using Hubbard-Stratonovich fields. For Gaussian entries, this yields an auxiliary Hafnian representation; a large-NN saddle-point analysis shows the saddle point is replica symmetric for all moments with k≥3k \ge3 and provides the exponential growth rate, prefactor, and first 1/N1/N correction. The section also shows how higher cumulants of symmetric non-Gaussian entry distributions change the subleading terms without changing the leading rate.

§ 2 treats complex Gaussian permanents, obtaining an exact moment–matrix-size duality and their large-NN asymptotics. It also derives a duality between real Gaussian permanents and Hafnians of symmetric complex Gaussian matrices, relevant to Gaussian boson sampling.

In § 2.1 we use the moments to compute the full distribution of the normalized permanents, highlighting a transition region from the bulk (inaccessible to our methods) to the tail. In this transition region, a universal power law arises.

We compare numerical data for an ensemble of real matrices with the analytical calculation, and the agreement is remarkable. We remark that to access the distribution in the bulk, not just in the tail, one needs information about moments of order k≤2k \le2 which should require a different technique than the RS presented here, possibly an RSB calculation [29, 30, 31, 32, 33].

Section VI makes the connection to photonic experiments explicit: in the dilute, collision-free regime, singlephoton boson-sampling probabilities involve squared permanents of approximately Gaussian interferometer submatrices, whereas squeezed-state Gaussian boson sampling involves squared Hafnians. The moments describe the heavy tails of ideal output probabilities, compare the two sampling settings, and estimate the sample cost of cross-entropy and related statistical benchmarks. These ensemble predictions do not by themselves certify an individual device or establish the anti-concentration assumptions used in sampling-hardness arguments. Section VII summarizes the asymptotic laws, their universality, and their limitations.

The Appendix contains most of the technical derivations, including the saddle-point expansion, phase zero modes, fluctuation determinants, and finite-size corrections.

We believe the new techniques we introduce in this paper could spur interest in the problem of permanents of random matrices, which has been for many years the less-explored counterpart to determinants in random matrix theory, largely due to the historical lack of tractable analytical tools. Determinants are, in fact, expressed in terms of the matrix spectrum, and there is a large literature treating them [34, 35]. Moreover, our uncovering of replica symmetry and the possibility of replica symmetry breaking connects to another important subfield of statistical physics: spin glasses and disordered systems [29].

Permanents, Hafnians and their integral representations

We consider N×NN \times N random matrices MM whose elements are independent and identically distributed (i.i.d.) random variables with distribution P(x)P(x). In general, xx can be real (in which case we require P(x)P(x) to be even) or complex (in which case we require circular distributions, P(eiθx)=P(x)P(e^{i\theta}x)=P(x)). Such matrices are clearly not symmetric. We define the average ⟨⋅⟩\langle\cdot\rangle as the average with respect to the probability measure ∏ijP(Mij)\prod_{ij}P(M_{ij}).

For integer kk we aim to compute the moments of per⁡M\operatorname{per} M

⟨∣per⁡M∣2k⟩,\left\langle\lvert\operatorname{per} M\rvert^{2k}\right\rangle,

which we appropriately normalize to eliminate the factorials

⟨∣per⁡M∣2k⟩N!k=⟨Yk⟩=⟨exp⁡(−k(−ln⁡(Y)))⟩.(1)\frac{\left\langle\lvert\operatorname{per} M\rvert^{2k}\right\rangle}{N!^k}=\left\langle Y^k\right\rangle=\left\langle\exp\left(-k(-\ln(Y))\right)\right\rangle. \tag*{(1)}

In this way ⟨Y⟩=1\langle Y\rangle=1: the moments may have only a possible exponential growth. We then define the rate function

ΛF(k)=lim⁡N→∞1Nln⁡⟨Yk⟩,(2)\Lambda_{\mathrm{F}}(k)=\lim_{N\to\infty}\frac{1}{N}\ln\langle Y^k\rangle, \tag*{(2)}

with the subscript F equal to R for real and to C for complex matrices, which plays the role of a free energy.

Notice that we are evaluating

∫dMP(M)exp⁡(−kH),(3)\int dM P(M)\exp\left(-kH\right), \tag*{(3)}

namely the partition function of a system with inverse temperature kk and Hamiltonian H=−ln⁡(Y)∝NH=-\ln(Y)\propto N. We shall perform the transition from the canonical to the microcanonical ensemble. In the limit N→∞N\to\infty we will only need the saddle point approximation and the fluctuations around it.

One ensemble relevant for the boson sampling problem [36] is that of complex matrices: the N×NN\times N submatrices of Haar-random m×mm\times m unitaries, rescaled by m\sqrt{m}, are close to i.i.d. complex Gaussian matrices for mm large enough compared to NN. We therefore take MijM_{ij} i.i.d. circularly symmetric complex Gaussians, with distribution P(z)=1πe−∣z∣2P(z)=\frac{1}{\pi}e^{-\lvert z\rvert^2}, so that ⟨∣Mij∣2⟩=1\langle\lvert M_{ij}\rvert^2\rangle=1 and ⟨Mij2⟩=0\langle M_{ij}^2\rangle=0. Throughout the paper, the label R or C on Λ\Lambda, on the prefactor CkC_k and on the coefficient a1a_1 of the 1/N1/N correction (see later) distinguishes real from complex entries.

In order to average over MM, we use the representation of the permanent as a multiple integral in the complex plane which was introduced in [28]. For every ρ>0\rho>0,

per⁡(M)=∏i=1N∮∣ui∣=ρdui2πiui2∏j=1N∮∣vj∣=ρdvj2πivj2exp⁡(∑i,j=1NuiMijvj).(4)\operatorname{per}(M)=\prod_{i=1}^{N}\oint_{\lvert u_i\rvert=\rho}\frac{du_i}{2\pi i u_i^2}\prod_{j=1}^{N}\oint_{\lvert v_j\rvert=\rho}\frac{dv_j}{2\pi i v_j^2}\exp\left(\sum_{i,j=1}^{N}u_iM_{ij}v_j\right). \tag*{(4)}

This representation is the twin of the very well-known representation of the determinant as an integral over Grassmann variables (as discussed in the Appendix)

det⁡(M)=∫∏i=1Ndψidψˉiexp⁡(∑i,j=1NψˉiMijψj),(5)\det(M)=\int\prod_{i=1}^{N}d\psi_i d\bar{\psi}_i\exp\left(\sum_{i,j=1}^{N}\bar{\psi}_iM_{ij}\psi_j\right), \tag*{(5)}

which is widely used in the contexts of random matrix theory and Anderson localization [37].

The proof of Eq. (4) is straightforward: in the expansion of the entire function euTMve^{u^TMv}, one should retain only the term (uTMv)N(u^TMv)^N, and this contains all possible products Mi1j1⋯MiNjNM_{i_1j_1}\cdots M_{i_Nj_N} where all the indices appear one and only one time, therefore making the sum over all the permutations (in the case of the determinant, reordering the Grassmann variables introduces the sign of the permutations).

For the Hafnian, we consider a 2N×2N2N\times2N symmetric matrix MM, Mij=MjiM_{ij}=M_{ji} and define

hf⁡(M)=∑T∈T2N∏{i,j}∈TMij,(6)\operatorname{hf}(M)=\sum_{T\in\mathcal{T}_{2N}}\prod_{\{i,j\}\in T}M_{ij}, \tag*{(6)}

where T2N\mathcal{T}_{2N} is the set of the (2N−1)!(2N-1)! perfect matchings (i.e., the partitions into pairs) TT of the set [2N]={1,…,2N}[2N]=\{1,\ldots,2N\}.

The Hafnian has a contour representation analogous to (4), with a single set of variables, since rows and columns coincide:

hf⁡(M)=∏i=12N∮∣ui∣=ρdui2πiui2exp⁡(∑i<juiMijuj).(7)\operatorname{hf}(M)=\prod_{i=1}^{2N}\oint_{|u_i|=\rho}\frac{du_i}{2\pi i u_i^2}\exp\left(\sum_{i<j}u_iM_{ij}u_j\right). \tag*{(7)}

The proof is the same as for (4): in (∑i<jMijuiuj)N/N!\left(\sum_{i<j}M_{ij}u_i u_j\right)^N/N! the multilinear terms are the products of NN disjoint pairs covering [2N][2N], i.e. the perfect matchings, each one arising from N!N! orderings.

These representations, with the matrix in the exponent, turn the problem of computing the moments of a permanent or a Hafnian into a form amenable to treatments using the full arsenal of statistical mechanics of disordered systems.

Real matrices

To compute ⟨∣per⁡(M)∣2k⟩=⟨(per⁡M)2k⟩\langle|\operatorname{per}(M)|^{2k}\rangle=\langle(\operatorname{per}M)^{2k}\rangle we need now 2k×N2k\times N variables uu and 2k×N2k\times N variables vv. We compactly write

dμ2k(u,v)=∏a=12k∏i=1Nduia2πi(uia)2∏a=12k∏j=1Ndvja2πi(vja)2.(8)d\mu_{2k}(u,v)=\prod_{a=1}^{2k}\prod_{i=1}^{N}\frac{du_i^a}{2\pi i (u_i^a)^2}\prod_{a=1}^{2k}\prod_{j=1}^{N}\frac{dv_j^a}{2\pi i (v_j^a)^2}. \tag*{(8)}

With this notation

(per⁡M)2k=∮dμ2k(u,v)exp⁡(∑i,jMijXij),(\operatorname{per}M)^{2k}=\oint d\mu_{2k}(u,v)\exp\left(\sum_{i,j}M_{ij}X_{ij}\right),
Xij=∑a=12kuiavja.(9)X_{ij}=\sum_{a=1}^{2k}u_i^av_j^a. \tag*{(9)}

We assume the distribution of MijM_{ij} is even, P(x)=P(−x)P(x)=P(-x), with unit variance (κ2=1\kappa_2=1), and define as κm\kappa_m its mm-th cumulant

References

  1. [1]A.-T. Vandermonde, in Histoire de l’Académie royale des sciences, année 1771 (Imprimerie royale, Paris, 1774) pp. 365–413.
  2. [2]B. Ycart, Rev. Hist. Math. 19, 43 (2013).
  3. [3]A.-L. Cauchy, J. École Polytech. 10, 29 (1815), the later Œuvres complètes reprint appears on pp. 91–169.
  4. [4]T. Muir, Proc. R. Soc. Edinburgh 11, 409 (1882).
  5. [5]H. J. Ryser, Combinatorial Mathematics, Carus Mathematical Monographs, Vol. 14 (Mathematical Association of America, 1963).
  6. [6]H. Minc, Permanents (Addison-Wesley, Reading, MA, 1978).
  7. [7]L. G. Valiant, Theor. Comput. Sci. 8, 189 (1979).
  8. [8]M. Jerrum, A. Sinclair, and E. Vigoda, J. ACM 51, 671 (2004).
  9. [9]E. R. Caianiello, Nuovo Cimento 10, 1634 (1953).
  10. [10]E. R. Caianiello, Nuovo Cimento 13, 637 (1959).
  11. [11]E. R. Caianiello, Nuovo Cimento 14, 177 (1959), suppl. I.
  12. [12]E. R. Caianiello, Combinatorics and Renormalization in Quantum Field Theory, Frontiers in Physics: A Lecture Note and Reprint Series (W. A. Benjamin, Reading, MA, 1973).
  13. [13]Hafnians were named by Caianiello “to mark the fruitful period of stay in Copenhagen (Hafnia in Latin)” [49].
  14. [14]J. C. Slater, Phys. Rev. 34, 1293 (1929).
  15. [15]S. Scheel, Permanents in linear optical networks (2004), arXiv:quant-ph/0406127, arXiv:quant-ph/0406127.arxiv.org/abs/quant-ph/0406127
  16. [16]S. Aaronson and A. Arkhipov, Theory Comput. 9, 143 (2013).
  17. [17]T. Tao and V. Vu, Adv. Math. 220, 657 (2009).
  18. [18]M. A. Broome, A. Fedrizzi, S. Rahimi-Keshari, J. Dove, S. Aaronson, T. C. Ralph, and A. G. White, Science 339, 794 (2013).
  19. [19]J. B. Spring, B. J. Metcalf, P. C. Humphreys, W. S. Kolthammer, X.-M. Jin, M. Barbieri, A. Datta, N. Thomas-Peter, N. K. Langford, D. Kundys, J. C. Gates, B. J. Smith, P. G. R. Smith, and I. A. Walmsley, Science 339, 798 (2013).
  20. [20]M. Tillmann, B. Dakić, R. Heilmann, S. Nolte, A. Szameit, and P. Walther, Nat. Photonics 7, 540 (2013), see also arXiv:1212.2240v1, arXiv:1212.2240.DOI
  21. [21]A. Crespi, R. Osellame, R. Ramponi, D. J. Brod, E. F. Galvão, N. Spagnolo, C. Vitelli, E. Maiorino, P. Mattaloni, and F. Sciarrino, Nat. Photonics 7, 545 (2013), see also arXiv:1212.2783v1, arXiv:1212.2783.DOI
  22. [22]N. Spagnolo, C. Vitelli, M. Bentivegna, D. J. Brod, A. Crespi, F. Flamini, S. Giacomini, G. Milani, R. Ramponi, P. Mataloni, R. Osselame, E. F. Galvão, and F. Sciarrino, Nat. Photonics 8, 615 (2014).
  23. [23]M. Walschaers, J. Kuipers, J.-D. Urbina, K. Mayer, M. C. Tichy, K. Richter, and A. Buchleitner, New J. Phys. 18, 032001 (2016).
  24. [24]T. Giordani, F. Flamini, M. Pompili, N. Viggianiello, N. Spagnolo, A. Crespi, R. Osellame, N. Wiebe, M. Walschaers, A. Buchleitner, and F. Sciarrino, Nat. Photonics 12, 173 (2018).
  25. [25]C. S. Hamilton, R. Kruse, L. Sansoni, S. Barkhofen, C. Silberhorn, and I. Jex, Phys. Rev. Lett. 119, 170501 (2017).
  26. [26]H.-L. Liu, H. Su, Y.-H. Deng, S.-Q. Gong, Y.-C. Gu, H.-Y. Tang, M.-H. Jia, Q. Wei, Y.-K. Song, D.-Z. Wang, M.-Y. Zheng, F.-X. Chen, L.-B. Li, S.-Y. Ren, X.-Z. Zhu, M.-H. Wang, Y.-J. Chen, Y.-F. Liu, L.-S. Song, P.-Y. Yang, J.-S. Chen, H. An, L. Zhang, L. Gan, G.-W. Yang, J.-M. Xu, Y.-M. He, H. Wang, H.-S. Zhong, M.-C. Chen, X. Jiang, L. Li, N.-L. Liu, X.-L. Su, Q. Zhang, C.-Y. Lu, and J.-W. Pan, Nature 653, 687 (2026).
  27. [27]Y. V. Borovskikh and V. S. Korolyuk, Random Permanents (VSP, Utrecht, 1994).
  28. [28]Y. V. Fyodorov, Int. Math. Res. Not. 2006, 1 (2006), article ID 61570.
  29. [29]M. Mézard, G. Parisi, and M. A. Virasoro, Spin glass theory and beyond: An Introduction to the Replica Method and Its Applications, Vol. 9 (World Scientific Publishing Company, 1987).
  30. [30]G. Parisi, Phys. Rev. Lett. 43, 1754 (1979).
  31. [31]G. Parisi, J. Phys. A: Math. Gen. 13, L115 (1980).
  32. [32]G. Parisi, J. Phys. A: Math. Gen. 13, 1101 (1980).
  33. [33]G. Parisi, Rev. Mod. Phys. 95, 030501 (2023).
  34. [34]M. L. Mehta, Random matrix theories, Vol. 142 (Elsevier, 2004).
  35. [35]G. Livan, M. Novaes, and P. Vivo, Monograph Award 63, 914 (2018).
  36. [36]S. Aaronson and A. Arkhipov, in Proceedings of the 43rd Annual ACM Symposium on Theory of Computing (STOC ’11) (2011) pp. 333–342.
  37. [37]K. Efetov, Supersymmetry in disorder and chaos (Cambridge university press, 1999).
  38. [38]D. Sherrington and S. Kirkpatrick, Physical review letters 35, 1792 (1975).
  39. [39]B. Roos, Linear and Multilinear Algebra 73, 1634 (2025).
  40. [40]We thank Yan Fyodorov for pointing this out to us.
  41. [41]S. Nezami, arXiv:2104.06423 (2021).arxiv.org/abs/2104.06423
  42. [42]E. Carlen, E. H. Lieb, and M. Loss, Methods Appl. Anal. 13, 1 (2006).
  43. [43]A. Ehrenberg, J. T. Iosue, A. Deshpande, D. Hangleiter, and A. V. Gorshkov, Phys. Rev. Lett. 134, 140601 (2025).
  44. [44]A. Ehrenberg, J. T. Iosue, A. Deshpande, D. Hangleiter, and A. V. Gorshkov, Phys. Rev. A 111, 024412 (2025).
  45. [45]L. Shou, A. Ehrenberg, Y.-X. Wang, J. T. Iosue, and A. V. Gorshkov, Anticoncentration and entanglement in gaussian boson sampling (2026), arXiv:2609.01241 [quant-ph].arxiv.org/abs/2609.01241
  46. [46]Z. Kolarovszki, Ágoston Kaposi, Z. Zimborás, and M. Oszmaniec, General framework for anticoncentration and linear cross-entropy benchmarking in photonic quantum advantage experiments (2026), arXiv:2604.15258 [quant-ph].arxiv.org/abs/2604.15258
  47. [47]J. Martínez-Cifuentes, H. de Guise, and N. Quesada, PRX Quantum 5, 040312 (2024).
  48. [48]J. Daigle, H. d. Guise, and T. Welsh, Journal of Physics: Conference Series 3152, 012020 (2025).

Paper details

vlnc:W_ujr7y34q
v1 · latestHistory (1)

published · Fresh — added to the Hub within the last 30 days

added ·

Usage

views · 0

downloads · 0

A view counts once per browser per day, a download each time the PDF is requested.

CC BY 4.0

Original source

  • Physics and Astronomy

Not recorded for this paper · View statement →

Looking for related papers…
Contents