For the first stage, we developed a very simple and basic quantum random number generator using Hadamard gates. We implied Hadamard gates to 100 qubits initialized at state 0. Then, we applied the measurement gates and registered the values on the classical registers. Here is how a small version of the position of the gates and measurement (taken with 5 qubits) looks like – the general visual representation would look like a 100-qubit generalization of this.
Even though the use of multiple Hadamard gates and additional gates could result in higher entropy for the states at hand, the problem associated with error propagation led us to believe that choosing a simple Hadamard transformation would be a good option.
We attempted classifying the data using neural networks, but didn’t get significant results from them. The closest we could get to accurately classifying the data was 53% which doesn’t add a technical or logistical meaning behind the model anyway, because even without a classifier, the probability of the data being a PRNG or a QRNG is 50%. After trying for multiple times, we opted for using other methodologies for the classification. The one which we really adhered to was the PCA (Principal Component Analysis) and the FFT ( Fast Fourier Transform). We used the data we extracted from actual IBM computers (IBM Brisbane, IBM Sherbrooke, IBM Kyiv) and tried to denoise them and also tried to find the major causes of error in terms of eigenvector manipulations and the directions of those vector components using PCA. We found an interesting higher variance (and thus, low entropy) at a particular direction while looking at the 100-D model of our vector space which suggests a significant bias at the direction. So, one variable we could use is subtracting the vector component/removing the component in that direction to mitigate the bias, and have a more effective entropy distribution. The following description we found in one of the research papers we read further clarified our hypothesis: “The key to Schumacher’s noiseless quantum coding theorem is that we can code the typical subspace and ignore its orthogonal complement, without much loss of fidelity.”
We opted for a different strategy to calculate the fidelity, which was by using the density matrices of our observed quantum states and the expected quantum states. We used the definition of Fidelity F(ρ, σ) between two quantum states ρ and σ. We also employed two tests for testing the entropy of our data. First, we calculated the Shannon entropy for the data we generated using QRNG and got a value of entropy at ~9.68. We employed the compressibility test for the same data and got the compression ratio to be 0.1734 which suggested that the data was highly compressible, indicating non-random structure. We also got the p-value to be 0.0285 which even though is a greater value than 0.01, the minimum requisite for the p-value test, doesn’t have a significantly high entropy value. We also used the hashing algorithm to artificially increase the entropy during our post-processing.
We calculated the entropy and expected values of the quantum random numbers generated by these machines to find the qubits that are mostly prone to noise. Running this same algorithm on the same quantum device multiple times, and noting the qubits with least entropy can help us identify the qubits that tend to give least random results. Thus, eliminating them or applying a correction factor on them can help us increase the fidelity of the quantum random number generator.
Additionally, we reviewed the possible factors of error in our algorithm caused by the quantum machine, and found that the decoherence times T1 and T2, SX Error, and Readout time error were the significant factors that could contribute to our QRNG algorithm. But, upon comparing the qiskit on which we received the least entropy (and thus concluded to be least random and most prone to noise) didn’t show any significant characteristic in the graphs of those parameters in the IBM Qiskit Platform’s website.
This is the link to the presentation: https://docs.google.com/presentation/d/1cEWaQOAuyFGLkDn1a3APBdkoLVTBfqFDjkoAA646zOk/edit#slide=id.g30aba68b269_0_57