Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 55 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -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
38 changes: 38 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -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
83 changes: 77 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
10 changes: 10 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
@@ -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."
3 changes: 0 additions & 3 deletions edges.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
]
Loading