## 2 Materials and Methods
### QRNG Implementation  
Figure 1 shows a schematic diagram of the implemented experimental vacuum-based randomness generation scheme. Here, a 1550.92 nm continuous-wave laser tuned at approximately 11 dBm is used as the LO, while a Variable Optical Attenuator (VOA) (VOA1) allows the accurate control of its output power. Moreover, a 80/20 BS (BS1) and an Optical  
Power Meter (OPM) are introduced to monitor the input power at the 50/50 BS (BS2), which was registered at 5.5 mW. A second VOA (VOA2) was additionally used to obtain a fine-tuned balanced detection scheme. A balanced receiver (WL-BPD1 GA) with an output bandwidth ranging from 300 kHz to 1 GHz was subsequently introduced to detect and subtract the output optical signals. It contains a Transimpedance Amplifier (TIA) with a gain of 3500 V/W that amplifies the resultant electronic signal. Finally, the output measurements are sampled at 983.04 MSa/s by the Texas Instruments ADS54J60 EVM Analog-to-digital Converter (ADC) module, which has an acquisition range, \(R\), of \(\pm 0.95\) V and a resolution, \(n\), of 16 bits. The digitization of the noise signal also introduces an additional quantization noise variance that can be determined as \(\frac{\delta^{2}}{12}\), where \(\delta=\frac{R}{2^{(n-1)}}\) is the bin width of the ADC [27]. Given these experimental conditions, an additional noise variance of \(7\times 10^{-5}\) mV\({}^{2}\) can be expected. Moreover, as specified by the Nyquist sampling theorem, the noise signal will not be accurately recovered when its bandwidth is larger than half the sampling frequency. Despite this, here, this condition should not be obeyed since, given a finite signal bandwidth, any samples taken would necessarily be highly correlated. In fact, under an ideal TIA response, maximally uncorrelated measurements are only obtained when the sampling frequency, \(f_{s}\) follows [36]:  
\[f_{s}=\frac{2\Delta f}{j},\quad\forall j\in\mathbb{N}, \tag{2}\]  
where \(\Delta f\) is the cut-off frequency of the detector's TIA. Although an optimal sampling rate was not considered in this implementation, a value lower than 2 GSa/s must nevertheless be adopted to avoid introducing additional temporal correlations in the homodyne output signal [34]. To derive the classical randomness source based on the electronic noise measurements, the LO was simply removed from the experimental setup described, and measurements of the detector's electronic noise were recorded. This process also allows us to estimate the contribution of the classical noise floor to the discretized homodyne signal distribution, \(M\), and thus quantify the fraction of randomness that can be extracted without compromising the implementation. A conservative approach is to consider the worst-case conditional min-entropy, \(H_{\text{min}}(M|E)\), as a lower bound. It quantifies the maximum probability of an eavesdropper predicting a QRNG outcome, given that the classical noise distribution \(E\) is known with arbitrary precision. Assuming that \(M\) and \(E\) are independent and follow identically distributed null-mean Gaussian distributions: [21; 37]:  
\[H_{\text{min}}(M|E)=-\log_{2}\bigg{[}\max\Big{\{}\frac{1}{2}\Big{[}1+\text{ erf}\left(\frac{e_{\text{max}}-R+\frac{3\delta}{2}}{\sigma_{Q}\sqrt{2}} \right)\Big{]},\text{erf}\left(\frac{\delta}{2\sigma_{Q}\sqrt{2}}\right) \Big{\}}\bigg{]}, \tag{3}\]  
Figure 1: Experimental setup of the proposed vacuum-based QRNG. The LO interacts with the vacuum state in a BS (BS2) with its second input port blocked. Its output signals are subsequently detected in a balanced homodyne detection scheme and amplified by a high-gain TIA. The resulting signal is then either directly submitted to the prime-searching algorithm or mapped into a uniform distribution before a set of 24 Miller–Rabin primality tests is applied.