Skip to main content

Thank you for visiting You are using a browser version with limited support for CSS. To obtain the best experience, we recommend you use a more up to date browser (or turn off compatibility mode in Internet Explorer). In the meantime, to ensure continued support, we are displaying the site without styles and JavaScript.

  • Article
  • Published:

Resolution of 100 photons and quantum generation of unbiased random numbers


Macroscopic quantum phenomena, such as observed in superfluids and superconductors, have led to promising technological advancements and some of the most important tests of fundamental physics. At present, quantum detection of light is mostly relegated to the microscale, where avalanche photodiodes are very sensitive to distinguishing single-photon events from vacuum but cannot differentiate between larger photon-number events. Beyond this, the ability to perform measurements to resolve photon numbers is highly desirable for a variety of quantum information applications, including computation, sensing and cryptography. True photon-number resolving detectors do exist, but they are currently limited to the ability to resolve on the order of 10 photons, which is too small for several quantum-state generation methods based on heralded detection. Here we extend photon measurement into the mesoscopic regime by implementing a detection scheme based on multiplexing highly quantum-efficient transition-edge sensors to accurately resolve photon numbers between 0 and 100. We then demonstrate the use of our system by implementing a quantum random-number generator with no inherent bias. This method is based on sampling a coherent state in the photon-number basis and is robust against environmental noise, phase and amplitude fluctuations in the laser, loss and detector inefficiency as well as eavesdropping. Beyond true random-number generation, our detection scheme serves as a means to implement quantum measurement and engineering techniques valuable for photonic quantum information processing.

This is a preview of subscription content, access via your institution

Access options

Buy this article

Prices may be subject to local taxes which are calculated during checkout

Fig. 1: Detection scheme.
Fig. 2: Experimental photon-number distribution obtained by splitting a coherent state of mean photon number \(\bar{n}=57\) across three TES channels over 108 events.
Fig. 3: Randomness tests for the resultant bit strings from 108 events based on assigning three bits of information to each event by taking the measured photon number modulo 8.

Similar content being viewed by others

Data availability

The data supporting plots within this paper are available at and Additional data used for detector calibration can be obtained from the corresponding authors on reasonable request.

Code availability

The codes used to process and analyse the data can be obtained from the corresponding authors on reasonable request.


  1. Einstein, A. On a heuristic point of view about the creation and conversion of light. Ann. Phys. 17, 132–148 (1905).

    Article  Google Scholar 

  2. Salart, D., Baas, A., Branciard, C., Gisin, N. & Zbinden, H. Testing the speed of ‘spooky action at a distance’. Nature 454, 861–864 (2008).

    Article  ADS  Google Scholar 

  3. Gisin, N. & Thew, R. Quantum communication. Nat. Photon. 1, 165–171 (2007).

    Article  ADS  Google Scholar 

  4. Becerra, F. et al. Experimental demonstration of a receiver beating the standard quantum limit for multiple nonorthogonal state discrimination. Nat. Photon. 7, 147–152 (2013).

    Article  ADS  Google Scholar 

  5. Slussarenko, S. et al. Unconditional violation of the shot-noise limit in photonic quantum metrology. Nat. Photon. 11, 700–703 (2017).

    Article  ADS  Google Scholar 

  6. Nehra, R. et al. State-independent quantum state tomography by photon-number-resolving measurements. Optica 6, 1356–1360 (2019).

    Article  ADS  Google Scholar 

  7. Zhong, H.-S. et al. Quantum computational advantage using photons. Science 370, 1460–1463 (2020).

    Article  ADS  Google Scholar 

  8. Arrazola, J. et al. Quantum circuits with many photons on a programmable nanophotonic chip. Nature 591, 54–60 (2021).

    Article  ADS  Google Scholar 

  9. Campbell, J. C. Recent advances in avalanche photodiodes. J. Lightw. Technol. 34, 278–285 (2016).

    Article  ADS  Google Scholar 

  10. Becerra, F., Fan, J. & Migdall, A. Photon number resolution enables quantum receiver for realistic coherent optical communications. Nat. Photon. 9, 48–53 (2015).

    Article  ADS  Google Scholar 

  11. Arrazola, J. M. et al. Machine learning method for state preparation and gate synthesis on photonic quantum computers. Quantum Sci. Technol. 4, 024004 (2019).

    Article  ADS  Google Scholar 

  12. Thekkadath, G. et al. Quantum-enhanced interferometry with large heralded photon-number states. npj Quantum Inf. 6, 89 (2020).

    Article  ADS  Google Scholar 

  13. Eaton, M., Nehra, R. & Pfister, O. Non-Gaussian and Gottesman–Kitaev–Preskill state preparation by photon catalysis. New J. Phys. 21, 113034 (2019).

    Article  ADS  MathSciNet  Google Scholar 

  14. Ra, Y.-S. et al. Non-Gaussian quantum states of a multimode light field. Nat. Phys. 16, 144–147 (2020).

    Article  Google Scholar 

  15. Walschaers, M. Non-Gaussian quantum states and where to find them. PRX Quantum 2, 030204 (2021).

    Article  ADS  Google Scholar 

  16. Mari, A. & Eisert, J. Positive Wigner functions render classical simulation of quantum computation efficient. Phys. Rev. Lett. 109, 230503 (2012).

    Article  ADS  Google Scholar 

  17. Bulmer, J. F. et al. The boundary for quantum advantage in gaussian boson sampling. Sci. Adv. 8, eabl9236 (2021).

    Article  ADS  Google Scholar 

  18. Fürst, H. et al. High speed optical quantum random number generation. Opt. Express 18, 13029–13037 (2010).

    Article  ADS  Google Scholar 

  19. Ren, M. et al. Quantum random-number generator based on a photon-number-resolving detector. Phys. Rev. A 83, 023820 (2011).

    Article  ADS  Google Scholar 

  20. Gerry, C. C. et al. Proposal for a quantum random number generator using coherent light and a non-classical observable. J. Opt. Soc. Am. B 39, 1068–1074 (2022).

    Article  ADS  Google Scholar 

  21. Lita, A. E., Miller, A. J. & Nam, S. W. Counting near-infrared single-photons with 95% efficiency. Opt. Express 16, 3032–3040 (2008).

    Article  ADS  Google Scholar 

  22. Fukuda, D. et al. Titanium-based transition-edge photon number resolving detector with 98% detection efficiency with index-matched small-gap fiber coupling. Opt. Express 19, 870–875 (2011).

    Article  ADS  Google Scholar 

  23. Gerrits, T., Lita, A., Calkins, B. & Nam, S. W. in Superconducting Devices in Quantum Optics (Hadfield, R. & Johansson, G.) 31–60 (Springer, 2016).

  24. Gerrits, T. et al. Extending single-photon optimized superconducting transition edge sensors beyond the single-photon counting regime. Opt. Express 20, 23798–23810 (2012).

    Article  ADS  Google Scholar 

  25. Harder, G. et al. Single-mode parametric-down-conversion states with 50 photons as a source for mesoscopic quantum optics. Phys. Rev. Lett. 116, 143601 (2016).

    Article  ADS  Google Scholar 

  26. Levine, Z. H. et al. Algorithm for finding clusters with a known distribution and its application to photon-number resolution using a superconducting transition-edge sensor. J. Opt. Soc. Am. B 29, 2066–2073 (2012).

    Article  ADS  Google Scholar 

  27. Morais, L. A. et al. Precisely determining photon-number in real-time. Preprint at (2020).

  28. Gottesman, D., Kitaev, A. & Preskill, J. Encoding a qubit in an oscillator. Phys. Rev. A 64, 012310 (2001).

    Article  ADS  Google Scholar 

  29. Ghose, S. & Sanders, B. C. Non-Gaussian ancilla states for continuous variable quantum computation via Gaussian maps. J. Mod. Opt. 54, 855–869 (2007).

    Article  ADS  MATH  Google Scholar 

  30. Ferrenberg, A. M., Landau, D. & Wong, Y. J. Monte Carlo simulations: hidden errors from ‘good’ random number generators. Phys. Rev. Lett. 69, 3382 (1992).

    Article  ADS  Google Scholar 

  31. Ma, X., Yuan, X., Cao, Z., Qi, B. & Zhang, Z. Quantum random number generation. npj Quantum Inf. 2, 16021 (2016).

    Article  ADS  Google Scholar 

  32. Herrero-Collantes, M. & Garcia-Escartin, J. C. Quantum random number generators. Rev. Mod. Phys. 89, 015004 (2017).

    Article  ADS  MathSciNet  Google Scholar 

  33. Fujii, G. et al. Thin gold covered titanium transition edge sensor for optical measurement. J. Low Temp. Phys. 167, 815–821 (2012).

    Article  ADS  Google Scholar 

  34. Stefanov, A., Gisin, N., Guinnard, O., Guinnard, L. & Zbinden, H. Optical quantum random number generator. J. Mod. Optics 47, 595–598 (2000).

    ADS  Google Scholar 

  35. Jennewein, T., Achleitner, U., Weihs, G., Weinfurter, H. & Zeilinger, A. A fast and compact quantum random number generator. Rev. Sci. Instrum. 71, 1675–1680 (2000).

    Article  ADS  Google Scholar 

  36. Gabriel, C. et al. A generator for unique quantum random numbers based on vacuum states. Nat. Photon. 4, 711–715 (2010).

    Article  ADS  Google Scholar 

  37. Sanguinetti, B., Martin, A., Zbinden, H. & Gisin, N. Quantum random number generation on a mobile phone. Phys. Rev. X 4, 031056 (2014).

    Google Scholar 

  38. von Neumann, J. Various techniques used in connection with random digits. Appl. Math Ser. 12, 36–38 (1951).

    Google Scholar 

  39. Peres, Y. Iterating von Neumann’s procedure for extracting random bits. Ann. Stat. 20, 590–597 (1992).

    Article  MathSciNet  MATH  Google Scholar 

  40. Zhao, Y., Fung, C.-H. F., Qi, B., Chen, C. & Lo, H.-K. Quantum hacking: experimental demonstration of time-shift attack against practical quantum-key-distribution systems. Phys. Rev. A 78, 042333 (2008).

    Article  ADS  Google Scholar 

  41. Cahall, C. et al. Multi-photon detection using a conventional superconducting nanowire single-photon detector. Optica 4, 1534–1535 (2017).

    Article  ADS  Google Scholar 

  42. Wilson, E. B. Probable inference, the law of succession, and statistical inference. J. Am. Stat. Assoc. 22, 209–212 (1927).

    Article  Google Scholar 

  43. Acín, A. & Masanes, L. Certified randomness in quantum physics. Nature 540, 213–219 (2016).

    Article  ADS  Google Scholar 

  44. Gerry, C. C. Heisenberg-limit interferometry with four-wave mixers operating in a nonlinear regime. Phys. Rev. A 61, 043811 (2000).

    Article  ADS  Google Scholar 

  45. Marshall, K., Pooser, R., Siopsis, G. & Weedbrook, C. Quantum simulation of quantum field theory using continuous variables. Phys. Rev. A 92, 063825 (2015).

    Article  ADS  Google Scholar 

  46. Rukhin, A. et al. A Statistical Test Suite for the Validation of Random Number Generators and Pseudo Random Number Generators for Cryptographic Applications NIST Special Publication 800-22 (NIST, 2010).

  47. Soto, J. & Bassham, L. Randomness Testing of the Advanced Encryption Standard Finalist Candidates Technical Report (Booz-Allen and Hamilton Inc Mclean Va, 2000).

  48. Doğanaksoy, A., Sulak, F., Uğuz, M., Şeker, O. & Akcengiz, Z. New statistical randomness tests based on length of runs. Math. Prob. Eng. 2015, 626408 (2015).

    Article  MathSciNet  MATH  Google Scholar 

  49. Schrijen, G.-J. & Maes, R. Creating an efficient random number generator using standard SRAM (2022).

Download references


M.E., A.H. and O.P. were supported by National Science Foundation grant numbers DMR-1839175 and PHY-1820882. M.E., A.H., C.C., H.D. and O.P. were additionally supported by Jefferson Lab LDRD project number LDRD21-17 under which Jefferson Science Associates, LLC, manages and operates Jefferson Lab. R.J.B. acknowledges support from the National Research Council Research Associate Program. C.C.G. acknowledges support under the AFRL Summer Faculty Fellowship Program (SFFP). P.M.A. and C.C.G. acknowledge support from the Air Force Office of Scientific Research (AFOSR). M.E. thanks L. A. Morais and R. Nehra for discussion, and T. Gerrits for advice regarding the TES. O.P. thanks A. Miller, A. Lita and S. W. Nam for building the initial single-channel detector system. Any opinions, findings, conclusions or recommendations expressed in this material are those of the author(s) and do not necessarily reflect the views of the Air Force Research Laboratory (AFRL). The appearance of external hyperlinks does not constitute endorsement by the United States Department of Defense or General Electric of the linked websites, or the information, products, or services contained therein. The Department of Defense does not exercise any editorial, security, or other control over the information you may find at these locations.

Author information

Authors and Affiliations



M.E., A.H. and O.P. designed the experimental set-up and characterized the detector. H.D. and C.C. built and programmed the EFADC for data collection. M.E. and A.H. collected and analysed measured data. R.J.B., P.M.A. and C.C.G. devised the method to make the unbiased QRNG. R.J.B. and P.M.A. performed the data analysis for characterizing randomness of the generated bit sequence. The article was written by M.E. with contributions from all authors.

Corresponding authors

Correspondence to Miller Eaton or Amr Hossameldin.

Ethics declarations

Competing interests

The authors declare no competing interests.

Peer review

Peer review information

Nature Photonics thanks the anonymous reviewers for their contribution to the peer review of this work.

Additional information

Publisher’s note Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Extended data

Extended Data Fig. 1 NIST randomness tests for phase-averaged data.

Randomness tests for bit strings obtained from modulo 2 binning the sampled photon number from a mixture of coherent states with randomized phase. All tests pass indicating phase stability has no bearing on the quality of QRNG. The error bars for each proportion are computed from the Wilson score interval of equation (26) where n = 143 is the total number of trials and \({n}_{s}\,\left({n}_{f}\right)\) are the number of successful (failed) trials for a significance level of α = 0.01. Given repeated testing of the bit generation method, the error bars denote the range for which the proportion is likely to fall. On the horizontal axis, CuSum (F) and (B) denote the cumulative sum tests for forward and backward propagation through the bit sequence, DFT denotes the discrete Fourier transform (spectral) test and Lin. Complex denotes the linear complexity test.

Extended Data Fig. 2 NIST tests of randomness.

Randomness tests for the resultant bit strings based on how the measured data is binned (Mod 8 data shown in the main text). Mod 2, Mod 4, and Mod 8 tests all indicate randomness, while some tests begin to fail for Mod 16 and Mod 32. This is expected due to the non-zero residual biases for a coherent state distribution with mean photon number \(\bar{n}=57\) and a PNRD limit of 100 photons. The error bars for each proportion are computed from the Wilson score (confidence) interval of equation (26) where \(n=\left\{143,287,575,719\right\}\) is the total number of trials for mod\(\left\{2,4,16,32\right\}\) binning, respectively, and \({n}_{s}\,\left({n}_{f}\right)\) are the number of successful (failed) trials for a significance level of α = 0.01. Given repeated testing of the bit generation method, the error bars denote the range for which the proportion is likely to fall. On the horizontal axis, CuSum (F) and (B) denote the cumulative sum tests for forward and backward propagation through the bit sequence, DFT denotes the discrete Fourier transform (spectral) test and Lin. Complex denotes the linear complexity test.

Extended Data Fig. 3 Binning error reduction.

Error-rate reduction on photon-number resolution through post-selection of data. (a) By excluding data points with measured areas further from the centre of each bin, the portion of overlap from neighbouring Gaussians can be substantially reduced. The location of the new binning thresholds must be the same fraction of the Gaussian peak width, σn, for each bin. Here, 2σn is chosen. (b) Error rate to incorrectly characterize a true 25 photon event as a function of the proportion of measurement data kept.

Extended Data Fig. 4 Gaussian overlaps for all detector channels.

Normalized Gaussian fits for the histogrammed area measurements TES channel 1 (a), 2 (b), and 3 (c). Note that for channels 1 and 3, the FPGA thresholds are set above the electronics noise such that zero photon events have a measured area of zero. For channel 2, electronics noise can drift slightly above the set voltage threshold so that small, non-zero areas are recorded for zero photon events.

Extended Data Fig. 5 Photon-number error rates for all detectors.

Error rates for all detection channels depending on binning. Error percentages indicate the probability to incorrectly count a measurement that was a true n photon event. Errorall includes all areas and uses the Gaussian intersections to place bins. Error2σ discards area events occurring outsides of a 2σ width centred around each Gaussian in the histogram fit. The thrown-out events account for 32% of all measurements. The Error1σ discards area events occurring outsides of a 1σ width centred around each Gaussian in the histogram fit. This removes 62% of the measured data but drastically reduces counting errors.

Extended Data Fig. 6 Residual bias due to energy truncation.

Residual bias based on modulo binning of a photon number distribution for coherent state of mean photon number \(\bar{n}\). Markers indicate the theoretical deviation from a uniformly random distribution if one had infinite photon-number resolving capability while solid lines give the expected bias with a truncation of the photon number distribution beyond 100 photons. The vertical dashed line indicates a coherent state with \(\bar{n}=57\) such as used in this experiment where the residual bias for mod 2, mod 4, and mod 8 binning are the same. The two plots are identical with the plot at left showing log scale.

Rights and permissions

Springer Nature or its licensor (e.g. a society or other partner) holds exclusive rights to this article under a publishing agreement with the author(s) or other rightsholder(s); author self-archiving of the accepted manuscript version of this article is solely governed by the terms of such publishing agreement and applicable law.

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Eaton, M., Hossameldin, A., Birrittella, R.J. et al. Resolution of 100 photons and quantum generation of unbiased random numbers. Nat. Photon. 17, 106–111 (2023).

Download citation

  • Received:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI:

This article is cited by


Quick links

Nature Briefing

Sign up for the Nature Briefing newsletter — what matters in science, free to your inbox daily.

Get the most important science stories of the day, free in your inbox. Sign up for Nature Briefing