diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..f0fab45 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,55 @@ +name: Deploy to GitHub Pages + +on: + push: + branches: + - main + workflow_dispatch: + +permissions: + contents: read + pages: write + id-token: write + +concurrency: + group: "pages" + cancel-in-progress: false + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: '3.12' + + - name: Install dependencies + run: | + pip install -r requirements.txt + + - name: Generate visualization + run: | + python main.py + + - name: Setup Pages + uses: actions/configure-pages@v4 + + - name: Upload artifact + uses: actions/upload-pages-artifact@v3 + with: + path: '.' + + deploy: + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + needs: build + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..a47611a --- /dev/null +++ b/.gitignore @@ -0,0 +1,38 @@ +# Python +__pycache__/ +*.py[cod] +*$py.class +*.so +.Python +env/ +venv/ +ENV/ +build/ +develop-eggs/ +dist/ +downloads/ +eggs/ +.eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +wheels/ +*.egg-info/ +.installed.cfg +*.egg + +# IDE +.vscode/ +.idea/ +*.swp +*.swo +*~ + +# OS +.DS_Store +Thumbs.db + +# Generated HTML (will be generated during deployment) +boston_network_map.html diff --git a/README.md b/README.md index 1980b15..72c7c62 100644 --- a/README.md +++ b/README.md @@ -2,25 +2,96 @@ This repository contains a simulation of a quantum network involving various institutions, fiber hubs, and quantum technologies. -created for CQN review 2024 +Created for CQN Review 2024 + +## 🌐 Live Visualization + +View the interactive network visualization at: **[GitHub Pages](https://dirkenglund.github.io/quantum-network-code/)** + +The visualization is automatically updated whenever changes are pushed to the main branch. ## File Descriptions - **nodes.py**: Contains definitions for nodes in the network, including their properties. - **edges.py**: Contains definitions for links in the network, including properties like length, transmission loss, and link type. - **main.py**: The main script that builds the network graph and creates a Folium map for visualization. +- **index.html**: Landing page for the GitHub Pages deployment with enhanced UI. - **requirements.txt**: Lists the required Python packages to run the simulation. -## How to Run +## Network Statistics + +- **24 Network Nodes** across multiple institutions +- **27 Fiber Links** connecting the quantum network +- **Multiple Quantum Technologies** including SiV, SnV, and Trapped Ions +- **Geographic Coverage** spanning the USA and international locations + +## How to Run Locally 1. Install the required packages using: -pip install -r requirements.txt + ```bash + pip install -r requirements.txt + ``` 2. Run the main script: -python main.py - + ```bash + python main.py + ``` + + Or use the build script: + ```bash + ./build.sh + ``` 3. Open the generated `boston_network_map.html` file in a web browser to view the network visualization. +## Deployment + +### GitHub Pages (Recommended) + +This project uses GitHub Actions to automatically deploy to GitHub Pages. The workflow: +1. Installs Python dependencies +2. Generates the visualization map +3. Deploys to GitHub Pages + +To enable GitHub Pages for your fork: +1. Go to repository Settings > Pages +2. Set Source to "GitHub Actions" +3. Push to main branch to trigger deployment + +### Vercel (Alternative) + +You can also deploy this project to Vercel: + +1. Install Vercel CLI: + ```bash + npm i -g vercel + ``` + +2. Deploy: + ```bash + vercel + ``` + +Or connect your GitHub repository to Vercel through their dashboard for automatic deployments. + +The `vercel.json` configuration file is already set up to: +- Install Python dependencies +- Generate the visualization map during build +- Serve the static files + +## Features + +- **Interactive Map**: Click on nodes to view detailed specifications +- **Network Visualization**: Visual representation of quantum network topology +- **Real-time Updates**: Automatically deployed when code changes +- **Responsive Design**: Works on desktop and mobile devices +- **Detailed Information**: Each node shows memory type, cooling, T2 time, status, and more + +## Technologies Used + +- **Python**: For data processing and map generation +- **Folium**: For creating interactive Leaflet maps +- **NetworkX**: For graph structure and network analysis +- **GitHub Actions**: For automated deployment +- **GitHub Pages**: For hosting the visualization -[Example:](https://github.com/dirkenglund/quantum-network-code/blob/main/partial-cqn-network.html) diff --git a/build.sh b/build.sh new file mode 100755 index 0000000..65d1030 --- /dev/null +++ b/build.sh @@ -0,0 +1,10 @@ +#!/bin/bash +# Simple build script for generating the visualization + +echo "Installing dependencies..." +pip install -r requirements.txt + +echo "Generating quantum network visualization..." +python main.py + +echo "Done! Open index.html in your browser to view the visualization." diff --git a/edges.py b/edges.py index cf3934a..3306f19 100644 --- a/edges.py +++ b/edges.py @@ -37,7 +37,4 @@ class Link: Link("ATT_HUB", "MIT-MITLL", "3 SMF-28", 80, -1.5, "fiber"), # AT&T Fiber Hub to MIT Lincoln Lab Link("ATT_HUB", "HARV", "3 SMF-28", 85, -1.5, "fiber"), # AT&T Fiber Hub to Harvard Link("ATT_HUB", "BBN", "3 SMF-28", 90, -1.5, "fiber"), # AT&T Fiber Hub to BBN Raytheon - # Additional edges for U-Maryland and IonQ - Link("UMD", "IonQ", "Trapped Ions Connection", 50, -1, "fiber"), # Example connection to IonQ - Link("UMD", "UMD-38.982397", "Trapped Ions Connection", 50, -1, "fiber"), # Example connection to another UMD location ] diff --git a/index.html b/index.html new file mode 100644 index 0000000..d3f5dec --- /dev/null +++ b/index.html @@ -0,0 +1,226 @@ + + + + + + Quantum Network Visualization - CQN Review 2024 + + + +
+

🔬 Quantum Network Simulation

+

Interactive visualization of a quantum network involving various institutions, fiber hubs, and quantum technologies - Created for CQN Review 2024

+
+ +
+
+

About This Network

+

+ This visualization displays a comprehensive quantum network connecting research institutions, + universities, and technology hubs across the United States and internationally. The network + includes both operational and planned quantum communication links using various technologies. +

+ +
+
+

24

+

Network Nodes

+
+
+

27

+

Fiber Links

+
+
+

Multiple

+

Quantum Technologies

+
+
+

2024

+

CQN Review

+
+
+
+ +
+

Network Features

+ +
+ +
+ +
+ +
+

How to Use

+

+ Explore the map above: Click on blue markers to view detailed information about each node, + including memory type, cooling specifications, coherence time (T2), operational status, and participating organizations. + Lines between nodes represent fiber optic connections with detailed specifications available on click. +

+

+ Legend: Blue lines indicate existing operational links, while red dashed lines show planned connections. + The map is interactive - you can zoom, pan, and click on any element for more information. +

+ + + View on GitHub → + +
+
+ + + + diff --git a/nodes.py b/nodes.py index 010350c..81755bc 100644 --- a/nodes.py +++ b/nodes.py @@ -34,7 +34,7 @@ class Node: "UMASS": Node("UMASS", "UMass Amherst", (42.3902, -72.5297), "N/A", "1K", "N/A", "Installed", "MIT-LL"), "UMD": Node("UMD", "University of Maryland", (38.9856, -76.9426), "trapped ions", "RT", ">1 s", "Online", "Startup"), "TRINITY": Node("TRINITY", "Trinity College (Ireland)", (53.3434, -6.2540), "SnV", "<1K", "?", "Online", "CQN"), - "BU-QuNETT": Node("BU", "Boston University Photonics Incubator", (42.350876, -71.106918), "SiV", "<1K", "soon", "Installed", "QuNETT"), + "BU-QuNETT": Node("BU-QuNETT", "Boston University Photonics Incubator", (42.350876, -71.106918), "SiV", "<1K", "soon", "Installed", "QuNETT"), "ATT_HUB": Node("ATT_HUB", "AT&T Fiber Hub", (42.3633196, -71.0925566), "N/A", "N/A", "N/A", "Online", "AT&T"), "ENG_LAB": Node("ENG_LAB", "Englund Lab (36-575)", (42.3615, -71.0930), "SiV, SnV", "4K", "N/A", "Online", "MIT"), "BBN": Node("BBN", "BBN Raytheon", (42.3897538, -71.1475561), "fridge exists, in discussions", "<100mK", "N/A", "Online", "BBN"), diff --git a/vercel.json b/vercel.json new file mode 100644 index 0000000..ac6378a --- /dev/null +++ b/vercel.json @@ -0,0 +1,12 @@ +{ + "version": 2, + "buildCommand": "pip install -r requirements.txt && python main.py", + "outputDirectory": ".", + "installCommand": "pip install -r requirements.txt", + "framework": null, + "public": true, + "github": { + "enabled": true, + "autoAlias": true + } +}