- Real random number generation for lottery-game using IBM quantum computer
IBM Qiskit library
-
"Random number generation(RNG) is a sequence of numbers or symbols that cannot be reasonably predicted better than by random chance is generated. This means that the particular outcome sequence will contain some patterns detectable in hindsight but unpredictable to foresight"(Wikipedia)
-
There are two method for RNG
-
"True" random number generation(TRNG) uses measurement of some physical phenomenon that is expected to be random and then compensates for possible biases in the measurement process
-
"Pseudo" random number generation(PRNG) uses computational algorithm that can produce long sequences of apparently random results, which are in fact completely determined by a shorter initial value, known as a seed value or key
-
-
In this application, we use IBM cloud quantum computer to generate real random number using the superpositon of the qubit states.
-
There are some way for generating random number using Qiskit(Quantum Information Software Kit)
-
- Qiskit RNG
- It needed IBM Quantum account for IBM Quantum backends. So, skip this method for this application. If you want to use this library, check this links below
-
- Qauntum circuit based random number generation. IBM Quantum system services cryogenic based quantum processor
- Using this cloud based quantum computer, we could make quantum circuit for specific operation
- In this application we use the "H(Hadamard) gate" for
"superposition" and "CNOT gate" for "entanglement" between the qubits
- Superposition state of the single qubit has 50/50 measurement probability of |0⟩/|1⟩ state
- Entanglement Actually, because of the RNG generation time and IBM Q account problem, we didn't used 'Real' device.
- Add two qubit for entanglement
- Applying user's birth-day to initial probability of the qubits
- Add CNOT gate on birth-day qubit and RNG qubit
- Your birth-day will change the 50/50 probability of some qubits to another random value
-
: Select 5 numbers in range 70 for 'white ball', 1 more selection in range 25 for 'power ball'
-
: Select 6 numbers in the range 50 and select one 'Joker Ball' in the range 5
-
: Select 5 numbers in the range 49 and select one 'Lucky number' in the range 10
-
Custom
: Customize your Q-lottery-game
- Although real random number generated by QC is more random than pseudo random number,
it does not guarantee winning of the lottery!!
- Just use it for fun!
- If you want to add another "Lottery game", follow the form and send PR to github