1. A method for generating random numbers based on an optical process of quantum nature, the method comprising: emitting photons from a light source; absorbing, by a photon sensor having a plurality of pixels, the photons emitted from the light source; calculating respective minimum entropy levels for the plurality of pixels of the photon sensor; associating one of a plurality of extractors with at least one of the plurality of pixels based on the calculated minimum entropy level of the at least one pixel; and generating, by the extractor associated with the at least one pixel, a number of high-entropy bits for generating a random number.