Build a Network from a Dataset

This tutorial loads a published network topology, converts its link distances to propagation delays, and schedules node and link protocols.

Load the topology

using CairoMakieusing CommunicationNetworkDatasetsusing QuantumSavoryusing QuantumSavory.ProtocolZoo: EntanglerProt, EntanglementTrackerusing Tylertopology = load_network("topology_bench", "arpanet")delays = dist_to_delay(topology.distances);
Dict{Graphs.SimpleGraphs.SimpleEdge{Int64}, Float64} with 32 entries:
  Edge 7 => 18  => 0.0065432
  Edge 11 => 13 => 0.00511031
  Edge 11 => 14 => 0.00607945
  Edge 7 => 10  => 0.00485931
  Edge 12 => 16 => 0.00682733
  Edge 13 => 19 => 0.00750291
  Edge 14 => 15 => 0.00309047
  Edge 16 => 19 => 0.00246301
  Edge 9 => 11  => 0.00382927
  Edge 2 => 3   => 0.0041955
  Edge 3 => 5   => 0.0013444
  Edge 5 => 8   => 0.0114475
  Edge 10 => 12 => 0.00357116
  Edge 2 => 4   => 0.0072344
  Edge 13 => 14 => 0.00344299
  Edge 16 => 17 => 0.00229294
  Edge 17 => 19 => 0.00379642
  Edge 1 => 7   => 0.0143133
  Edge 3 => 6   => 0.00834865
  Edge 13 => 20 => 0.0051567
  Edge 15 => 20 => 0.00589895
  Edge 17 => 18 => 0.00247791
  Edge 15 => 16 => 0.00488247
  Edge 18 => 20 => 0.00289774
  Edge 6 => 8   => 0.00607928
  Edge 1 => 2   => 0.00645764
  Edge 8 => 12  => 0.00728371
  Edge 9 => 10  => 0.00770007
  Edge 5 => 9   => 0.0130891
  Edge 1 => 4   => 0.0075
  Edge 4 => 6   => 0.00447356
  Edge 9 => 12  => 0.0075

The dataset reports distances in metres. dist_to_delay uses a default propagation speed of $2.0 \times 10^8$ metres per second and returns a new edge-keyed dictionary.

Build and schedule the network

node_protocols = (EntanglementTracker => (;),)link_protocols = (EntanglerProt => (;),)(; sim, network) = network_builder(    topology.graph,    delays,    (2,);    node_protocols,    link_protocols,);
(sim = ConcurrentSim.Simulation time: 0.0 active_process: nothing, network = A network of 20 registers in a graph of 32 edges
)

The empty named tuples select the protocol defaults. network_builder creates a two-slot register at every vertex. It applies EntanglementTracker to every node and EntanglerProt to every undirected edge. It also uses each edge delay for both directions of the classical and quantum channels.

The protocols are scheduled, but the builder does not advance sim.

Plot the register locations

The node table gives longitude and latitude in the same vertex order as the graph. Pass those coordinates to the register plot on a Tyler map.

coordinates = Point2f.(    topology.nodes.longitude_deg,    topology.nodes.latitude_deg,)fig, axis, map = generate_map()registernetplot_axis(axis, network; registercoords=coordinates);fig
Example block output

The simulation is still at time zero, so the figure contains only the empty register glyphs. It does not draw physical graph edges or generated quantum-state links.

Dataset attribution

This tutorial uses the ARPANET topology from Virgillito et al., Topology Bench: Systematic Graph Based Benchmarking for Optical Networks, Zenodo record 13921775 (2024), under the Creative Commons Attribution 4.0 International license. Attribute the Topology Bench authors and the per-topology sources named by that collection. CommunicationNetworkDatasets.jl publishes a modified form with normalized schemas and identifiers, distances converted from kilometres to metres, and documented self-loops and duplicate undirected edges removed. Basemap tiles: Protomaps © OpenStreetMap contributors; hosted by QuantumSavory.

Call run(sim, stop_time) separately when you are ready to run the protocols. Use more register slots if protocols on several incident links must retain entanglement at the same time.