Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SATELLITE LINKS] PR 5: Simulation Tests and Documentation #561

Draft
wants to merge 52 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
3ffe23a
First freespace channels experiment
May 30, 2024
6806809
Corrected loss mechanism in FreeSpace Quantum channel to setLost()
May 30, 2024
2861c64
Corrected units in loss rate calculation
May 30, 2024
2ac00df
Minor bugfixes in channels.ned
May 30, 2024
181c08d
Introduced variable delay based on CSV parsing
Jun 4, 2024
af08bcd
Finished implementation of variable links by adding quantum losses an…
Jun 4, 2024
b55e5ef
Differential latency compensation implemented,
Jun 4, 2024
7db2268
Fixed regression in BSAController
Jun 4, 2024
6d95606
clang-format
Jun 4, 2024
95f0a0c
Naming corrections and general housekeeping
Jun 5, 2024
a4763bf
Hack: allow OSPF messages to always pass through FS channels. This al…
Jun 5, 2024
1acc51c
clang format
Jun 7, 2024
213242c
Renamed CSVParser to OrbitalDataParser
Jun 17, 2024
5d14912
Renamed channels and functions to match reviews
Jun 17, 2024
c5fc1aa
cached values and/or references to avoid costly calls to par() in Fre…
Jun 17, 2024
6186322
Renamed QuantumChannel_FS to FreeSpaceQuantumChannel to keep naming c…
Jun 19, 2024
93aba56
hotfixes for simulation tests
Jun 20, 2024
17bd5b7
Re-written FreeSpaceQuantumChannel::processMessage,
Jun 27, 2024
fc3883b
Fixed distance handling in FreeSpaceQuantumChannel
Jun 27, 2024
feb0f59
Corrected t_atm name and capitalization
Jun 27, 2024
2972397
Added TestUtilFunctions to test channel objects
Jun 4, 2024
3577691
added quietConnectTo() to test gates to create connection paths for t…
Jun 4, 2024
1410f18
Added ChannelType object for Channel tests
Jun 5, 2024
c29de3a
Finished tests for FreeSpace Channels
Jun 5, 2024
11604e4
Renamed tests and changed cached parameters from
Jun 19, 2024
87dc8b9
In TestUtils: Added setters with units to enable conversions of unit …
Jul 1, 2024
177b2b0
First PointingSystem experiment. This preliminary implementation used to
Jun 7, 2024
f9c7d1f
Greatly reduced number of polling events via caching of VisOutcome
Jun 7, 2024
441d9cc
Added exceptions
Jun 7, 2024
a9a37f8
Removed old init code from PointingSystem
Jun 7, 2024
6174c18
Made Queue members protected instead of private in order to access th…
Jun 7, 2024
c62dc2b
Misc changes to prepare the infrastructure for PointingSystem and Gat…
Jun 7, 2024
6de3cf7
PointingSystem unit tests
Jun 7, 2024
3fd43f4
GatedQueue tests + small hack to always let OSPF packages pass (same …
Jun 7, 2024
2d01d2d
clang format
Jun 7, 2024
b427ae9
Without this fix, unit tests pass on my machine but fail on Github ac…
Jun 7, 2024
4cfbfff
Fixed names to make capitalization consistent
Jun 20, 2024
b61b3d4
Miscellaneous corrections: Queue gates made @loose to enable substitu…
Jun 20, 2024
9aec4d1
Corrected FreeSpaceChannel's namespace to quisp::channels
Jun 20, 2024
a736b55
Added csv files for simulation tests
Jun 20, 2024
b91c8e6
Introduced SatelliteQNode, related ModuleType, MM topology and .ini file
Jun 20, 2024
14795b7
Small correction to replace deprecated Aatm name with corrected t_atm
Jun 27, 2024
001260f
Clarification of the units of measurement for distance and speed of l…
Jun 27, 2024
f37f432
Added finish() call to FreeSpaceChannel to correctly recalculate dist…
Jul 4, 2024
833ca2f
Distinguished City1 and City2 test simulation scenarios
Jul 4, 2024
80cd3d5
Added satellite simulation tests and corrected csv paths to match Cmd…
Jul 4, 2024
60dc7b2
Added Validation documentation + code docs from old PR
Jul 4, 2024
b0203da
Added Sat Links entry to readme
Jul 5, 2024
0bc760f
Added MM-Swap-MM sim test
Jul 5, 2024
01d6d58
Added MM-Swap-MM docs and validation plot
Jul 5, 2024
e382382
Add Paolo and Fred to Authors.md
fgrosshans May 15, 2024
905080c
Correct typo in Authors.md
fgrosshans May 15, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion Authors.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@
* Sara Metwalli
* Michal Hadjusek
* Makoto Nakai
* Paolo Fittipaldi

## Space Network Supervisor

* Frédéric Grosshans

## Senior Advisors:

Expand Down Expand Up @@ -55,6 +60,6 @@ quantum networks over the last decade-plus:
Angela Sara Cacciapuoti, Marcello Caleffi, Byung-Soo Choi, Simon
Devitt, Hiroshi Esaki, Austin Fowler, Andrew Greentree, Lajos Hanzo,
Charles D. Hill, Lloyd Hollenberg, Dominic Horsman, Kaori Ishizaki,
Liang Jiang, Sebastein G.R. Louis, Misha Lukin, Jun Murai, Bill Munro,
Liang Jiang, Sebastien G.R. Louis, Misha Lukin, Jun Murai, Bill Munro,
Kae Nemoto, Takafumi Oka, Poramet Pathumsoot, Ashley Stephens, Sujin
Suwanna, Jake Taylor, Joe Touch, David S. Wang.
2 changes: 1 addition & 1 deletion doc/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
* [qDijkstra: SPF for purify-and-swap networks](qDijkstra.md)
* [Distributed Tomography and State Monitoring](Distributed%20Tomography%20and%20State%20Monitoring.md)
* [Research question: 「Unconnectable」](Unconnectable.md)

* [Satellite Links](Satellite%20Links.md)
## Contributor’s Guide
### Hardware
* [Network-Independent Operational Behavior](Repeater%20Operation.md)
Expand Down
61 changes: 61 additions & 0 deletions doc/Satellite Links.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# Satellite Links in QuISP
To enable the simulation of hybrid large-scale quantum networks, QuISP supports satellite quantum links.
To simulate a satellite link, users need to provide CSV files containing the distance (m) and atmospheric transmission (linear, not in dB) as a function of time over a passage (see the `satellite_test_csvs/` folder for examples).
Distance and transmission CSVs can be generated through a variety of means spanning from actual atmospheric simulation toolkits to simple geometrical models. The examples currently included in QuISP where generated through a [Python script](https://gist.github.com/pfittipaldi/924c22808ac977378e4dd70ca0a98ca6) implementing a simple flat-earth geometrical model.

Currently, multiple passages are simulated by looping the same CSV file. This is physically inaccurate, and it would be a quick and easy extension to the satellite code to have multiple CSVs pertaining to multiple passages.

The loss model for the free space satellite links was adopted from [de Forges de Parny et al.](https://www.nature.com/articles/s42005-022-01123-7).

## Quick Start

To run a simulation with a satellite link, choose one of the SAT configurations in the `satellite_simulations_test.ini` file. To design your own, use Sat nodes both at the ground and at the space end of the link, specifying `is_satellite=true` in the parameters of the satellite node.

## Additional useful information about satellite simulation

- While it is still possible to specify error rates for free space channels, notice that unlike in fiber channels these are NOT rates per kilometer, since there is no expression to calculate the total rate. This is not a serious problem since free space is a much more isotropic propagation medium than fiber, and the lead imperfection in it is by far loss.

- The CSV path must be specified with respect to your current working directory. For Cmdenv based simulations and tests, this is `quisp/quisp`. In case your simulation cannot find the CSV files, check that the working directory is correctly set in your launch configuration.

## Validation of the Results

Even though simulation tests for quantum links are present in the code base, satellite links' time-varying nature makes them more difficult to validate through simulation tests. Therefore, in addition to the description found in [our paper](https://arxiv.org/abs/2405.07589), we provide here a comparison of results obtained by simulating two satellite MM links with QuISP against our theoretical model. The links modeled by our CSV files have the following parameters:

![Link Parameters](img/satellite/SAT_LinkParams.svg)
### MM Link, Scenario 1
<img src="img/satellite/SAT_C1_match_number.svg" width="400"> <img src="img/satellite/SAT_C1_match_rate.svg" width="400">

### MM Link, Scenario 2
<img src="img/satellite/SAT_C2_match_number.svg" width="400"> <img src="img/satellite/SAT_C2_match_rate.svg" width="400">

### Dual MM Link, Entanglement Swapping on the Satellite
<img src="img/satellite/SAT_C1C2_swap_match.svg" width="400">


## Code Breakdown

Enabling satellite communication with QuISP relies on three fundamental elements: the `PointingSystem`, the `GatedQueue` and the `FreeSpaceChannel`.

### The Pointing System

This module is in charge of simulating the acquisition, pointing and tracking between the satellite and the ground nodes. In practice, this node receives a `VisibilityCheckRequest` (VCR) packet and replies with a `VisibilityCheckOutcome` (VCO) packet, which contains the `next_check_time` variable, i.e. the time interval to wait for the satellite to be visible again. If the satellite is already visible, `next_check_time` is 0.

### The Gated Queue

The purpose of `GatedQueue` is to buffer classical messages when the receiving node is not visible and therefore cannot receive messages.
This module works as an extension of the already present `Queue` module: whereas the original module was just in charge of queueing the packets that are incoming and outgoing from a given node, the `GatedQueue` adds a layer of control logic to the outgoing section. Whenever an outgoing message is ready to be sent, the `GatedQueue` runs a visibility check by generating a `VisibilityCheckRequest` packet and sending it to the `PointingSystem`. If the outcome of the visibility check is favorable (i.e. `next_check_time = 0`), the packet is sent normally. If not, another visibility check is run at `t + next_check_time`.

### The Free Space Channel

`FreeSpaceClassicalChannel` and `FreeSpaceQuantumChannel` are two new channel objects that model the variable attenuation and delay that comes with free-space communication with a moving node. By parsing CSV files that specify the length and atmospheric attenuation of the satellite link, these channels recalculate link parameters as part of the `processMessage` method. Nodes should have a `PointingSystem` that checks whether there is visibility before communicating: if a message is sent through a free-space channel when the receiving node is not visible, it is discarded by the channel.

## Modifications to existing components

Most of QuISP's internals worked seamlessly over the transition to satellite communication. However, a couple lines of code required tweaking:

- Each active BSA controller calculates the time at which photon emission should happen and shares it with its passive partner. Every time entanglement needs to be established, the active node schedules emission at time `now + travel_time` and instructs the passive node to attempt latching qubits in memory at `now + 2travel_time`, to account for the latency of the link and emit synchronously. In the original code, the (fiber) link delay can be calculated once and cached. However, a satellite link must account for the varying delay of a free-space link. Due to hardware constraints, it is unfeasible to recalculate the photon emission delay for every single photon, so the time interval between photon is left constant. What is changed is the emission time of the first photon of each train: every time an active node needs to start entanglement generation, it reads the orbit data in order to calculate what the link delay is now (`current_travel_time`) and what it will be after the photon request arrives at the receiving node (`predicted_travel_time`). Then, it schedules local emission for `now + current_travel_time` and instructs the passive node to emit at `now + current_travel_time + predicted_travel_time`. This way, the first photon of every emission train lines up perfectly. Although the rest of the train slowly drifts out of sync, it is not enough to disrupt entanglement generation even at low indistinguishability window values. A note should be made on EPPS links: since they work with continuous emission by making each photon the first and last of its respective train and using the inter-train delay as interval between photons, it is not possible to apply this modification directly. The (hacky) solution that was implemented was to schedule a periodic recalculation of the photon emission time. The time interval at which resynchronization is performed is a tunable parameter.

- The `RuleEngine` code was tweaked to reject a TimingNotification (BSA and EPPS) if it has a `first_photon_emit_time` that precedes the current `simTime()`. This of course never happens in the fiber case, but it covers the edge case of when the TimingNotification is generated with the satellite out of sight and sent when visibility is established again. Without this failsafe measure, Omnet++ produces an error when the `TimingNotification` is received and photon emission cannot be scheduled for a past time.

# Questions and Comments
If you have any further questions or comments about satellite simulation in QuISP, feel free to contact [Paolo Fittipaldi](mailto:paolo.fittipaldi@lip6.fr).
469 changes: 469 additions & 0 deletions doc/img/satellite/SAT_C1C2_swap_match.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
771 changes: 771 additions & 0 deletions doc/img/satellite/SAT_C1_match_number.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading