Skip to content

Optimize Dijkstra routing with binary heap implementation and tests#24

Open
chenyx10358 wants to merge 2 commits intoQNLab-USTC:mainfrom
chenyx10358:dijkstra_ex
Open

Optimize Dijkstra routing with binary heap implementation and tests#24
chenyx10358 wants to merge 2 commits intoQNLab-USTC:mainfrom
chenyx10358:dijkstra_ex

Conversation

@chenyx10358
Copy link
Copy Markdown

DijkstraRouteAlgorithmHeap optimizes the implementation of the existing Dijkstra routing algorithm by incorporating a heap data structure, thereby enhancing execution speed to support large-scale simulations. I have verified its correctness and performance on typical topologies; the corresponding test code is available in test/network/test_route_ex.py.
image

Add DijkstraRouteAlgorithmHeap using heapq-based priority queue for efficient shortest path computation in quantum networks. Replaces linear search with O(log n) heap operations, improving scalability on denser network topologies while maintaining the same routing table generation for all network nodes.
Add performance and correctness tests comparing DijkstraRouteAlgorithm with
DijkstraRouteAlgorithmHeap on Waxman and Tree topologies. Tests measure build
time speedup and verify route query results match across 10000 random
source-destination pairs.
@chenyx10358 chenyx10358 added the enhancement New feature or request label Apr 21, 2026
@chenyx10358 chenyx10358 requested a review from hsc2021 April 21, 2026 09:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant