Skip to content

Commit 9a0d3cf

Browse files
committed
Updated README
1 parent 84c2714 commit 9a0d3cf

File tree

1 file changed

+98
-34
lines changed

1 file changed

+98
-34
lines changed

README.md

Lines changed: 98 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -61,13 +61,18 @@ All examples have been updated and tested for **Qiskit 2.x compatibility** and *
6161
git clone https://github.com/AIComputing101/quantum-computing-101.git
6262
cd quantum-computing-101
6363

64-
# Build and run CPU container
64+
# Build CPU container using unified build script
6565
cd docker
66-
./build.sh cpu
67-
./run.sh -v cpu -e module1_fundamentals/01_classical_vs_quantum_bits.py
66+
./build-unified.sh cpu
6867

69-
# Or start interactive session
70-
./run.sh -v cpu -i
68+
# Run with docker-compose (recommended)
69+
docker-compose up -d qc101-cpu
70+
71+
# Or run specific example directly
72+
docker run -it --rm \
73+
-v $(pwd)/../examples:/home/qc101/quantum-computing-101/examples \
74+
quantum-computing-101:cpu \
75+
python examples/module1_fundamentals/01_classical_vs_quantum_bits.py
7176
```
7277

7378
#### Option 2: Local Python Installation
@@ -88,14 +93,18 @@ python verify_examples.py --quick
8893

8994
#### Option 3: GPU-Accelerated (For Advanced Users)
9095
```bash
91-
# NVIDIA GPU acceleration (5-8x speedup with CUDA 12.6)
96+
# NVIDIA GPU acceleration (PyTorch 2.8.0 + CUDA 12.9)
9297
cd docker
93-
./build.sh gpu-nvidia
94-
./run.sh -v gpu-nvidia -e module6_machine_learning/01_quantum_neural_network.py
98+
./build-unified.sh nvidia
99+
docker-compose up -d qc101-nvidia
100+
101+
# AMD ROCm GPU acceleration (latest ROCm PyTorch)
102+
./build-unified.sh amd
103+
docker-compose up -d qc101-amd
95104

96-
# AMD ROCm GPU acceleration (ROCm 6.x with MI300 series support)
97-
./build.sh gpu-amd
98-
./run.sh -v gpu-amd -e module6_machine_learning/01_quantum_neural_network.py
105+
# Run specific example with GPU
106+
docker exec -it qc101-nvidia \
107+
python /home/qc101/quantum-computing-101/examples/module6_machine_learning/01_quantum_neural_network.py
99108
```
100109

101110

@@ -142,8 +151,10 @@ Real-world applications and quantum cryptography:
142151
# Local installation
143152
python examples/module8_applications/01_quantum_chemistry_drug_discovery.py
144153

145-
# Docker
146-
./docker/run.sh -v cpu -e module8_applications/01_quantum_chemistry_drug_discovery.py
154+
# Docker (with docker-compose)
155+
cd docker && docker-compose up -d qc101-cpu
156+
docker exec -it qc101-cpu python \
157+
/home/qc101/quantum-computing-101/examples/module8_applications/01_quantum_chemistry_drug_discovery.py
147158
```
148159
Simulate molecular systems for drug discovery using VQE (Variational Quantum Eigensolver).
149160

@@ -153,7 +164,9 @@ Simulate molecular systems for drug discovery using VQE (Variational Quantum Eig
153164
python examples/module8_applications/02_financial_portfolio_optimization.py
154165

155166
# Docker with NVIDIA GPU acceleration
156-
./docker/run.sh -v gpu-nvidia -e module8_applications/02_financial_portfolio_optimization.py
167+
cd docker && docker-compose up -d qc101-nvidia
168+
docker exec -it qc101-nvidia python \
169+
/home/qc101/quantum-computing-101/examples/module8_applications/02_financial_portfolio_optimization.py
157170
```
158171
Optimize investment portfolios using QAOA (Quantum Approximate Optimization Algorithm).
159172

@@ -162,8 +175,10 @@ Optimize investment portfolios using QAOA (Quantum Approximate Optimization Algo
162175
# Local installation
163176
python examples/module8_applications/04_cryptography_cybersecurity.py
164177

165-
# Docker
166-
./docker/run.sh -v cpu -e module8_applications/04_cryptography_cybersecurity.py
178+
# Docker (with docker-compose)
179+
cd docker && docker-compose up -d qc101-cpu
180+
docker exec -it qc101-cpu python \
181+
/home/qc101/quantum-computing-101/examples/module8_applications/04_cryptography_cybersecurity.py
167182
```
168183
Implement quantum key distribution protocols (BB84, E91) and post-quantum cryptography.
169184

@@ -172,20 +187,72 @@ Implement quantum key distribution protocols (BB84, E91) and post-quantum crypto
172187
# Local installation
173188
python examples/module4_algorithms/02_grovers_search_algorithm.py
174189

175-
# Docker
176-
./docker/run.sh -v cpu -e module4_algorithms/02_grovers_search_algorithm.py
190+
# Docker (with docker-compose)
191+
cd docker && docker-compose up -d qc101-cpu
192+
docker exec -it qc101-cpu python \
193+
/home/qc101/quantum-computing-101/examples/module4_algorithms/02_grovers_search_algorithm.py
177194
```
178195
Experience quadratic speedup in unstructured search problems.
179196

180-
### 🐳 **Docker Benefits (New v2.0!)**
181-
- **🎯 Advanced GPU Support**: NVIDIA CUDA 12.6 + AMD ROCm 6.x
197+
### 🐳 **Docker Benefits (Unified v2.0 Architecture!)**
198+
- **🎯 Advanced GPU Support**: NVIDIA CUDA 12.9 + AMD ROCm latest
182199
- **⚡ Zero Setup**: No Python installation required
183200
- **🚀 GPU Acceleration**: 5-8x speedup for large simulations
184201
- **🔄 Reproducible**: Identical environment across all machines
185202
- **☁️ Cloud Ready**: Easy deployment to AWS/GCP/Azure
186-
- **📊 Three Variants**: CPU (1.2GB), NVIDIA GPU (3.5GB), AMD ROCm (3.2GB)
187-
- **🏗️ Latest Hardware**: Supports NVIDIA H100/A100 and AMD MI300A/MI300X GPUs
203+
- **📊 Three Variants**: CPU, NVIDIA GPU, AMD ROCm
204+
- **🏗️ Latest Hardware**: PyTorch 2.8.0 + CUDA 12.9, ROCm PyTorch latest
188205
- **🖥️ Headless Ready**: All examples work in non-interactive/remote environments
206+
- **🔧 Unified Architecture**: Single Dockerfile with multi-stage builds
207+
- **📦 Volume Mounts**: Live code editing with instant container sync
208+
209+
### 🔄 **Docker Development Workflow**
210+
211+
The Docker setup supports seamless development with volume mounting:
212+
213+
```bash
214+
# Start container with volume mounts (via docker-compose)
215+
cd docker
216+
docker-compose up -d qc101-cpu
217+
218+
# Edit examples on your host machine
219+
cd ../examples/module1_fundamentals
220+
# Edit files in your favorite editor - changes sync instantly!
221+
222+
# Run in container - sees your edits immediately
223+
docker exec -it qc101-cpu python \
224+
/home/qc101/quantum-computing-101/examples/module1_fundamentals/01_classical_vs_quantum_bits.py
225+
226+
# Output files appear in your host's outputs/ directory
227+
ls ../outputs/
228+
```
229+
230+
**Volume Mount Benefits:**
231+
- ✅ Edit files on host → Changes appear instantly in container
232+
- ✅ Container outputs save to host → Results immediately visible
233+
- ✅ No rebuild needed → Instant feedback loop
234+
- ✅ Use any IDE → VS Code, PyCharm, Vim, etc.
235+
236+
### 📊 **Jupyter Lab Access**
237+
238+
Each Docker variant runs Jupyter Lab on different ports to avoid conflicts:
239+
240+
```bash
241+
# CPU variant - Port 8888
242+
cd docker
243+
docker-compose up qc101-cpu
244+
# Access at: http://localhost:8888
245+
246+
# NVIDIA variant - Port 8889
247+
docker-compose up qc101-nvidia
248+
# Access at: http://localhost:8889
249+
250+
# AMD variant - Port 8890
251+
docker-compose up qc101-amd
252+
# Access at: http://localhost:8890
253+
```
254+
255+
For detailed Docker setup, volume mounting, and advanced configuration, see [docker/README.md](docker/README.md).
189256

190257
## 🛠️ Features
191258

@@ -238,20 +305,17 @@ quantum-computing-101/
238305
│ ├── module7_hardware/ # 5 hardware examples
239306
│ ├── module8_applications/ # 6 industry examples
240307
│ └── utils/ # Shared utilities
241-
├── docker/ # **NEW v2.0** - Complete containerization
242-
│ ├── README.md # Docker setup guide
308+
├── docker/ # **v2.0 Unified Architecture** - Complete containerization
309+
│ ├── README.md # Comprehensive Docker setup guide
310+
│ ├── Dockerfile # Unified multi-variant Dockerfile
311+
│ ├── build-unified.sh # New unified build script
312+
│ ├── docker-compose.yml # Multi-service orchestration (qc101-cpu/nvidia/amd)
313+
│ ├── entrypoint.sh # Container entry point
243314
│ ├── requirements/ # Modular requirements for Docker
244315
│ │ ├── base.txt # Core frameworks for all variants
245-
│ │ ├── cpu.txt # CPU optimizations
246-
│ │ ├── gpu-nvidia.txt # NVIDIA CUDA 12.6 packages
247-
│ │ └── gpu-amd.txt # AMD ROCm 6.x packages with MI300 support
248-
│ ├── Dockerfile.cpu # Lightweight CPU container (1.2GB)
249-
│ ├── Dockerfile.gpu-nvidia # NVIDIA CUDA 12.6 container (3.5GB)
250-
│ ├── Dockerfile.gpu-amd # AMD ROCm 6.x container with MI300 support (3.2GB)
251-
│ ├── Dockerfile.base # Multi-stage base image
252-
│ ├── docker-compose.yml # Complete orchestration
253-
│ ├── build.sh # Smart build script with GPU detection
254-
│ └── run.sh # Comprehensive container runner
316+
│ │ ├── cpu.txt # CPU-specific dependencies
317+
│ │ ├── gpu-nvidia.txt # NVIDIA CUDA 12.9 packages
318+
│ │ └── gpu-amd.txt # AMD ROCm packages
255319
├── verify_examples.py # Quality assurance tool
256320
├── BEGINNERS_GUIDE.md # Complete learning pathway (Updated v2.0)
257321
├── QISKIT_2X_MIGRATION.md # Qiskit 2.x compatibility and headless setup

0 commit comments

Comments
 (0)