Skip to content

Rn d#330

Closed
hayekr wants to merge 55 commits into
masterfrom
RnD
Closed

Rn d#330
hayekr wants to merge 55 commits into
masterfrom
RnD

Conversation

@hayekr

@hayekr hayekr commented Apr 10, 2026

Copy link
Copy Markdown
Collaborator

No description provided.

hayekr and others added 30 commits March 2, 2026 20:51
…; reorganized the swapping module by using the registry decorator
Bumps [urllib3](https://github.com/urllib3/urllib3) from 2.6.1 to 2.6.3.
- [Release notes](https://github.com/urllib3/urllib3/releases)
- [Changelog](https://github.com/urllib3/urllib3/blob/main/CHANGES.rst)
- [Commits](urllib3/urllib3@2.6.1...2.6.3)

---
updated-dependencies:
- dependency-name: urllib3
  dependency-version: 2.6.3
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [pillow](https://github.com/python-pillow/Pillow) from 12.0.0 to 12.1.1.
- [Release notes](https://github.com/python-pillow/Pillow/releases)
- [Changelog](https://github.com/python-pillow/Pillow/blob/main/CHANGES.rst)
- [Commits](python-pillow/Pillow@12.0.0...12.1.1)

---
updated-dependencies:
- dependency-name: pillow
  dependency-version: 12.1.1
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [nbconvert](https://github.com/jupyter/nbconvert) from 7.16.6 to 7.17.0.
- [Release notes](https://github.com/jupyter/nbconvert/releases)
- [Changelog](https://github.com/jupyter/nbconvert/blob/main/CHANGELOG.md)
- [Commits](jupyter/nbconvert@v7.16.6...v7.17.0)

---
updated-dependencies:
- dependency-name: nbconvert
  dependency-version: 7.17.0
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Entanglement Swapping BDS Implementation
Bumps [flask](https://github.com/pallets/flask) from 3.1.2 to 3.1.3.
- [Release notes](https://github.com/pallets/flask/releases)
- [Changelog](https://github.com/pallets/flask/blob/main/CHANGES.rst)
- [Commits](pallets/flask@3.1.2...3.1.3)

---
updated-dependencies:
- dependency-name: flask
  dependency-version: 3.1.3
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [werkzeug](https://github.com/pallets/werkzeug) from 3.1.4 to 3.1.6.
- [Release notes](https://github.com/pallets/werkzeug/releases)
- [Changelog](https://github.com/pallets/werkzeug/blob/main/CHANGES.rst)
- [Commits](pallets/werkzeug@3.1.4...3.1.6)

---
updated-dependencies:
- dependency-name: werkzeug
  dependency-version: 3.1.6
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
caitaozhan and others added 23 commits March 10, 2026 15:16
…oolbox/SeQUeNCe into resource-manager-early-expire
… saying refer to chapter 6 Application module for standard usage
Make init call more general in QuantumRouter
… StaticRoutingProtocol and DistributedRoutingProtocol. The register decorator is used to make it easy to plug in new routing protocols in the future.
- Remove 3.11 from CI matrix and pyproject.toml classifiers
- Update requires-python to >=3.12
- Update README minimum version
- Modernize typing: Optional→X|None, List→list, Dict→dict,
  Tuple→tuple, Type→type (PEP 585/604)
Copilot AI review requested due to automatic review settings April 10, 2026 19:31
@hayekr hayekr closed this Apr 10, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR bumps SeQUeNCe to v1.0.0, updates the supported Python baseline to 3.12+, and introduces major internal refactors around routing (new RoutingProtocol base + registry/factory) and entanglement swapping (new swapping package with formalism-specific implementations). It also migrates/cleans up various utility scripts and updates tests/docs to match the new APIs.

Changes:

  • Introduce sequence.network_management.routing package with a RoutingProtocol base class and registry-driven protocol selection; update topology and tests to use routing_static / routing_distributed.
  • Replace legacy sequence/entanglement_management/swapping.py with a new sequence/entanglement_management/swapping/ package and factory-based swapping protocol creation.
  • Bump project version to 1.0.0, require Python >=3.12, update dependencies/lockfile, and add CLI entry points for config generators.

Reviewed changes

Copilot reviewed 81 out of 82 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
uv.lock Updates lock revision and multiple dependency versions; adds graphviz.
utils/timing_test.py Removes local timing helper script.
utils/qmanager_timing.py Removes qmanager timing script.
utils/lock_test.py Removes lock test script.
utils/json_config_generators/config_generator_star.py Removes legacy star config generator from utils/.
utils/json_config_generators/config_generator_ring.py Removes legacy ring config generator from utils/.
utils/json_config_generators/config_generator_mesh.py Removes legacy mesh config generator from utils/.
utils/json_config_generators/config_generator_line.py Removes legacy line config generator from utils/.
utils/json_config_generators/config_generator_caveman.py Removes legacy caveman config generator from utils/.
utils/json_config_generators/config_generator_as_memo_num.py Removes legacy AS/memo-number config generator from utils/.
utils/dict_timing.py Removes dict timing script.
utils/cavity_vs_fidelity.py Removes fidelity helper script.
tests/topology/test_dqc_node_net_topo.py Minor cleanup of trailing whitespace.
tests/topology/dqc_node_net_topo_simple.json Updates routing template identifier to routing_static.
tests/network_management/test_routing.py Updates distributed routing import/module naming.
tests/network_management/test_reservation.py Updates Reservation.__str__ expectation.
tests/network_management/test_network_manager.py Updates forwarding rule API usage.
tests/network_management/ring_topo.json Updates routing template identifier to routing_distributed.
tests/network_management/line_topo.json Updates routing template identifier to routing_distributed.
tests/entanglement_management/test_swapping.py Switches swapping protocol instantiation to factory .create().
sequence/utils/noise.py Updates typing annotations (builtin generics).
sequence/utils/draw_topo.py Minor comment capitalization.
sequence/utils/config_generator.py Converts imports to package-relative form.
sequence/utils/config_generator_tree.py Refactors into main() entry point and updates imports/signatures.
sequence/utils/config_generator_star.py Adds packaged star config generator with main().
sequence/utils/config_generator_ring.py Adds packaged ring config generator with main().
sequence/utils/config_generator_random.py Updates imports to package-relative form.
sequence/utils/config_generator_mesh.py Adds packaged mesh config generator with main().
sequence/utils/config_generator_line.py Adds packaged line config generator with main().
sequence/utils/config_generator_caveman.py Adds packaged caveman config generator with main().
sequence/utils/config_generator_as_memo_num.py Adds packaged AS/memo-number config generator with main().
sequence/topology/topology.py Removes unused typing import(s).
sequence/topology/router_net_topo.py Uses new routing module API and updates ket formalism constant usage.
sequence/topology/node.py Adds manager initialization via resource_manager.init() / network_manager.init().
sequence/topology/dqc_net_topo.py Updates forwarding rule API usage.
sequence/resource_management/rule_manager.py Updates typing and minor formatting cleanup.
sequence/resource_management/resource_manager.py Adds EARLY_EXPIRE message flow + refactors message dispatch with match.
sequence/resource_management/action_condition_set.py Updates swapping instantiation to .create() and docstring cleanup.
sequence/protocol.py Adds protocol_type initialization and default init().
sequence/network_management/rsvp.py Reorders imports and improves typing with __future__ annotations.
sequence/network_management/routing/routing_static.py Adds new StaticRoutingProtocol under routing package.
sequence/network_management/routing/routing_distributed.py Migrates distributed routing into routing package and base class usage.
sequence/network_management/routing/routing_base.py Adds new routing protocol base + registry/factory utilities.
sequence/network_management/routing/init.py Exposes routing protocol APIs and implementations.
sequence/network_management/routing_static.py Removes legacy static routing module (superseded by routing package).
sequence/network_management/reservation.py Updates Reservation docs/formatting and equality/hash semantics.
sequence/network_management/network_manager.py Switches routing selection to RoutingProtocol.create() and adds init().
sequence/network_management/init.py Updates exported module surface.
sequence/kernel/quantum_state.py Refactors numpy usage and removes wildcard imports.
sequence/kernel/quantum_manager.py Renames ket formalism constant to KET_VECTOR_FORMALISM.
sequence/gui/simulator_bindings.py Updates forwarding rule API usage.
sequence/entanglement_management/swapping/swapping_circuit.py Adds circuit-based swapping implementation(s).
sequence/entanglement_management/swapping/swapping_bds.py Adds BDS swapping implementation(s).
sequence/entanglement_management/swapping/swapping_base.py Adds swapping base classes + registry/factory pattern.
sequence/entanglement_management/swapping/init.py Exposes swapping public API from new package.
sequence/entanglement_management/swapping.py Removes legacy swapping module (replaced by package).
sequence/entanglement_management/purification/bbpssw_protocol.py Updates ket constant name and protocol base init usage.
sequence/entanglement_management/purification/bbpssw_circuit.py Updates ket constant name.
sequence/entanglement_management/purification/bbpssw_bds.py Cleans typing/docstrings.
sequence/entanglement_management/generation/single_heralded.py Typing cleanup.
sequence/entanglement_management/generation/generation_message.py Removes unused typing import.
sequence/entanglement_management/generation/generation_base.py Uses new protocol_type initializer.
sequence/entanglement_management/entanglement_protocol.py Threads protocol_type through base init.
sequence/entanglement_management/init.py Updates exported module surface.
sequence/constants.py Renames KET_STATE_FORMALISM to KET_VECTOR_FORMALISM.
sequence/components/memory.py Ensures BDS fidelity is returned as float.
sequence/components/circuit.py Removes unused typing import.
sequence/components/bsm.py Updates ket constant name.
sequence/app/request_app.py Improves reservation result logging messages.
README.md Updates stated minimum Python version to 3.12+.
pyproject.toml Bumps version to 1.0.0, sets Python >=3.12, adds graphviz, adds CLI scripts.
example/demo_for_beginners/three_node_eg_ep_es.ipynb Updates forwarding rule API usage.
docs/source/tutorial/chapter6/custom_app.py Typing/import cleanup with __future__ annotations.
docs/source/tutorial/chapter5/network_manager.md Adds note about preferred app usage and clarifies scope.
docs/source/tutorial/chapter4/two_flow.py Updates swapping instantiation to .create() and formatting.
docs/source/tutorial/chapter4/resource_management.md Updates examples to new APIs and adds guidance notes.
docs/source/tutorial/chapter3/example3.py Updates swapping instantiation to .create().
docs/source/tutorial/chapter3/entangle.md Updates swapping instantiation to .create() and adds guidance note.
docs/source/tutorial/chapter1/discrete-event-simulation.md Updates list typing in comment/example.
docs/source/tutorial/chapter0/prerequisite.md Updates stated minimum Python version (doc).
CHANGELOG.md Adds 1.0.0 release notes and updates routing module reference.
.github/workflows/validation.yml Drops Python 3.11 from CI matrix.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +26 to +30
def main():
# example: python config_generator_as_memo_num.py 20 0 1 10 1 0.0002 1 -o as_20.json -s 10

parser = argparse.ArgumentParser()
parser.add_argument('net_size', type=int, help="net_size (int) - Number of routers")

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.

main() has no indented body because the example comment is at column 0. As written, this will raise an IndentationError at import time. Indent the comment (or add a docstring) so the first statement in main() is properly indented under the function definition.

Copilot uses AI. Check for mistakes.
Comment thread pyproject.toml
]

[project.scripts]
generate-internet-autonomous = "utils.config_generators.config_generator_as_memo_num:main"

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.

generate-internet-autonomous points to utils.config_generators.config_generator_as_memo_num:main, but there is no utils/ package in the repo and the generator was moved under sequence.utils.config_generator_as_memo_num. This entry point will fail at runtime with ModuleNotFoundError. Update the script target to the correct import path.

Suggested change
generate-internet-autonomous = "utils.config_generators.config_generator_as_memo_num:main"
generate-internet-autonomous = "sequence.utils.config_generator_as_memo_num:main"

Copilot uses AI. Check for mistakes.
### 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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants