Inspiration

Most of today's encryption relies on problems that are hard for classical computers, and that assumption weakens as quantum computers improve. Quantum key distribution (QKD) takes a different route: its secrecy comes from physics, not from computational difficulty. We were drawn to Ekert's 1991 (E91) protocol because it ties security to entanglement and Bell's theorem. If an eavesdropper touches the qubits, the correlations that Alice and Bob observe visibly degrade. We wanted to see that happen in a simulation we built ourselves.

What it does

The project is a Qiskit simulation of the E91 protocol with an eavesdropper:

  • Prepares Bell pairs and lets Alice and Bob each measure along randomly chosen directions in the x-z plane.
  • Sifts the key from rounds where their directions coincide, and computes the quantum bit error rate (QBER).
  • Estimates correlation functions and the CHSH value S, with its standard error. A value above the classical bound of 2 certifies entanglement.
  • Models an intercept-resend attack by Eve using mid-circuit measurement, and compares the results with analytic predictions.
  • Stretch goal: asks whether interception can be told apart from ordinary depolarizing noise in the channel.

How we built it

We used Python, Qiskit 2.6 and Qiskit Aer 0.18, with NumPy and Matplotlib for analysis and plots. We implemented the nine tasks in order:

  1. Bell-state preparation.
  2. Measurement along an arbitrary direction, using an R_y rotation before a Z-basis measurement.
  3. Intercept-resend attack.
  4. A per-round circuit with a channel and a bit layout.
  5. Correlations, CHSH value and standard error.
  6. Sifting and QBER.
  7. Analytic predictions.
  8. The end-to-end protocol.
  9. The noise-versus-interception stretch task.

Each function was checked against the closed-form quantum prediction E(a,b) = cos(a − b) and against statistical tolerances. The code is meant to hold for any random seed, not just the default one.

Challenges we ran into

  • Conventions: keeping the bit-to-eigenvalue mapping (0 ↦ +1, 1 ↦ −1) and the angle and index conventions consistent across circuits, estimators and analytic formulas.
  • Statistics: with finite shots, S fluctuates, so we had to report standard errors and avoid claims that depend on one lucky seed.
  • Separating effects: both depolarizing noise and eavesdropping lower the CHSH value and raise the QBER, so telling them apart needs careful reasoning.
  • Scope of the claim: being clear about what a Bell violation certifies (entanglement) versus what a full security proof requires.

Accomplishments that we're proud of

  • A complete, reproducible simulation of E91, from Bell-pair preparation to eavesdropper detection.
  • Simulated results that match the analytic predictions within statistical error.
  • A clear demonstration that interception lowers the CHSH value and raises the QBER.
  • Honest scientific framing: the notebook is a teaching simulation, not a secure QKD implementation.

(Edit this section to reflect your actual measured results, such as your S values and QBER, before submitting.)

What we learned

  • How to implement measurements along arbitrary directions in Qiskit and how to read per-shot results.
  • Why CHSH works as an entanglement witness, and how the quantum bound 2√2 compares with the classical bound 2.
  • How intercept-resend attacks leave a statistical fingerprint on the correlations.
  • That a Bell test alone is not a full security proof. Real QKD also needs authenticated channels, finite-key analysis, error correction, privacy amplification and device-imperfection handling.

What's next for Qiskit Quantum Hackathon teammed

  • Add error correction and privacy amplification to turn the sifted key into a usable secret key.
  • Use finite-key statistics for rigorous parameter estimation.
  • Model more realistic noise (loss, detector errors) and more general attacks beyond intercept-resend.
  • Move on to Challenge 2 (Grover search under noise) and Challenge 3 (VQE for LiH).
  • Run the protocol on real quantum hardware.

Built With

Share this project:

Updates

Submission history