Installation Guide
This guide provides step-by-step instructions for installing and setting up the QKD Simulation Platform on your system.
System Requirements
Minimum Requirements
Operating System: Windows 10+, macOS 10.14+, or Linux (Ubuntu 18.04+)
Python: 3.8 or higher
Node.js: 14.0 or higher (for frontend)
Memory: 4 GB RAM
Storage: 2 GB free disk space
Recommended Requirements
Operating System: Windows 11, macOS 12+, or Ubuntu 20.04+
Python: 3.9 or higher
Node.js: 16.0 or higher
Memory: 8 GB RAM
Storage: 5 GB free disk space
Processor: Multi-core CPU for faster simulations
Prerequisites
Python Installation
Download Python: Visit python.org and download the latest Python version
Install Python: Run the installer and ensure “Add Python to PATH” is checked
Verify Installation: Open a terminal/command prompt and run:
python --version pip --version
Node.js Installation
Download Node.js: Visit nodejs.org and download the LTS version
Install Node.js: Run the installer and follow the setup wizard
Verify Installation: Open a terminal/command prompt and run:
node --version npm --version
Git Installation
Download Git: Visit git-scm.com and download Git
Install Git: Run the installer with default settings
Verify Installation: Open a terminal/command prompt and run:
git --version
Installation Methods
Method 1: Clone from Repository (Recommended)
Clone the Repository:
git clone https://github.com/your-username/qkd-simulation-platform.git cd qkd-simulation-platform
Install Python Dependencies:
pip install -r requirements.txt
Install Frontend Dependencies:
cd frontend npm install cd ..
Method 2: Download ZIP Archive
Download: Download the ZIP archive from the GitHub releases page
Extract: Extract the archive to your desired location
Install Dependencies: Follow steps 2-3 from Method 1
Method 3: Using pip (Backend Only)
For users who only need the backend simulation engine:
pip install qkd-simulation-platform
Platform-Specific Instructions
Windows Installation
Install Python: - Download Python from python.org - Run installer as Administrator - Check “Add Python to PATH” and “Install for all users”
Install Node.js: - Download Node.js LTS from nodejs.org - Run installer with default settings
Install Git: - Download Git from git-scm.com - Use default settings during installation
Clone and Install: - Open Command Prompt or PowerShell as Administrator - Follow Method 1 installation steps
Verify Installation: - Open Command Prompt and run:
python --version node --version git --version
macOS Installation
Install Homebrew (if not already installed):
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
Install Python:
brew install python
Install Node.js:
brew install node
Install Git:
brew install git
Clone and Install: - Open Terminal - Follow Method 1 installation steps
Verify Installation:
python3 --version node --version git --version
Linux Installation (Ubuntu/Debian)
Update System:
sudo apt update sudo apt upgrade
Install Python:
sudo apt install python3 python3-pip python3-venv
Install Node.js:
curl -fsSL https://deb.nodesource.com/setup_lts.x | sudo -E bash - sudo apt-get install -y nodejs
Install Git:
sudo apt install git
Clone and Install: - Open Terminal - Follow Method 1 installation steps
Verify Installation:
python3 --version node --version git --version
Virtual Environment Setup (Recommended)
Using a virtual environment is recommended to avoid conflicts with system Python packages:
Create Virtual Environment:
python -m venv qkd_env
Activate Virtual Environment:
Windows: .. code-block:: cmd
qkd_envScriptsactivate
macOS/Linux: .. code-block:: bash
source qkd_env/bin/activate
Install Dependencies:
pip install -r requirements.txt
Deactivate (when done):
deactivate
Docker Installation (Alternative)
For users who prefer containerized deployment:
Install Docker: Follow instructions at docker.com
Build and Run:
# Build the Docker image docker build -t qkd-simulation-platform . # Run the container docker run -p 8000:8000 -p 3000:3000 qkd-simulation-platform
Verification
After installation, verify that everything is working correctly:
Test Backend:
# Start the backend server uvicorn api:app --reload
Open a web browser and navigate to http://127.0.0.1:8000
You should see the API welcome message
Test Frontend:
# In a new terminal, start the frontend cd frontend npm start
Open a web browser and navigate to http://localhost:3000
You should see the QKD Simulation Platform interface
Run a Test Simulation:
In the frontend, select a protocol (e.g., DPS-QKD)
Configure a simple two-node network
Run a simulation and verify results are displayed
Troubleshooting
Common Issues
- Python not found:
Ensure Python is added to PATH
Try using python3 instead of python
- pip not found:
Install pip: python -m ensurepip –upgrade
Or use: python -m pip install -r requirements.txt
- Node.js/npm not found:
Reinstall Node.js and ensure it’s added to PATH
Try using nodejs instead of node on some Linux systems
- Permission Errors:
Use sudo on Linux/macOS for system-wide installation
Run Command Prompt as Administrator on Windows
Use virtual environments to avoid permission issues
- Port Already in Use:
Kill processes using ports 8000 or 3000
Use different ports: uvicorn api:app –reload –port 8001
- Frontend Build Errors:
Clear npm cache: npm cache clean –force
Delete node_modules and reinstall: rm -rf node_modules && npm install
- Backend Import Errors:
Ensure you’re in the correct directory
Check that all dependencies are installed
Verify Python path includes the project directory
Getting Help
If you encounter issues during installation:
Check the FAQ: Common questions and solutions
Search Issues: Look for similar problems in the GitHub issues
Create an Issue: Report bugs or request help on GitHub
Community Support: Join the discussion forum or mailing list
Next Steps
After successful installation:
Quick Start: Follow the Quick Start Guide tutorial
User Guide: Learn about all features in the User Guide
Examples: Explore practical examples in the examples section
API Reference: Study the complete API documentation