Skip to content
Closed

Rn d #330

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
107172d
Move everything in the module to ease imports
hayekr Mar 3, 2026
4071681
Add entry points for cli to each. Create project script for each
hayekr Mar 3, 2026
e5eedd1
Fix imports to relative.
hayekr Mar 3, 2026
da15315
Fix args
hayekr Mar 3, 2026
b71a1c9
Update changelog and version
hayekr Mar 3, 2026
ce7b4fe
Fix typo, preserve backward compat
hayekr Mar 3, 2026
5daa8cf
fix random.choice to use correct method
hayekr Mar 3, 2026
6d0825d
Update the lock file
hayekr Mar 3, 2026
314a13a
Fix imports
hayekr Mar 3, 2026
7dd6d5e
[major] added the BDS formalism of the entanglement swapping protocol…
caitaozhan Mar 4, 2026
207848e
[minor] updating docstrings and minor refactor
caitaozhan Mar 4, 2026
f23632e
Bump urllib3 from 2.6.1 to 2.6.3
dependabot[bot] Mar 4, 2026
61c166e
Bump pillow from 12.0.0 to 12.1.1
dependabot[bot] Mar 4, 2026
e70a54b
Merge pull request #317 from sequence-toolbox/dependabot/uv/pillow-12…
hayekr Mar 4, 2026
8676434
Merge pull request #316 from sequence-toolbox/dependabot/uv/urllib3-2…
hayekr Mar 4, 2026
53cbdcd
[minor] update docstring and README; remove the quotaiton markin typing
caitaozhan Mar 4, 2026
c7e2153
Bump nbconvert from 7.16.6 to 7.17.0
dependabot[bot] Mar 4, 2026
a8512dc
Merge pull request #318 from sequence-toolbox/dependabot/uv/nbconvert…
hayekr Mar 4, 2026
9850fe8
Merge pull request #315 from sequence-toolbox/310-swapping-bds
caitaozhan Mar 4, 2026
114953d
Bump flask from 3.1.2 to 3.1.3
dependabot[bot] Mar 4, 2026
567de5a
Bump werkzeug from 3.1.4 to 3.1.6
dependabot[bot] Mar 4, 2026
9d795b8
Merge pull request #319 from sequence-toolbox/dependabot/uv/flask-3.1.3
hayekr Mar 4, 2026
de6d7b5
Merge pull request #320 from sequence-toolbox/dependabot/uv/werkzeug-…
hayekr Mar 4, 2026
0d8180d
Bump version
hayekr Mar 5, 2026
568c629
Merge branch 'RnD' into 311-make-the-json-config-generators-script-av…
hayekr Mar 5, 2026
462edd0
Update the lock
hayekr Mar 5, 2026
1a7c1c7
[minor] cosmetic updates
caitaozhan Mar 10, 2026
e82b40c
[minor] add a new message type EARLY_EXPIRE for resource manager
caitaozhan Mar 10, 2026
d9dbbd5
Delete util/. Move config to sequence/utils/
hayekr Mar 10, 2026
9455606
Switch to np import
hayekr Mar 10, 2026
26783ec
Merge pull request #312 from sequence-toolbox/311-make-the-json-confi…
caitaozhan Mar 10, 2026
46b7cf3
[minor] fix comments, added ResourceManager.expire_remote_rules()
caitaozhan Mar 10, 2026
9508ee9
Merge branch 'resource-manager-early-expire' of github.com:sequence-t…
caitaozhan Mar 10, 2026
7bc3191
[minor] use np. prefix
caitaozhan Mar 10, 2026
0d197d4
[minor] update the tutorial to catch up the recent updates; add NOTEs…
caitaozhan Mar 10, 2026
906ab78
[minor] fix comments
caitaozhan Mar 10, 2026
4584239
[minor]
caitaozhan Mar 10, 2026
309a59c
[minor] resolve comments
caitaozhan Mar 11, 2026
d975066
Add passing init to nw manager and rs manager. Create missing inits i…
hayekr Mar 12, 2026
3ebcc19
Changelog
hayekr Mar 12, 2026
9b3f04d
Merge pull request #324 from sequence-toolbox/fix_manager_init
caitaozhan Mar 12, 2026
8118647
Merge pull request #323 from sequence-toolbox/update-tutorial-resourc…
caitaozhan Mar 12, 2026
23c9fab
[minor] Docstring, comment, logging, and various cosmetic updates
caitaozhan Mar 12, 2026
35a6cda
[major] Create a parent class RoutingProtocol for the current classes…
caitaozhan Mar 13, 2026
dbce95f
[minor] update CHANGELOG
caitaozhan Mar 13, 2026
e00b385
[minor] cosmetic updates
caitaozhan Mar 13, 2026
9e683bf
[minor] resolve comments
caitaozhan Mar 13, 2026
0296107
[minor] resolve comments
caitaozhan Mar 13, 2026
f74bbe6
Merge branch 'RnD' into resource-manager-early-expire
hayekr Mar 13, 2026
3cb617e
Fix `__str__` format in `Reservation` class and update related unit t…
hayekr Mar 13, 2026
f7d21f9
Merge pull request #322 from sequence-toolbox/resource-manager-early-…
caitaozhan Mar 13, 2026
b51866a
[minor] deleted the global_type for RoutingProtocol
caitaozhan Mar 16, 2026
b7ee20b
Merge pull request #326 from sequence-toolbox/routing-module-register
caitaozhan Mar 20, 2026
7840817
Deprecate Python 3.11 (#287)
Apr 2, 2026
718b324
Merge pull request #328 from formeo/287-deprecate-python-311
caitaozhan Apr 3, 2026
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
1 change: 0 additions & 1 deletion .github/workflows/validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ jobs:
strategy:
matrix:
python-version:
- "3.11"
- "3.12"
- "3.13"
- "3.14"
Expand Down
24 changes: 23 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,33 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [1.0.0] - 2026-3-02
### Added
- Added the `routing` module: a new parent class `RoutingProtocol` for the subclasses `StaticRoutingProtocol` and `DistributedRoutingProtocol`. The register decorator is used to make it easy to plug in new routing protocols in the future.
- Add empty init() to Protocol to satisfy class hierarchy.
- Created project scripts for each config generator.
- Added the `swapping` module that has the following classes. The subclasses use the registry decorator (factory pattern).
- Base class: `EntanglementSwappingA` & `EntanglementSwappingB`
- Subclass for ket vector and density matrix: `EntanglementSwappingA_Circuit` & `EntanglementSwappingB_Circuit`
- Subclass for Bell diagonal state: `EntanglementSwappingA_BDS` & `EntanglementSwappingB_BDS`
- Update the tutorial to catch up on the recent updates. Add notes saying refer to chapter 6 Application module for standard usage
- Introducing `EARLY_EXPIRE` message type. A request has a `start_time` and `end_time`. When a request is finished before the `end_time`, then the reservation (and the associated rules) should expire early. If not, the quantum network will keep generating entanglement pairs because the rules still exist.

### Changed
- Docstring, comment, logging, and various cosmetic updates.
- Moved routing_protocol init() to network manager.
- Trigger empty inits for resource and network manager to enable future bootstrapping.
- Migrated `utils/json_config_generators/` to `sequence/config_generators/`.

### Removed
- The old `swapping.py` is removed.


## [0.8.5] - 2026-2-27
### Added
- `NetworkManager` ABC with a factory pattern for selection and future implementation of new network managers.
- File `action_condition_set.py` is added. This contains the action, condition, and request functions for entanglement generation, swapping, and purification.
- Class `DistributedRoutingProtocol` is added, among many other supporting classes in `routing_distributed.py`. This module does distributed entanglement routing.
- Class `DistributedRoutingProtocol` is added, among many other supporting classes in `routing_distributed`. This module does distributed entanglement routing.
- Class `NetworkManager` has two new attributes: `forwarding_table` and `routing_protocol`.
- Add a cutoff flag to memory to allow disable the expiration of memories.
- Add a template in config json for network manager to select routing protocols (distributed vs. static)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ These modules can be edited by users to define additional functionality and test

## Installation
### For Users
SeQUeNCe requires [Python](https://www.python.org/downloads/) 3.11 or later. You can install SeQUeNCe using `pip`:
SeQUeNCe requires [Python](https://www.python.org/downloads/) 3.12 or later. You can install SeQUeNCe using `pip`:
```
pip install sequence
```
Expand Down
2 changes: 1 addition & 1 deletion docs/source/tutorial/chapter0/prerequisite.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Thank you for downloading SeQUeNCe and welcome to the tutorial section of the do

### Python Version

The simulator requires at least version **3.10** of Python. This can be found at the [Python Website](https://www.python.org/downloads/).
The simulator requires at least version **3.11** of Python. This can be found at the [Python Website](https://www.python.org/downloads/).

Copilot AI Apr 10, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doc now states a minimum Python version of 3.11, but the project metadata requires Python >=3.12 (see pyproject.toml). Update the prerequisite to match the supported versions to avoid confusing users.

Suggested change
The simulator requires at least version **3.11** of Python. This can be found at the [Python Website](https://www.python.org/downloads/).
The simulator requires at least version **3.12** of Python. This can be found at the [Python Website](https://www.python.org/downloads/).

Copilot uses AI. Check for mistakes.

### Dependencies

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ tl.show_progress = False # turn of progress bar, we will address this in later t
store = Store(tl) # create store

# open store at 7:00
open_proc = Process(store, 'open', []) # Process(object, function name: string, arguments of function: List[])
open_proc = Process(store, 'open', []) # Process(object, function name: string, arguments of function: list[])
open_event = Event(7, open_proc) # Event(occurring time: int, process: Process)
tl.schedule(open_event) # Timeline.schedule(Event)
```
Expand Down
9 changes: 7 additions & 2 deletions docs/source/tutorial/chapter3/entangle.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Chapter 3: Entanglement Management

**NOTE**: The standard way to generate entanglement is to use the `app` module, which is discussed in chapter 6. The purpose of this chapter is to explain what is happening under the hood in the entanglement management module.

---

In previous chapters, we introduced the usage of hardware models.
In this chapter, we will use protocols in the entanglement management module to control these hardware devices and change the entanglement state of quantum memories.
We will also use a simple manager protocol to control the entanglement generation protocols.
Expand Down Expand Up @@ -515,10 +519,11 @@ class SimpleManager:
if type(self.owner) is SwapNodeA:
left_memo = self.owner.components[self.memo_names[0]]
right_memo = self.owner.components[self.memo_names[1]]
self.owner.protocols = [EntanglementSwappingA(self.owner, 'ESA', left_memo, right_memo, 1, 0.99)]
self.owner.protocols = [EntanglementSwappingA.create(self.owner, 'ESA', left_memo, right_memo,
success_prob=1, degradation=0.99)]
else:
memo = self.owner.components[self.memo_names[0]]
self.owner.protocols = [EntanglementSwappingB(self.owner, '%s.ESB' % self.owner.name, memo)]
self.owner.protocols = [EntanglementSwappingB.create(self.owner, '%s.ESB' % self.owner.name, memo)]
```

### Step 2: Create Network
Expand Down
7 changes: 4 additions & 3 deletions docs/source/tutorial/chapter3/example3.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,11 @@ def create_protocol(self):
if type(self.owner) is SwapNodeA:
left_memo = self.owner.components[self.memo_names[0]]
right_memo = self.owner.components[self.memo_names[1]]
self.owner.protocols = [EntanglementSwappingA(self.owner, 'ESA', left_memo, right_memo, 1, 0.99)]
self.owner.protocols = [EntanglementSwappingA.create(self.owner, 'ESA', left_memo, right_memo,
success_prob=1, degradation=0.99)]
else:
memo = self.owner.components[self.memo_names[0]]
self.owner.protocols = [EntanglementSwappingB(self.owner, '%s.ESB' % self.owner.name, memo)]
self.owner.protocols = [EntanglementSwappingB.create(self.owner, '%s.ESB' % self.owner.name, memo)]


class SwapNodeA(Node):
Expand Down Expand Up @@ -59,7 +60,7 @@ def receive_message(self, src: str, msg: "Message") -> None:
self.protocols[0].received_message(src, msg)

def create_protocol(self):
self.protocols = [EntanglementSwappingB(self, '%s.ESB'%self.name, self.memo)]
self.protocols = [EntanglementSwappingB.create(self, '%s.ESB'%self.name, self.memo)]


def entangle_memory(tl: Timeline, memo1: Memory, memo2: Memory, fidelity: float):
Expand Down
83 changes: 36 additions & 47 deletions docs/source/tutorial/chapter4/resource_management.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Chapter 4: Resource Management

**NOTE**: The standard way to generate entanglement is to use the `app` module, which is discussed in chapter 6. The purpose of this chapter is to explain what is happening under the hood in the resource management module.

See `sequence.resource_management.action_condition_set` for detailed docstrings.

---

In this tutorial, we will show the usual operation of the Resource Management module included in SeQUeNCe. We’re going to build a linear, three-node network and create two entanglement flows. The network, including flows, is shown below:

![topo](figures/two_flow_linear_topo.png)
Expand Down Expand Up @@ -145,26 +151,25 @@ def eg_match_func(protocols, args):
def eg_rule_action_await(memories_info: List["MemoryInfo"], args):
mid_name = args["mid_name"]
other_name = args["other_name"]

memories = [info.memory for info in memories_info]
memory = memories[0]
protocol = EntanglementGenerationA(None, "EGA." + memory.name, mid_name,
other_name,
memory)
req_args = {"remote_node": args["node_name"],
"index_upper": args["index_upper"],
"index_lower": args["index_lower"]}
return [protocol, [other_name], [eg_match_func], [req_args]]
protocol = EntanglementGenerationA.create(None, "EGA." + memory.name,
mid_name, other_name, memory)
return [protocol, [None], [None], [None]]


def eg_rule_action_request(memories_info: List["MemoryInfo"], args):
mid_name = args["mid_name"]
other_name = args["other_name"]

memories = [info.memory for info in memories_info]
memory = memories[0]
protocol = EntanglementGenerationA(None, "EGA." + memory.name,
mid_name, other_name, memory)
return [protocol, [None], [None], [None]]
protocol = EntanglementGenerationA.create(None, "EGA." + memory.name,
mid_name, other_name, memory)
req_args = {"remote_node": args["node_name"],
"index_upper": args["index_upper"],
"index_lower": args["index_lower"]}
return [protocol, [other_name], [eg_match_func], [req_args]]
```

### Step 4: Build the Network
Expand Down Expand Up @@ -230,10 +235,10 @@ tl.init()
action_args = {"mid_name": "m12", "other_name": "r2", "node_name": "r1",
"index_upper": 9, "index_lower": 0}
condition_args = {"index_lower": 0, "index_upper": 9}
rule1 = Rule(10, eg_rule_action_await, eg_rule_condition, action_args, condition_args)
rule1 = Rule(10, eg_rule_action_request, eg_rule_condition, action_args, condition_args)
r1.resource_manager.load(rule1)
action_args2 = {"mid_name": "m12", "other_name": "r1"}
rule2 = Rule(10, eg_rule_action_request, eg_rule_condition, action_args2, condition_args)
rule2 = Rule(10, eg_rule_action_await, eg_rule_condition, action_args2, condition_args)
r2.resource_manager.load(rule2)

tl.run()
Expand Down Expand Up @@ -262,8 +267,7 @@ To do this, we'll create a function `add_eg_rules` that takes as arguments
- `path`, a list of router nodes that make up the path of the entanglement flow, and
- `middles`, a list of bsm nodes along the path.

The conditions and actions of the rule will be very similar to before, but with variable memory indices, nodes, and
arguments.
The conditions and actions of the rule will be very similar to before, but with variable memory indices, nodes, and arguments.

```python
def add_eg_rules(index: int, path: List[RouterNode], middles: List[BSMNode]):
Expand All @@ -281,8 +285,7 @@ def add_eg_rules(index: int, path: List[RouterNode], middles: List[BSMNode]):
condition_args = {"index_lower": mem_range[0],
"index_upper": mem_range[0] + 9}

rule = Rule(10, eg_rule_action_request, eg_rule_condition, action_args,
condition_args)
rule = Rule(10, eg_rule_action_await, eg_rule_condition, action_args, condition_args)
node.resource_manager.load(rule)

if index < (len(path) - 1):
Expand All @@ -299,14 +302,8 @@ def add_eg_rules(index: int, path: List[RouterNode], middles: List[BSMNode]):
"index_upper": node_mems[index + 1][1] - 1,
"index_lower": node_mems[index + 1][0]}

memories = [info.memory for info in memories_info]
memory = memories[0]
protocol = EntanglementGenerationA(None, "EGA." + memory.name, middle_names[index], node_names[index + 1],
memory)
return [protocol, [node_names[index + 1]], [req_func]]

rule = Rule(10, eg_rule_action, eg_rule_condition)
node.resource_manager.load(rule)
rule = Rule(10, eg_rule_action_request, eg_rule_condition, action_args, condition_args)
node.resource_manager.load(rule)
```

### Step 7: Flow 2 Entanglement Purification
Expand All @@ -320,10 +317,9 @@ The arguments for our `add_ep_rules` function will be similar to our previous fu
- `target_fidelity`, the fidelity of entanglement we wish to achieve.

```python
from sequence.entanglement_management.purification import BBPSSW
from sequence.entanglement_management.purification import BBPSSWProtocol

def ep_rule_condition_request(memory_info: "MemoryInfo", manager: "MemoryManager",
args):
def ep_rule_condition_request(memory_info: "MemoryInfo", manager: "MemoryManager", args):
index_upper = args["index_upper"]
index_lower = args["index_lower"]
target_fidelity = args["target_fidelity"]
Expand All @@ -346,7 +342,7 @@ def ep_match_func(protocols, args):

_protocols = []
for protocol in protocols:
if not isinstance(protocol, BBPSSW):
if not isinstance(protocol, BBPSSWProtocol):
continue

if protocol.kept_memo.name == remote1:
Expand All @@ -361,10 +357,8 @@ def ep_match_func(protocols, args):
_protocols[1].rule.protocols.remove(_protocols[1])
_protocols[1].kept_memo.detach(_protocols[1])
_protocols[0].meas_memo = _protocols[1].kept_memo
_protocols[0].memories = [_protocols[0].kept_memo,
_protocols[0].meas_memo]
_protocols[0].name = _protocols[0].name + "." + _protocols[
0].meas_memo.name
_protocols[0].memories = [_protocols[0].kept_memo, _protocols[0].meas_memo]
_protocols[0].name = _protocols[0].name + "." + _protocols[0].meas_memo.name
_protocols[0].meas_memo.attach(_protocols[0])

return _protocols[0]
Expand All @@ -373,16 +367,15 @@ def ep_match_func(protocols, args):
def ep_rule_action_request(memories_info: List["MemoryInfo"], args):
memories = [info.memory for info in memories_info]
name = "EP.%s.%s" % (memories[0].name, memories[1].name)
protocol = BBPSSW(None, name, memories[0], memories[1])
protocol = BBPSSWProtocol.create(None, name, memories[0], memories[1])
dsts = [memories_info[0].remote_node]
req_funcs = [ep_match_func]
req_args = {"remote1": memories_info[0].remote_memo,
"remote2": memories_info[1].remote_memo}
return [protocol, dsts, req_funcs, [req_args]]


def ep_rule_condition_await(memory_info: "MemoryInfo", manager: "MemoryManager",
args):
def ep_rule_condition_await(memory_info: "MemoryInfo", manager: "MemoryManager", args):
index_upper = args["index_upper"]
index_lower = args["index_lower"]
target_fidelity = args["target_fidelity"]
Expand All @@ -395,7 +388,7 @@ def ep_rule_condition_await(memory_info: "MemoryInfo", manager: "MemoryManager",
def ep_rule_action_await(memories_info: List["MemoryInfo"], args):
memories = [info.memory for info in memories_info]
name = "EP.%s" % (memories[0].name)
protocol = BBPSSW(None, name, memories[0], None)
protocol = BBPSSWProtocol.create(None, name, memories[0], None)
return [protocol, [None], [None], [None]]


Expand Down Expand Up @@ -437,8 +430,7 @@ For now, we will only define the actions and conditions and leave the rule creat
```python
from sequence.entanglement_management.swapping import EntanglementSwappingA, EntanglementSwappingB

def es_rule_condition_A(memory_info: "MemoryInfo", manager: "MemoryManager",
args):
def es_rule_condition_A(memory_info: "MemoryInfo", manager: "MemoryManager", args):
index_lower = args["index_lower"]
index_upper = args["index_upper"]
target_fidelity = args["target_fidelity"]
Expand Down Expand Up @@ -481,20 +473,17 @@ def es_rule_action_A(memories_info: List["MemoryInfo"], args):

memories = [info.memory for info in memories_info]

protocol = EntanglementSwappingA(None, "ESA.%s.%s" % (
memories[0].name, memories[1].name),
memories[0], memories[1],
success_prob=succ_prob,
degradation=degradation)
protocol_name = "ESA.%s.%s" % (memories[0].name, memories[1].name)
protocol = EntanglementSwappingA.create(None, protocol_name, memories[0], memories[1],
success_prob=succ_prob, degradation=degradation)
dsts = [info.remote_node for info in memories_info]
req_funcs = [es_match_func, es_match_func]
req_args = [{"target_memo": memories_info[0].remote_memo},
{"target_memo": memories_info[1].remote_memo}]
return [protocol, dsts, req_funcs, req_args]


def es_rule_condition_B(memory_info: "MemoryInfo", manager: "MemoryManager",
args):
def es_rule_condition_B(memory_info: "MemoryInfo", manager: "MemoryManager", args):
index_lower = args["index_lower"]
index_upper = args["index_upper"]
target_node = args["target_node"]
Expand All @@ -512,7 +501,7 @@ def es_rule_condition_B(memory_info: "MemoryInfo", manager: "MemoryManager",
def es_rule_action_B(memories_info: List["MemoryInfo"], args):
memories = [info.memory for info in memories_info]
memory = memories[0]
protocol = EntanglementSwappingB(None, "ESB." + memory.name, memory)
protocol = EntanglementSwappingB.create(None, "ESB." + memory.name, memory)
return [protocol, [None], [None], [None]]
```

Expand Down
16 changes: 6 additions & 10 deletions docs/source/tutorial/chapter4/two_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,10 +177,8 @@ def ep_req_func(protocols, args):
_protocols[1].rule.protocols.remove(_protocols[1])
_protocols[1].kept_memo.detach(_protocols[1])
_protocols[0].meas_memo = _protocols[1].kept_memo
_protocols[0].memories = [_protocols[0].kept_memo,
_protocols[0].meas_memo]
_protocols[0].name = _protocols[0].name + "." + _protocols[
0].meas_memo.name
_protocols[0].memories = [_protocols[0].kept_memo,_protocols[0].meas_memo]
_protocols[0].name = _protocols[0].name + "." + _protocols[0].meas_memo.name
_protocols[0].meas_memo.attach(_protocols[0])

return _protocols[0]
Expand Down Expand Up @@ -288,11 +286,9 @@ def es_rule_actionA(memories_info: list["MemoryInfo"], args):

memories = [info.memory for info in memories_info]

protocol = EntanglementSwappingA(None, "ESA.%s.%s" % (
memories[0].name, memories[1].name),
memories[0], memories[1],
success_prob=succ_prob,
degradation=degradation)
protocol_name = "ESA.%s.%s" % (memories[0].name, memories[1].name)
protocol = EntanglementSwappingA.create(None, protocol_name, memories[0], memories[1],
success_prob=succ_prob, degradation=degradation)
dsts = [info.remote_node for info in memories_info]
req_funcs = [es_req_func, es_req_func]
req_args = [{"target_memo": memories_info[0].remote_memo},
Expand All @@ -318,7 +314,7 @@ def es_rule_conditionB(memory_info: "MemoryInfo", manager: "MemoryManager", args
def es_rule_actionB(memories_info: list["MemoryInfo"], args):
memories = [info.memory for info in memories_info]
memory = memories[0]
protocol = EntanglementSwappingB(None, "ESB." + memory.name, memory)
protocol = EntanglementSwappingB.create(None, "ESB." + memory.name, memory)
return [protocol, [None], [None], [None]]


Expand Down
7 changes: 6 additions & 1 deletion docs/source/tutorial/chapter5/network_manager.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
# Chapter 5: Network Manager

In this tutorial, we will showcase the Network Management module of SeQUeNCe and show its operation on a typical network. The goal of this tutorial is to
**NOTE**: The standard way to generate entanglement is to use the `app` module, which is discussed in chapter 6. The purpose of this chapter is to explain what is happening under the hood in the network management module.

---

In this tutorial, we will showcase the (default and distributed) Network Management module of SeQUeNCe and show its operation on a typical network. The goal of this tutorial is to
- Gain familiarity with the `network_management` module
- Gain familiarity with the `topology.topology` module
- Using external files to build networks


To achieve this, we will be using an example json file to build our network and will use the network manager on `QuantumRouter` nodes to request entanglement pairs. The json file will create the network topology shown below:

![topo](figures/star_network.png)
Expand Down
Loading
Loading