Tutorials
A complete set of guided tutorials covering every feature of the qnet-core Python SDK. Each tutorial is based on a runnable example file and builds from installation through advanced topics.
Prerequisites
pip install qnet-core
All tutorials are self-contained — just open any markdown file, copy the code into your IDE, and run it with python <file>.py.
Getting Started
Start here to understand the library's core concepts:
| # | Tutorial | Description |
|---|---|---|
| 1 | Basic Entanglement Request | Two nodes, one link — the minimal end-to-end flow with request_entanglement() |
| 2 | Monte Carlo Ensemble | Run 1,000 trials to measure success rate, mean latency, and fidelity distributions |
| 3 | Routing Strategy Comparison | Compare LowestLatency, HighestFidelity, and HighestSuccess on the same topology |
Built-in Features
Explore qnet-core's built-in tools:
| # | Tutorial | Description |
|---|---|---|
| 4 | Topology Generators | Generate and inspect telecom_backbone, repeater_chain, and hybrid_satellite_fiber |
| 5 | Satellite-Fiber Links | Satellite conditions (visibility, weather) and atmospheric rate degradation |
Quantum Protocols
Run higher-level quantum networking protocols:
| # | Tutorial | Description |
|---|---|---|
| 6 | QKD Key Exchange (BB84) | Secure key distribution — inspect QBER, key length, and efficiency |
| 7 | State Teleportation | Teleport a quantum state across a multi-hop path with relay nodes |
| 8 | Distributed Computing — Star | 3-party GHZ-basis computation using CoordinationTopology.star() |
| 9 | Distributed Computing — Mesh vs Ring | Same computation across two coordination topologies to compare trade-offs |
.qnet File Management
Author, validate, and version-control network configurations:
| # | Tutorial | Description |
|---|---|---|
| 10 | Authoring a .qnet File | Build a QNetFile, add nodes/links, save to disk, reload with from_qnet_file() |
| 11 | Validating a .qnet File | Intentionally introduce errors and show validate() catching them before simulation |
| 12 | Diffing Topology Versions | Use diff() to see what changed between v1 and v2 network designs |
| 13 | Comparing Candidate Topologies | Use compare_topologies() across two topologies for the same route, pick a winner |
Sensitivity Analysis
Understand how physical parameters affect performance:
| # | Tutorial | Description |
|---|---|---|
| 14 | Tuning Physical Constants | Sweep alpha_loss, T2 memory lifetime, and generation rate to see fidelity/success shifts |
Next Steps
- Read the API Reference for complete class/function documentation
- Browse the python/README.md for a self-contained reference
- Try running all examples in sequence:
for f in examples/*.py; do python "$f"; done