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

Enhance network generation capabilities with string parsing and connection management #168

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

CardamaS99
Copy link

This pull request introduces a new feature for generating a network from a string representation and manage connections between hosts in the QuNetSim library. This module simplifies the process of setting up complex quantum and classical network topologies.

Key Features

  • Network Generation: Create networks using a simple string representation.
  • Connection Management: Automatically handle classical, quantum, and combined connections between hosts.
  • Regular Expression Parsing: Efficiently parse and interpret network configurations.

Syntax

  • Alice <==> Bob: to represent a classical and quantum connection.
  • Alice <~~> Bob: to represent a quantum only connection.
  • Alice <--> Bob: to represent a classical only connection.

All connections are added uni-directionally, so < and > represent the direction of the flow of traffic.

Documentation and Examples:

  • README.md: Added a new quick example demonstrating how to generate a network from a string.
  • examples/network_generated/send_qubit.py: Added a new example script showcasing the usage of the network generation feature.

New Modules and Functions:

  • qunetsim/__init__.py: Updated to import the new generator module.
  • qunetsim/generator/__init__.py: Added a docstring and imported the network_generate function.
  • qunetsim/generator/conn_type.py: Introduced ConnType class to handle different connection types.
  • qunetsim/generator/connection.py: Added Connection class to represent connections between hosts.
  • qunetsim/generator/direction.py: Added Direction class to handle connection directions.
  • qunetsim/generator/generate.py: Implemented functions to parse network strings and generate networks.

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.

1 participant