Skip to main content

Tutorial 5 — Hybrid Satellite-Fiber Link

Objective: Model a satellite-to-ground quantum link with atmospheric conditions (visibility and weather) that degrade the effective generation rate.

Satellite links are essential for long-distance quantum communication where fiber attenuation becomes prohibitive. Atmospheric conditions significantly impact the effective photon arrival rate, which this tutorial demonstrates.

Build the Network

from qnet_core import QNetEngine, NodeDefinition, LinkDefinition

def build_satellite_network(sat_conditions=None):
"""Build a network with one satellite uplink and two fiber segments."""
engine = QNetEngine()

nodes = [
NodeDefinition(id="Sat", memory_lifetime_t2=0.3), # satellite node (limited coherence)
NodeDefinition(id="G1", memory_lifetime_t2=1.0), # ground station 1
NodeDefinition(id="G2", memory_lifetime_t2=1.0), # ground station 2
]

links = [
LinkDefinition(
"Sat", "G1", distance_km=500.0, base_fidelity=0.85,
generation_rate_hz=100.0, link_type="Satellite",
satellite_conditions=sat_conditions,
),
LinkDefinition("G1", "G2", distance_km=50.0, base_fidelity=0.93,
generation_rate_hz=1_000.0),
]

engine.define_network(nodes, links)
return engine

Simulate Clear Sky Conditions

# No satellite conditions → default visibility=1.0, weather_factor=1.0
engine_clear = build_satellite_network(sat_conditions=None)

stats = engine_clear.simulate(
from_node="Sat", to="G2",
fidelity_target=0.80, max_latency_ms=30_000.0, runs=500,
seed=42,
)

print("=== Clear Sky ===")
print(f"Success rate: {stats.empirical_success_rate:.1%}")
print(f"Mean latency: {stats.mean_latency_ms:.1f} ms")
print(f"Mean fidelity: {stats.mean_fidelity:.4f}")

Simulate Degraded Conditions

from qnet_core import SatelliteConditions

# Partial cloud cover
cloudy = SatelliteConditions(visibility=0.7, weather_factor=0.8)
engine_cloudy = build_satellite_network(cloudy)

stats_cloudy = engine_cloudy.simulate(
from_node="Sat", to="G2",
fidelity_target=0.80, max_latency_ms=30_000.0, runs=500,
seed=42,
)

print("\n=== Partial Cloud Cover (vis=0.7, weather=0.8) ===")
print(f"Effective rate: {cloudy.effective_rate(100.0):.1f} Hz")
print(f"Success rate: {stats_cloudy.empirical_success_rate:.1%}")

# Heavy storm
storm = SatelliteConditions(visibility=0.4, weather_factor=0.5)
engine_storm = build_satellite_network(storm)

print("\n=== Heavy Storm (vis=0.4, weather=0.5) ===")
print(f"Effective rate: {storm.effective_rate(100.0):.1f} Hz")
print(f"Success rate: {engine_storm.simulate('Sat', 'G2', 0.80, 30_000.0, 500, seed=42).empirical_success_rate:.1%}")

Key Concepts

ParameterRangeEffect
visibility0.0–1.0Atmospheric clarity: 1.0 = crystal clear, 0.0 = completely obscured
weather_factor0.0–1.0Weather attenuation multiplier: clouds, rain, fog reduce photon arrival
effective_rate(base)Returns base × visibility × weather_factor

What's next