Quantum AI Systems — Appendix E Hands-On Labs
This page lists the complete set of Appendix E companion laboratories for Quantum AI Systems: Theory, Architecture, and Applications.
All labs are designed for execution in Google Colab or locally with Python 3.10+ and Qiskit, but access to runnable labs is managed from the Labs Hub.
Repository Structure
Getting Started
Use the Labs Hub to access available lab tracks and secure entry points for gated content. Public preview materials, book-access pathways, and instructor-only routes are managed there.
Beginner Labs (Part 1 / E.1)
| Lab # | Chapter | Title |
|---|---|---|
| Lab 1 | Ch. 1 — Foundations of QAIS | Superposition — Probability Distribution |
| Lab 2 | Ch. 1 — Foundations of QAIS | Bell State (Entanglement) — Correlated Outcomes |
| Lab 3 | Ch. 2 — Operations & Scientific Framework | Angle Encoding & Statevectors — Bloch Sphere |
| Lab 4 | Ch. 4 — Encoding Classical Data | Quantum Kernel SVM vs Logistic Regression |
| Lab 5 | Ch. 2 — Operations & Scientific Framework | Depth & Noise Sensitivity — Probability Decay |
| Lab 6 | Ch. 10 — Quantum Communication | Quantum Teleportation (Protocol Demo) |
| Lab 7 | Ch. 8 — Optimization & Control | ZZ Expectation Scan (QAOA-style Observable) |
| Lab 8 | Ch. 10 — Quantum Communication | BB84 QKD — Error Rate Comparison |
| Lab 9 | Ch. 9 — Quantum Encoding & Info Metrics | Fidelity & Trace Distance |
| Lab 10 | Ch. 10 — Quantum Communication | Entanglement-Assisted Tamper Check |
| Lab 11 | Ch. 8 — Optimization & Control | Simple VQE-Style Minimization |
Intermediate Labs (Part 2 / E.2)
| Lab # | Chapter | Title |
|---|---|---|
| E.2.1 | Ch. 5 — Quantum Reasoning and Decision Architectures | Hybrid / ML Comparison — Quantum Kernel SVM vs Logistic Regression |
| E.2.2 | Ch. 8 — Optimization and Control in Quantum AI Systems | Quantum Control & Parameter Sweeps — ⟨ZZ⟩ Scan |
| E.2.3 | Ch. 10 — Quantum Communication for Distributed AI Systems | Quantum Communication & Encoding — BB84 QKD |
| E.2.4 | Ch. 9 — Quantum Encoding & Information Metrics | Fidelity & Trace Distance — Robustness Metrics |
| E.2.5 | Ch. 10 — Quantum Communication for Distributed AI Systems | Trust / Tamper Verification — Entanglement Tamper Check |
| E.2.6 | Ch. 8 — Optimization and Control in Quantum AI Systems | Quantum Optimization under Noise — VQE Toy Minimization |
Advanced Labs (Part 3 / E.3)
| Lab # | Chapter | Title |
|---|---|---|
| Adv. 1 | Ch. 2 — Operations & Scientific Framework | Bloch Trajectories Under Composite Gates |
| Adv. 2 | Ch. 1 — Foundations of QAIS | CHSH Correlation Sweep |
| Adv. 3 | Ch. 7 — Quantum Machine Learning Architectures | Tiny VQC vs Logistic Regression |
| Adv. 4 | Ch. 12 — Capstone QAIS Integration | Realizing Applied Quantum AI Systems → QALIS and CRQC-LLM |
| Adv. 5 | Ch. 6 — Quantum Advantage in QAIS | Grover Success vs Noise |
| Adv. 6 | Ch. 9 — Quantum Encoding & Info Metrics | Density Matrix Simulation |
| Adv. 7 | Ch. 13 — Extended Case Studies | Case Study Stress-Test |
| Adv. 8 | Ch. 6 — Quantum Advantage in Quantum AI Systems | Shor’s Algorithm — Period Finding via Quantum Fourier Transform |
Expected Results Guide
| Lab # | Title | Expected Results |
|---|---|---|
| Lab 1 | Superposition | Balanced counts for |0⟩ and |1⟩, confirming superposition. |
| Lab 2 | Bell State | Only 00 and 11 appear, showing entanglement. |
| Lab 3 | Angle Encoding | Bloch vectors rotate with input features; amplitudes match encodings. |
| Lab 4 | Quantum Kernel SVM | Quantum kernel shows nonlinear structure; logistic regression gives linear baseline. |
| Lab 5 | Depth & Noise | Probability decays with depth under noise; flat under ideal simulation. |
| Lab 6 | Teleportation | Destination qubit matches original state after corrections. |
| Lab 7 | ZZ Expectation Scan | ⟨ZZ⟩ oscillates smoothly with scan angle. |
| Lab 8 | BB84 QKD | QBER remains low without Eve and rises sharply when Eve is present. |
| Lab 9 | Fidelity & Trace Distance | Fidelity decreases while trace distance rises under perturbation. |
| Lab 10 | Tamper Check | Untampered runs show only 00/11; tampered runs introduce 01/10. |
| Lab 11 | VQE | Energy curve decreases and converges toward the minimum. |
| E.2.1 | Hybrid / ML Comparison | Quantum kernel heatmap shows nonlinear structure; logistic regression provides a linear baseline. |
| E.2.2 | ⟨ZZ⟩ Scan | ⟨ZZ⟩ varies smoothly and periodically with scan angle, revealing interference structure. |
| E.2.3 | BB84 QKD | QBER remains low without Eve and rises sharply with interception. |
| E.2.4 | Fidelity & Trace Distance | Fidelity decreases and trace distance increases with stronger perturbation. |
| E.2.5 | Tamper Verification | Untampered runs show 00/11 only; tampering introduces 01/10. |
| E.2.6 | VQE Toy Minimization | Energy decreases with iterations and converges near the minimum. |
| Adv. 1 | Bloch Trajectories | Distinct Bloch sphere paths confirm that gate order matters. |
| Adv. 2 | CHSH Sweep | S-value exceeds 2 and approaches the Tsirelson bound (~2.828). |
| Adv. 3 | Tiny VQC | Nonlinear decision boundary richer than logistic regression. |
| Adv. 4 | Hybrid Pipeline | High accuracy (~0.95–0.97) with structured kernel heatmap. |
| Adv. 5 | Grover vs Noise | Success probability decays as noise increases. |
| Adv. 6 | Density Matrix | Mixed states contract the Bloch sphere and reduce coherence. |
| Adv. 7 | Case Study Stress-Test | Stress tests reveal resilience challenges in QALIS vs. CRQC–LLM. |
| Adv. 8 | Shor’s Algorithm | QFT measurement histograms reveal periodic frequency peaks. Continued-fraction decoding identifies candidate periods, illustrating the order-finding mechanism underlying Shor’s factoring algorithm. |
Citation
If you use these labs in teaching, research, or derivative works, please cite as:
Wilson, J. (2025). Quantum AI Systems: Appendix E Hands-On Labs. Companion Repository.
Requirements
- Python 3.10+
- Qiskit ≥ 1.0
- NumPy
- Matplotlib
- SciPy
- scikit-learn
- Optional: PennyLane for extensions
Notes
All labs are Colab-ready — no local installation is required for supported runs.
For local runs, install dependencies with: