Give quantum formula for seed to generate random numbers, calculation example
- User
Give quantum formula for seed to generate random numbers, calculation example
- Assistant
Quantum random number generation (QRNG) exploits the inherent randomness of quantum mechanics to generate random numbers. One of the most commonly referenced quantum processes is the measurement of a quantum system's state, such as a photon passing through a beam splitter.
Quantum Random Number Generation Process
-
Quantum State Preparation: Prepare a quantum state, typically using a photon. For example, you may have a single photon in a superposition state.
-
Measurement: Measure the state of the photon. The outcome of this measurement will be fundamentally random due to the principles of quantum mechanics.
-
Post-Processing: Convert the raw measurement outcomes into uniformly distributed random numbers, if necessary.
Example Calculation
Suppose we are using a single photon that can be either detected in two paths (A or B) after passing through a beam splitter.
Step 1: Prepare Quantum State
The state of the photon can be described by the basis states:
- (|A\rangle): Photon detected in path A
- (|B\rangle): Photon detected in path B
Assuming initially the photon is prepared in a superposition: [ |\psi\rangle = \frac{1}{\sqrt{2}}(|A\rangle + |B\rangle) ]
Step 2: Measurement
When we measure the state, we have two possible outcomes:
- Outcome 1: Photon is detected in path A (assign value 0).
- Outcome 2: Photon is detected in path B (assign value 1).
Using the Born Rule, the probabilities of measuring each outcome are:
- (P(A) = |\langle A|\psi\rangle|^2 = \left(\frac{1}{\sqrt{2}}\right)^2 = \frac{1}{2})
- (P(B) = |\langle B|\psi\rangle|^2 = \left(\frac{1}{\sqrt{2}}\right)^2 = \frac{1}{2})
Step 3: Generate Random Number
When we perform the measurement, we might get either:
- If the photon is detected in path A, we exit with random number (0).
- If the photon is detected in path B, we exit with random number (1).
Repeating this measurement process multiple times will generate a sequence of random bits. For example, after 10 measurements, you may get the following sequence:
1, 0, 1, 1, 0, 0, 1, 1, 0, 0Step 4: Post-Processing (if necessary)
Finally, if you require uniformly distributed random numbers, you might need to convert the binary string into larger numerical values. For instance, combining groups of bits can yield numbers in the range ([0, 1023]) from the above binary:
- Grouped as (10110) (which is (22)), (01100) (which is (12)), etc.
-