QuNet
A scalable quantum network simulator based on cost vector analysis implemented in Julia.
Install / Use
/learn @drpeterrohde/QuNetREADME
Contents
- Table of contents {:toc}
About
The paper "QuNet: Cost vector analysis & multi-path entanglement routing in quantum networks" (https://arxiv.org/abs/2105.00418) presents the theory, design and initial results for QuNet.
Developers:
- Hudson Leone (leoneht0@gmail.com)
- Nathaniel Miller
- Deepesh Singh
- Nathan Langford
- Peter Rohde (dr.rohde@gmail.com, www.peterrohde.org)
Goal
QuNet is a highly-scalable, multi-user quantum network simulator and benchmarking tool implemented in Julia. It relies on efficient algorithms for performing multi-user routing and congestion avoidance using quantum memories. QuNet focusses on the specific task of distributing entangled Bell pairs between users ($$A$$ and $$B$$),
<p align="center"> $$|\Psi^+\rangle = \frac{1}{\sqrt{2}}(|0\rangle_A|0\rangle_B + |1\rangle_A|1\rangle_B).$$ </p> These can subsequently be employed in state teleportation protocols to transmit arbitrary quantum states, or be applied to quantum key distribution, distributed quantum computing, or other entanglement-based quantum protocols.QuNet uses a cost vector methodology. Rather than track quantum states themselves, we track their associated costs as they traverse the network. Costs are arbitrary properties that accumulate additively as qubits traverse networks. We can express physical degradation such as loss, dephasing or depolarising processes in this form, and also non-physical costs such as monetary ones. Tracking the accumulation of costs acting on Bell pairs is equivalent to directly tracking the states themselves.
Quantum channels
Quantum channels can be represented in the quantum process formalism using the Kraus (or operator-sum) representation. In many useful instances these can be converted to additive metrics amenable to our cost vector formalism.
Consider the loss channel,
<p align="center"> $$\mathcal{E}_\mathrm{loss}(\rho) = p\rho + (1-p)|vac\rangle\langle vac|,$$ </p> where $$p$$ is the probability of a qubit not being lost, otherwise replaced with the vacuum state $$|vac\rangle$$. If multiple such channels are applied in series the $$p$$'s multiply, <p align="center"> $$p_\mathrm{total} = \prod_i p_i.$$ </p> However by converting to logarithmic form we can make this additive, <p align="center"> $$-\log(p_\mathrm{net}) = -\sum_i \log(p_i).$$ </p> Now $$m_i=-\log(p_i)$$ can be used as an additive edge weight. This is a common approach amongst experimentalists, who typically consider loss over fibre in terms of decibels per unit distance (dB/m).We can apply a similar approach to depolarising channels whose quantum process is given by,
<p align="center"> $$\mathcal{E}_\mathrm{depol}(\rho) = p\rho + (1-p)\frac{I}{2},$$ </p> and $$m=-\log(p)$$ acts additively. With some algebraic manipulation we can apply this to dephasing channels, <p align="center"> $$\mathcal{E}_\mathrm{deph}(\rho) = (2p-1)\rho + (1-p)(\rho + Z\rho Z),$$ </p> where $$-\log(2p-1)$$ acts as our additive dephasing metric. Note this representation of the dephasing channel has been algebraically manipulated into an unaffected term ($$\rho$$), and a completely dephased term ($$\rho+Z\rho Z$$) which is the steady-state of the channel. This approach could also be applied to bit-flip ($$X$$) channels, bit-phase-flip ($$Y$$) channels, or amplitude damping channels.Multi-path routing
Classical networks rely on path-finding algorithms (e.g shortest path à la Dijkstra) for optimal packet routing. This is highly efficient, since Dijkstra's algorithm has worst case $$O(V^2)$$ runtime in the number of graph vertices $$V$$. Quantum networks can employ multi-path routing, whereby multiple independently routed Bell pairs are purified into one of higher fidelity.
<p align="center"><img src="https://user-images.githubusercontent.com/4382522/115101952-634a0d00-9f8b-11eb-986e-2bb964d8273b.jpeg" width="50%"></p> <!---  --->We implement multi-path routing via multiple application of shortest path routing, where subsequent rounds exclude previously consumed routes from consideration.
Entanglement swapping & purification
Primitive operations in quantum networks include entanglement swapping (for extending entanglement links), and entanglement purification (for boosting fidelity).
<p align="center"><img src="https://user-images.githubusercontent.com/4382522/115101972-82489f00-9f8b-11eb-8e5d-62bb39d81e74.jpeg" width="30%" align="middle"></p> <p align="center"><img src="https://user-images.githubusercontent.com/4382522/115101973-84126280-9f8b-11eb-95d1-c6e2d43ef390.jpeg" width="50%" align="middle"></p> <!---   --->Graph reduction
These primitives provide simple substitution rules for graph reduction.
<p align="center"><img src="https://user-images.githubusercontent.com/4382522/115101982-98565f80-9f8b-11eb-9a2f-a737a99c37ae.jpeg" width="50%" align="middle"></p> <!---  --->Network abstraction
Quantum repeaters, comprising classically-controlled (and sometimes randomised) sequences of swapping and purification operations, can be reduced to a single virtual link capturing their average cost vector, thereby bypassing the need for directly accommodating non-deterministic or classically-controlled operations, maintaining compatability with the QuNet framework. Similarly, SneakerNet channels, whereby a large number of error-corrected qubits are physically transported can be reduced to an equivalent cost vector too.
For large networks it may not always be necessary to understand the full dynamics across all nodes and channels. Instead we might focus higher-level abstractions of the network, which consider the dynamics between designated subnetworks or regions, reducing computational load.
Space-based networks
QuNet can accommodate both static and dynamic nodes and channels. Here Alice & Bob have the option of communicating via:
- A static ground-based fibre link.
- A LEO satellite passing overhead through atmospheric free-space channels, which dynamically update.
- Exploiting both and purifying them together (multi-path routing).
Code example
This is the QuNet code in Julia that creates that network. Julia modules can be called from Python or run in Jupyter notebooks too. You can learn more about the Julia language at www.julialang.org.
<!---  --->using QuNet
Q = QNetwork()
A = BasicNode("A")
B = BasicNode("B")
S = PlanSatNode("S")
B.location = Coords(500,0,0)
S.location = Coords(-2000,0,1000)
S.velocity = Velocity(1000,0)
AB = BasicChannel(A, B, exp_cost=true)
AS = AirChannel(A, S)
SB = AirChannel(S, B)
for i in [A, S, AB, AS, SB]
add(Q, i)
end
Temporal routing & quantum memories
We accommodate for quantum memories by treating them as temporal channels between the respective nodes of identical copies of the underlying graph, where each layer represents the network at a particular point in time. This is far more efficient than naïve combinatoric congestion mitigation techniques, relying on the same underlying routing algorithms applied to a graph with a simple linear overhead in size.
<p align="center"><img src="https://user-images.githubusercontent.com/4382522/115102057-06028b80-9f8c-11eb-9f8b-76c8c58d38f5.jpeg" width="100%" align="middle"></p> <!---  --->The incrementally weighted asynchronous nodes guide the routing algorithm to preference earlier times, thereby temporally compressing multi-user routing, and providing a temporal routing queue.
The compression ratio is the ratio between routing time with and without memories. Here we show the temporal compression ratio of our algorithm against increasing network congestion.
<p align="center"><img src="https://user-images.githubusercontent.com/4382522/115102085-2af6fe80-9f8c-11eb-9cc9-a3a51beaddf5.jpeg" width="50%" align="middle"></p> <!---  --->Here’s a multi-user network with 3 users (colour coded) and multi-path routing (maximum 3 paths per user). The stacked layers represent time.
<p align="center"><img src="https://user-images.githubusercontent.com/4382522/115102120-5679e900-9f8c-11eb-9f3c-284a61354520.jpeg" width="50%" align="middle"></p> <Related Skills
node-connect
343.3kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
92.1kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
343.3kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
343.3kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
