  A quantum random number generator (QRNG) as a genuine source of randomness is
essential in many applications, such as number simulation and cryptography.
Recently, a source-independent quantum random number generator (SI-QRNG), which
can generate secure random numbers with untrusted sources, has been realized.
However, the measurement loopholes of the trusted but imperfect devices used in
SI-QRNGs have not yet been fully explored, which will cause security problems,
especially in high-speed systems. Here, we point out and evaluate the security
loopholes of practical imperfect measurement devices in SI-QRNGs. We also
provide corresponding countermeasures to prevent these information leakages by
recalculating the conditional minimum entropy and adding a monitor.
Furthermore, by taking into account the finite-size effect,we show that the
influence of the afterpulse can exceed that of the finite-size effect with the
large number of sampled rounds. Our protocol is simple and effective, and it
promotes the security of SI-QRNG in practice as well as the compatibility with
high-speed measurement devices, thus paving the way for constructing ultrafast
and security-certified commercial SI-QRNG systems.
