A simulation of quantum key distribution using entangled photon pairs.
This project demonstrates Quantum Key Distribution (QKD) using the E91 protocol, introduced by Artur Ekert in 1991.
The E91 protocol uses entangled photon pairs and the Bell Inequality to securely generate a shared secret key between two parties (Alice and Bob).
Unlike classical cryptography, the security here is guaranteed by laws of quantum mechanics, not computational hardness.
- Simulates entangled qubits shared between Alice and Bob
- Implements random basis selection for measurements
- Applies Bell Inequality (CHSH test) for eavesdropper detection
- Generates a shared cryptographic key
- Detects if an attacker (Eve) tries to intercept qubits
- Fully implemented using Python (NumPy / Qiskit / custom logic)
E91 is based on the concept of quantum entanglement:
- Alice and Bob receive entangled photon pairs
- They measure their particles using randomly selected bases
- Correlations of entangled states follow quantum mechanics
- An attacker (Eve) breaks these correlations
β So if the Bell inequality is violated, the channel is secure
β If not, eavesdropping is detected
- Entangled photon pairs are created (e.g., Bell state |Ξ¦βΊβ©).
- One photon goes to Alice, the other to Bob.
- Both choose random measurement bases:
- Alice: A1, A2
- Bob: B1, B2
- They measure their photons and record results.
- They publicly share only their measurement bases (not outcomes).
- Matching basis pairs β used for key generation
- Mismatched basis pairs β used for Bell Inequality test
- If Bell test is satisfied β secure
Else β Eve detected
- Python
- NumPy β vector/matrix calculations
- Qiskit (optional) β simulating quantum circuits & Bell states
- Matplotlib (optional) β plot Bell test results