Algorithm 1.
Overview of protocol implementation
| (1) Calibration |
| (a) Determine the QEF F(CZ) and its power β used for each executed trial. |
| (b) Fix n—the maximum number of trials. |
| (2) Randomness accumulation: Run the experiment to acquire up to n trials. After each trial i. |
| (a) Update the running log2-QEF value , where cj and zj are the observed values of Cj and Zj |
| (b) If , smiddle the experiment, set the number of trials actually executed as nact = i, and set the success event P = 1. |
| (3) Randomness extraction: If P = 1, then extract k random bits with error ϵ. |