Skip to content

Commit 1c71688

Browse files
committed
Fixed the examples
1 parent 8832b32 commit 1c71688

12 files changed

Lines changed: 2342 additions & 83 deletions

README.md

Lines changed: 60 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,31 @@
11
# Quantum Computing 101 🚀⚛️
22

3-
A comprehensive, hands-on quantum computing education platform with **40 production-ready examples** covering everything from basic quantum concepts to advanced industry applications.
3+
**The most comprehensive, beginner-friendly quantum computing course** with **46+ production-ready examples** covering everything from "what is a qubit?" to industry applications in drug discovery and financial optimization.
44

55
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
66
[![Python 3.8+](https://img.shields.io/badge/python-3.8+-blue.svg)](https://www.python.org/downloads/)
77
[![Qiskit](https://img.shields.io/badge/Qiskit-2.x-purple.svg)](https://qiskit.org/)
8-
[![Code Lines](https://img.shields.io/badge/lines_of_code-24.5k+-green.svg)]()
9-
[![Examples](https://img.shields.io/badge/examples-40%2F40_complete-brightgreen.svg)]()
8+
[![Beginner Friendly](https://img.shields.io/badge/beginner-friendly-brightgreen.svg)]()
9+
[![Examples](https://img.shields.io/badge/examples-46%2B_working-brightgreen.svg)]()
1010

11-
## 🎯 Project Overview
11+
## 🎯 Perfect for Complete Beginners
1212

13-
**Quantum Computing 101** is a complete educational platform designed to teach quantum computing from the ground up. With 8 progressive modules and 40 hands-on examples, this project provides the most comprehensive open-source quantum computing curriculum available.
13+
**Never studied quantum mechanics? No problem!** This course is designed for software developers, students, and professionals who want to understand quantum computing without needing a PhD in physics.
14+
15+
### 🌟 What Makes This Course Special
16+
- **🎓 Zero Prerequisites**: Assumes no quantum mechanics or advanced math background
17+
- **🛠️ Hands-On Learning**: Learn by running real quantum programs, not just reading theory
18+
- **📈 Gentle Learning Curve**: Carefully designed progression from basic concepts to advanced applications
19+
- **🐛 Beginner-Focused**: Includes debugging guides, common mistakes, and troubleshooting
20+
- **📊 Rich Visualizations**: Beautiful plots, Bloch spheres, and circuit diagrams make concepts clear
21+
- **⚡ Real-World Ready**: Industry applications across chemistry, finance, cryptography, and AI
22+
23+
### 🚨 Reality Check Included
24+
Unlike other courses that oversell quantum computing, we give you an honest assessment of:
25+
- What quantum computers can and cannot do today
26+
- Realistic timeline for practical applications (hint: we're still early!)
27+
- Current hardware limitations and why they matter
28+
- Why learning quantum computing now still makes sense for your career
1429

1530
### ✨ What Makes This Special
1631

@@ -21,11 +36,26 @@ A comprehensive, hands-on quantum computing education platform with **40 product
2136
- **⚡ Production Quality**: Professional code with comprehensive error handling and documentation
2237
- **🌐 Multi-Platform**: Foundation for Qiskit, Cirq, and PennyLane integration
2338

24-
## 🚀 Quick Start
39+
## 🚀 Quick Start for Beginners
40+
41+
### 📖 New to Quantum Computing? Start Here!
42+
43+
**👉 [Read the Complete Beginner's Guide](BEGINNERS_GUIDE.md)** - Your roadmap to quantum computing mastery
44+
45+
**Essential First Steps:**
46+
1. **Hardware Reality Check**: Run `python examples/module1_fundamentals/08_hardware_reality_check.py`
47+
2. **Your First Qubit**: Run `python examples/module1_fundamentals/01_classical_vs_quantum_bits.py`
48+
3. **Quantum "Magic"**: Run `python examples/module1_fundamentals/07_no_cloning_theorem.py`
49+
50+
### Prerequisites (Don't Worry - We Teach Everything!)
51+
- Python 3.8 or higher (we'll help you set this up)
52+
- Basic programming knowledge (if/else, loops, functions)
53+
- Curiosity about the future of computing!
2554

26-
### Prerequisites
27-
- Python 3.8 or higher
28-
- pip package manager
55+
**You do NOT need:**
56+
- ❌ PhD in quantum physics
57+
- ❌ Advanced linear algebra
58+
- ❌ Expensive quantum computer
2959

3060
### Installation
3161

@@ -52,14 +82,19 @@ docker run -it quantum101/examples python module1_fundamentals/01_classical_vs_q
5282

5383
## 📚 Learning Modules
5484

55-
### 🎓 Foundation Tier (Modules 1-3)
56-
Perfect for beginners with no quantum background:
85+
### 🎓 Foundation Tier (Modules 1-3) - NEW BEGINNER FOCUS!
86+
Perfect for complete beginners - now with enhanced explanations and reality checks:
5787

58-
| Module | Topic | Examples | Lines of Code |
59-
|--------|-------|----------|---------------|
60-
| **[Module 1](modules/Module1_Quantum_Fundamentals.md)** | Quantum Fundamentals | 5 | 1,703 |
61-
| **[Module 2](modules/Module2_Mathematical_Foundations.md)** | Mathematical Foundations | 5 | 2,361 |
62-
| **[Module 3](modules/Module3_Quantum_Programming_Basics.md)** | Quantum Programming | 5 | 3,246 |
88+
| Module | Topic | Examples | Key New Features |
89+
|--------|-------|----------|------------------|
90+
| **[Module 1](modules/Module1_Quantum_Fundamentals.md)** | Quantum Fundamentals | **8**| **NEW:** No-Cloning, Hardware Reality, Enhanced explanations |
91+
| **[Module 2](modules/Module2_Mathematical_Foundations.md)** | Mathematical Foundations | 5 | Enhanced intuitive explanations |
92+
| **[Module 3](modules/Module3_Quantum_Programming_Basics.md)** | Quantum Programming | **6**| **NEW:** Complete Debugging Guide for beginners |
93+
94+
**🌟 New Beginner-Essential Examples:**
95+
- `07_no_cloning_theorem.py` - Why quantum is fundamentally different
96+
- `08_hardware_reality_check.py` - What QC can/can't do today
97+
- `06_quantum_debugging_guide.py` - Essential troubleshooting for beginners
6398

6499
### 🧠 Intermediate Tier (Modules 4-6)
65100
Build algorithmic expertise:
@@ -70,13 +105,16 @@ Build algorithmic expertise:
70105
| **[Module 5](modules/Module5_Quantum_Error_Correction_and_Noise.md)** | Error Correction | 5 | 2,111 |
71106
| **[Module 6](modules/Module6_Quantum_Machine_Learning.md)** | Quantum Machine Learning | 5 | 3,157 |
72107

73-
### 🏭 Advanced Tier (Modules 7-8)
74-
Real-world applications:
108+
### 🏭 Advanced Tier (Modules 7-8) - NOW WITH MORE APPS!
109+
Real-world applications and quantum cryptography:
75110

76-
| Module | Topic | Examples | Lines of Code |
77-
|--------|-------|----------|---------------|
78-
| **[Module 7](modules/Module7_Quantum_Hardware_Cloud_Platforms.md)** | Hardware & Cloud | 5 | 4,394 |
79-
| **[Module 8](modules/Module8_Advanced_Applications_Industry_Use_Cases.md)** | Industry Applications | 5 | 5,346 |
111+
| Module | Topic | Examples | Key New Features |
112+
|--------|-------|----------|------------------|
113+
| **[Module 7](modules/Module7_Quantum_Hardware_Cloud_Platforms.md)** | Hardware & Cloud | 5 | Enhanced hardware compatibility fixes |
114+
| **[Module 8](modules/Module8_Advanced_Applications_Industry_Use_Cases.md)** | Industry Applications | **6**| **NEW:** BB84 Quantum Cryptography |
115+
116+
**🔐 New Real-World Example:**
117+
- `06_quantum_cryptography_bb84.py` - Secure quantum key distribution protocol
80118

81119
## 💡 Example Highlights
82120

examples/module1_fundamentals/03_superposition_measurement.py

Lines changed: 53 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,23 @@
33
Quantum Computing 101 - Module 1, Example 3
44
Superposition and Measurement
55
6-
This example explores quantum superposition in detail and demonstrates
7-
how measurement affects quantum states.
6+
This example explores quantum superposition - one of the most important concepts
7+
in quantum computing that makes quantum computers different from classical ones.
8+
You'll learn what superposition means, how to create it, and what happens when
9+
you measure a superposition state.
810
9-
Learning objectives:
10-
- Create and analyze superposition states
11-
- Understand measurement probabilities
12-
- Explore the measurement collapse
13-
- Compare different measurement bases
11+
🎯 BEGINNER-FRIENDLY LEARNING OBJECTIVES:
12+
- Understand what quantum superposition really means (it's not just "both states at once")
13+
- Learn how the Hadamard gate creates equal superposition
14+
- See why measurement "collapses" superposition and what that means
15+
- Explore how measurement probabilities work in quantum mechanics
16+
- Compare measuring in different bases (Z basis vs X basis)
17+
18+
💡 KEY CONCEPTS YOU'LL LEARN:
19+
- Superposition: A quantum state that is a combination of basis states
20+
- Measurement: The process that gives you classical information from quantum states
21+
- Probability amplitudes: Complex numbers that determine measurement probabilities
22+
- Basis states: The fundamental states (|0⟩ and |1⟩) that form all other states
1423
1524
Author: Quantum Computing 101 Course
1625
License: MIT
@@ -26,6 +35,40 @@
2635
from qiskit.circuit import Parameter
2736

2837

38+
def explain_superposition_concept():
39+
"""Explain superposition in beginner-friendly terms."""
40+
print("🌟 WELCOME TO QUANTUM SUPERPOSITION!")
41+
print("=" * 50)
42+
print()
43+
44+
print("🤔 What is Superposition?")
45+
print("Imagine flipping a coin in the air. While it's spinning, it's not")
46+
print("heads OR tails - it's in a state that will become one or the other")
47+
print("when it lands. Quantum superposition is similar but much weirder!")
48+
print()
49+
50+
print("📊 Classical vs Quantum States:")
51+
print("Classical bit: Definitely 0 OR definitely 1")
52+
print("Quantum bit: Can be 0 AND 1 simultaneously (superposition)")
53+
print(" Until you measure it!")
54+
print()
55+
56+
print("🎯 The Key Insight:")
57+
print("Superposition isn't just 'uncertainty about which state it's in'")
58+
print("It's a genuine quantum mechanical phenomenon where:")
59+
print("- The qubit exists in BOTH states simultaneously")
60+
print("- These states can interfere with each other")
61+
print("- Measurement forces the qubit to 'choose' one state")
62+
print()
63+
64+
print("🔮 What You'll See:")
65+
print("- How to create superposition using quantum gates")
66+
print("- What superposition states look like mathematically")
67+
print("- How measurement gives you random (but predictable) results")
68+
print("- Why this makes quantum computers powerful")
69+
print()
70+
71+
2972
def create_superposition_states():
3073
"""Create various superposition states."""
3174
print("=== CREATING SUPERPOSITION STATES ===")
@@ -314,6 +357,9 @@ def main():
314357
print()
315358

316359
try:
360+
# Start with beginner-friendly explanation
361+
explain_superposition_concept()
362+
317363
# Create superposition states
318364
superposition_circuits = create_superposition_states()
319365

examples/module1_fundamentals/04_quantum_entanglement.py

Lines changed: 64 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,27 @@
33
Quantum Computing 101 - Module 1, Example 4
44
Quantum Entanglement
55
6-
This example explores quantum entanglement, one of the most important
7-
and counterintuitive phenomena in quantum mechanics.
6+
This example explores quantum entanglement - Einstein's "spooky action at a
7+
distance" - one of the most fascinating and important phenomena in quantum
8+
mechanics that makes quantum computers possible.
89
9-
Learning objectives:
10-
- Create entangled quantum states (Bell states)
11-
- Understand quantum correlations
12-
- Explore non-local connections
13-
- Demonstrate violation of classical intuition
10+
🎯 BEGINNER-FRIENDLY LEARNING OBJECTIVES:
11+
- Understand what quantum entanglement really means (it's NOT faster-than-light communication)
12+
- Learn to create Bell states - the simplest entangled quantum states
13+
- See how measuring one qubit instantly affects its entangled partner
14+
- Explore the difference between correlation and causation in quantum mechanics
15+
- Understand why entanglement is essential for quantum computing
16+
17+
💡 KEY CONCEPTS YOU'LL LEARN:
18+
- Entanglement: A quantum connection where qubits share a single quantum state
19+
- Bell States: The four maximally entangled two-qubit states
20+
- Quantum Correlation: Statistical relationships that are stronger than classical physics allows
21+
- Non-locality: Quantum effects that seem to happen instantly across distances
22+
- Measurement outcomes: How measuring entangled qubits gives correlated results
23+
24+
🚀 WHY THIS MATTERS:
25+
Entanglement is the "quantum magic" that gives quantum computers their power!
26+
Without entanglement, a quantum computer would be no better than a classical one.
1427
1528
Author: Quantum Computing 101 Course
1629
License: MIT
@@ -25,6 +38,50 @@
2538
from qiskit_aer import AerSimulator
2639

2740

41+
def explain_entanglement_concept():
42+
"""Explain entanglement in beginner-friendly terms."""
43+
print("🪄 WELCOME TO QUANTUM ENTANGLEMENT!")
44+
print("Einstein called it 'spooky action at a distance'")
45+
print("=" * 50)
46+
print()
47+
48+
print("🤔 What is Quantum Entanglement?")
49+
print("Imagine two magic coins that are forever connected:")
50+
print("- When one lands heads, the other INSTANTLY lands tails")
51+
print("- This happens no matter how far apart they are")
52+
print("- It's not that they 'communicated' - they share a single quantum state")
53+
print()
54+
55+
print("📊 Classical vs Quantum Correlations:")
56+
print()
57+
print("CLASSICAL CORRELATION:")
58+
print("- Two coins in a box, one heads, one tails")
59+
print("- When you look at one, you know the other")
60+
print("- But they were always determined - you just didn't know")
61+
print()
62+
63+
print("QUANTUM ENTANGLEMENT:")
64+
print("- Two qubits that share a single quantum state")
65+
print("- Neither has a definite state until measured")
66+
print("- Measuring one instantly determines the other")
67+
print("- This correlation is stronger than classical physics allows!")
68+
print()
69+
70+
print("🎯 Key Insights:")
71+
print("1. 🚫 NO COMMUNICATION: Information doesn't travel between qubits")
72+
print("2. 📏 MEASUREMENT MATTERS: Results are correlated, but random")
73+
print("3. 🔗 SHARED STATE: Entangled qubits can't be described separately")
74+
print("4. ⚡ QUANTUM POWER: This gives quantum computers their advantage")
75+
print()
76+
77+
print("🔮 What You'll See:")
78+
print("- How to create entangled states (Bell states)")
79+
print("- Perfect correlations in measurement outcomes")
80+
print("- Why this violates classical intuition")
81+
print("- How entanglement enables quantum algorithms")
82+
print()
83+
84+
2885
def create_bell_states():
2986
"""Create the four Bell states (maximally entangled states)."""
3087
print("=== BELL STATES (MAXIMALLY ENTANGLED STATES) ===")

0 commit comments

Comments
 (0)