dqcnac.network_configuration.network_builder module
Simple network_configuration classes module.
- dqcnac.network_configuration.network_builder.all_to_all(network: Network, nodes: Dict[str, Node], ebits: List[int], n_nodes: int)[source]
Create a network with an all to all topology.
- Parameters:
network – the network
nodes – the nodes in the network
ebits – the ebits
n_nodes – the number of nodes in the network
- dqcnac.network_configuration.network_builder.lnn(network: Network, nodes: Dict[str, Node], ebits: List[int], n_nodes: int)[source]
Create a network with a linear nearest neighbor.
- Parameters:
network – the network
nodes – the nodes in the network
ebits – the ebits
n_nodes – the number of nodes in the network
- dqcnac.network_configuration.network_builder.load_yaml(filename: str) dict[source]
Load a yaml file and parser it into a dictionary
- Parameters:
filename – the name of the file to parser
- Returns:
a dictionary
- dqcnac.network_configuration.network_builder.ring(network: Network, nodes: Dict[str, Node], ebits: List[int], n_nodes: int)[source]
Create a network with a ring topology.
- Parameters:
network – the network
nodes – the nodes in the network
ebits – the ebits
n_nodes – the number of nodes in the network
- dqcnac.network_configuration.network_builder.simple_network(n_nodes: int, device_type: str, network_topology: str = 'lnn') Network[source]
Create a simple network.
- Parameters:
n_nodes – number of nodes in the network
device – device type of devices in the network, either the name of one of the supported devices or a dictionary containing the device properties
network_topology – the topology of the network
- Returns:
a network
- dqcnac.network_configuration.network_builder.star(network: Network, nodes: Dict[str, Node], ebits: List[int], n_nodes: int)[source]
Create a network with a star topology.
- Parameters:
network – the network
nodes – the nodes in the network
ebits – the ebits
n_nodes – the number of nodes in the network