Solution (source code)

= Solution

For <quantum key distribution> with <Bell pairs>, a source distributes one <photon> to Alice and its partner to Bob. One implementation is the <Ekert protocol>, using the <spin singlet state> $|\psi^-\rangle=(|01\rangle-|10\rangle)/\sqrt2$. Each party independently chooses a <polarization> measurement setting after distribution. Equal settings give opposite outcomes; Bob reverses his outcome-to-<bit> assignment so these rounds give matching random <bits>. Other setting pairs test a <Bell inequality>, with ideal <spin singlet state> correlation $E(\mathbf a,\mathbf b)=-\mathbf a\cdot\mathbf b$ for the corresponding <Bloch sphere> axes. The optical <polarizer> angles correspond to twice those angles on the appropriate <Bloch sphere> great circle.

Over an <authenticated public classical channel>, Alice and Bob announce settings and detection times, select coincident detection rounds, and perform <key sifting>. They reveal a test sample to estimate the <quantum bit error rate> and the chosen <Bell inequality> signal, discarding all revealed <bits>. Excess disturbance causes an abort. Otherwise <information reconciliation> makes the retained strings agree and <privacy amplification> shortens them to remove an adversary's residual information, including information disclosed during reconciliation. The tested <quantum entanglement> supplies correlations unavailable to an independently prepared classical mixture; a security claim also requires stated detector and sampling assumptions.<Quantum cryptography based on Bell's theorem by Artur K. Ekert>[1991, entanglement-based key distribution and Bell-correlation test]{ref}

Each <photon polarization> analyzer uses a setting-dependent <waveplate> followed by a <polarizing beam splitter>. A <single-photon detector> on each output converts the routed <photon> into an electrical click, recording the outcome and its time. For example, a <single-photon avalanche diode> is a reverse-biased <photodiode> operated above breakdown: absorption creates a charge carrier, <impact ionization> triggers an avalanche, and the resulting pulse is registered. A quenching circuit lowers the bias to stop the avalanche and then resets the device. The <detector dead time> during recovery limits the count rate; <dark counts> produce false clicks, and imperfect detection loses rounds. The <polarization> information comes from the preceding analyzer, while the detector registers which output fired. Coincidence timing associates Alice's and Bob's records with the same emitted pair. https://www.thorlabs.co.jp/images/Catalog/V21/V21_7_LightAnalysis.pdf[Thorlabs, Light Analysis catalogue, Single Photon Counter Modules: Geiger-mode operation, active quenching, blind time and dark counts]{ref}