This interactive application provides a dynamic and educational visualization of the BB84 Quantum Key Distribution Protocol. It allows users to understand the fundamental principles of quantum cryptography through an engaging and visual interface.
- Interactive Protocol Simulation: Adjust parameters such as bit quantity, channel error rate, and presence of an eavesdropper
- Step-by-Step Visualization: Walk through each stage of the BB84 protocol with clear explanations
- Quantum Circuit Display: View actual quantum circuits used in different scenarios
- Real-Time Result Analysis: Analyze security metrics and compare scenarios with/without eavesdropping
- Educational Content: Learn about quantum cryptography principles while interacting with the simulation
- Clone this repository:
git clone <repository-url>
cd <repository-directory>- Install the required dependencies:
pip install -r requirements.txt- Run the Streamlit application:
python -m streamlit run app.py -
If Streamlit prompts for an email to receive updates, you can leave it blank and press
enter -
Open your browser and go to the address shown in the terminal (usually http://localhost:8501)
-
Use the sidebar to set parameters and run simulations
-
Navigate through the different tabs and steps to explore the BB84 protocol
- Python 3.8 or higher
- See requirements.txt for all dependencies
The application simulates the BB84 protocol, introduced by Charles Bennett and Gilles Brassard in 1984. This protocol allows two parties (Alice and Bob) to generate a shared random secret key that can be used for secure communication. The simulation demonstrates:
- How quantum properties enable secure key distribution
- How eavesdropping attempts can be detected through quantum mechanics principles
- The effects of channel noise on protocol security
This tool is specifically designed for academic presentations, with clear visualizations and intuitive controls that make it easy to demonstrate quantum cryptography concepts to audiences with different levels of knowledge.