Skip to content

kanishka1804/quantum-cipher-BB84

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

Quantum Cipher: BB84 Quantum Key Distribution Simulation

A Python-based simulation of the BB84 Quantum Key Distribution (QKD) protocol — one of the earliest and most secure quantum cryptography methods.
This project demonstrates qubit encoding, measurement, basis comparison, and shared key generation using Qiskit, along with Bloch sphere visualizations of quantum states.


Features

  • Step-by-step BB84 protocol simulation
  • Random qubit generation for Alice and Bob
  • Basis matching and bit comparison
  • Bloch sphere visualization of qubit states
  • Final shared secret key generation

BB84 Overview

  1. Alice sends qubits to Bob encoded randomly in two bases: Rectilinear (+) and Diagonal (×).
  2. Bob measures each qubit using a random basis.
  3. They publicly compare bases (not the bit values).
  4. Bits where the bases matched form the shared secret key.

Quick Start

1. Clone the repository

git clone https://github.com/your-username/quantum-cipher.git
cd quantum-cipher

2. Install dependencies

pip install -r requirements.txt

3. Run the simulation

python bb84_simulation.py

Simulation Outputs

1. Bloch Sphere Visualization

BS1 Output

BS2 Output

BS3 Output

BS5 Output

BS6 Output

2. Final Shared Secret Key

SS_Output


References

BB84 Quantum Key Distribution - Wikipedia
IBM Quantum Cloud Documentation

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published