Skip to main content

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:

#TutorialDescription
1Basic Entanglement RequestTwo nodes, one link — the minimal end-to-end flow with request_entanglement()
2Monte Carlo EnsembleRun 1,000 trials to measure success rate, mean latency, and fidelity distributions
3Routing Strategy ComparisonCompare LowestLatency, HighestFidelity, and HighestSuccess on the same topology

Built-in Features

Explore qnet-core's built-in tools:

#TutorialDescription
4Topology GeneratorsGenerate and inspect telecom_backbone, repeater_chain, and hybrid_satellite_fiber
5Satellite-Fiber LinksSatellite conditions (visibility, weather) and atmospheric rate degradation

Quantum Protocols

Run higher-level quantum networking protocols:

#TutorialDescription
6QKD Key Exchange (BB84)Secure key distribution — inspect QBER, key length, and efficiency
7State TeleportationTeleport a quantum state across a multi-hop path with relay nodes
8Distributed Computing — Star3-party GHZ-basis computation using CoordinationTopology.star()
9Distributed Computing — Mesh vs RingSame computation across two coordination topologies to compare trade-offs

.qnet File Management

Author, validate, and version-control network configurations:

#TutorialDescription
10Authoring a .qnet FileBuild a QNetFile, add nodes/links, save to disk, reload with from_qnet_file()
11Validating a .qnet FileIntentionally introduce errors and show validate() catching them before simulation
12Diffing Topology VersionsUse diff() to see what changed between v1 and v2 network designs
13Comparing Candidate TopologiesUse compare_topologies() across two topologies for the same route, pick a winner

Sensitivity Analysis

Understand how physical parameters affect performance:

#TutorialDescription
14Tuning Physical ConstantsSweep 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