qns.network.topology package

Submodules

qns.network.topology.basictopo module

class qns.network.topology.basictopo.BasicTopology(nodes_number, nodes_apps: List[qns.entity.node.app.Application] = [], qchannel_args: Dict = {}, cchannel_args: Dict = {}, memory_args: Optional[List[Dict]] = {})[source]

Bases: qns.network.topology.topo.Topology

BasicTopology includes nodes_number Qnodes. None of them are connected with each other

build() Tuple[List[qns.entity.node.node.QNode], List[qns.entity.qchannel.qchannel.QuantumChannel]][source]

build the special topology

Returns

the list of QNodes and the list of QuantumChannel

qns.network.topology.gridtopo module

class qns.network.topology.gridtopo.GridTopology(nodes_number, nodes_apps: List[qns.entity.node.app.Application] = [], qchannel_args: Dict = {}, cchannel_args: Dict = {}, memory_args: Optional[List[Dict]] = {})[source]

Bases: qns.network.topology.topo.Topology

GridTopology includes nodes_number Qnodes. nodes_number should be a perfect square number. The topology is a square grid pattern, where each node has 4 neighbors.

build() Tuple[List[qns.entity.node.node.QNode], List[qns.entity.qchannel.qchannel.QuantumChannel]][source]

build the special topology

Returns

the list of QNodes and the list of QuantumChannel

qns.network.topology.linetopo module

class qns.network.topology.linetopo.LineTopology(nodes_number, nodes_apps: List[qns.entity.node.app.Application] = [], qchannel_args: Dict = {}, cchannel_args: Dict = {}, memory_args: Optional[List[Dict]] = {})[source]

Bases: qns.network.topology.topo.Topology

LineTopology includes nodes_number Qnodes. The topology is a line pattern.

build() Tuple[List[qns.entity.node.node.QNode], List[qns.entity.qchannel.qchannel.QuantumChannel]][source]

build the special topology

Returns

the list of QNodes and the list of QuantumChannel

qns.network.topology.randomtopo module

class qns.network.topology.randomtopo.RandomTopology(nodes_number, lines_number: int, nodes_apps: List[qns.entity.node.app.Application] = [], qchannel_args: Dict = {}, cchannel_args: Dict = {}, memory_args: Optional[List[Dict]] = {})[source]

Bases: qns.network.topology.topo.Topology

RandomTopology includes nodes_number Qnodes. The topology is randomly generated.

build() Tuple[List[qns.entity.node.node.QNode], List[qns.entity.qchannel.qchannel.QuantumChannel]][source]

build the special topology

Returns

the list of QNodes and the list of QuantumChannel

qns.network.topology.topo module

class qns.network.topology.topo.ClassicTopology(value)[source]

Bases: enum.Enum

An enumeration.

All = 2
Empty = 1
Follow = 3
class qns.network.topology.topo.Topology(nodes_number: int, nodes_apps: List[qns.entity.node.app.Application] = [], qchannel_args: Dict = {}, cchannel_args: Dict = {}, memory_args: Optional[List[Dict]] = {})[source]

Bases: object

Topology is a factory for QuantumNetwork

add_cchannels(classic_topo: qns.network.topology.topo.ClassicTopology = ClassicTopology.Empty, nl: List[qns.entity.node.node.QNode] = [], ll: Optional[List[qns.entity.qchannel.qchannel.QuantumChannel]] = None)[source]

build classic network topology

Parameters
build() Tuple[List[qns.entity.node.node.QNode], List[qns.entity.qchannel.qchannel.QuantumChannel]][source]

build the special topology

Returns

the list of QNodes and the list of QuantumChannel

qns.network.topology.treetopo module

class qns.network.topology.treetopo.TreeTopology(nodes_number, children_number: int = 2, nodes_apps: List[qns.entity.node.app.Application] = [], qchannel_args: Dict = {}, cchannel_args: Dict = {}, memory_args: Optional[List[Dict]] = {})[source]

Bases: qns.network.topology.topo.Topology

TreeTopology includes nodes_number Qnodes. The topology is a tree pattern, where each parent has children_num children.

build() Tuple[List[qns.entity.node.node.QNode], List[qns.entity.qchannel.qchannel.QuantumChannel]][source]

build the special topology

Returns

the list of QNodes and the list of QuantumChannel

qns.network.topology.waxmantopo module

class qns.network.topology.waxmantopo.WaxmanTopology(nodes_number: int, size: float, alpha: float, beta: float, nodes_apps: List[qns.entity.node.app.Application] = [], qchannel_args: Dict = {}, cchannel_args: Dict = {}, memory_args: Optional[List[Dict]] = {})[source]

Bases: qns.network.topology.topo.Topology

WaxmanTopology is the random topology generator using Waxman’s model.

build() Tuple[List[qns.entity.node.node.QNode], List[qns.entity.qchannel.qchannel.QuantumChannel]][source]

build the special topology

Returns

the list of QNodes and the list of QuantumChannel

Module contents

class qns.network.topology.BasicTopology(nodes_number, nodes_apps: List[qns.entity.node.app.Application] = [], qchannel_args: Dict = {}, cchannel_args: Dict = {}, memory_args: Optional[List[Dict]] = {})[source]

Bases: qns.network.topology.topo.Topology

BasicTopology includes nodes_number Qnodes. None of them are connected with each other

build() Tuple[List[qns.entity.node.node.QNode], List[qns.entity.qchannel.qchannel.QuantumChannel]][source]

build the special topology

Returns

the list of QNodes and the list of QuantumChannel

class qns.network.topology.GridTopology(nodes_number, nodes_apps: List[qns.entity.node.app.Application] = [], qchannel_args: Dict = {}, cchannel_args: Dict = {}, memory_args: Optional[List[Dict]] = {})[source]

Bases: qns.network.topology.topo.Topology

GridTopology includes nodes_number Qnodes. nodes_number should be a perfect square number. The topology is a square grid pattern, where each node has 4 neighbors.

build() Tuple[List[qns.entity.node.node.QNode], List[qns.entity.qchannel.qchannel.QuantumChannel]][source]

build the special topology

Returns

the list of QNodes and the list of QuantumChannel

class qns.network.topology.LineTopology(nodes_number, nodes_apps: List[qns.entity.node.app.Application] = [], qchannel_args: Dict = {}, cchannel_args: Dict = {}, memory_args: Optional[List[Dict]] = {})[source]

Bases: qns.network.topology.topo.Topology

LineTopology includes nodes_number Qnodes. The topology is a line pattern.

build() Tuple[List[qns.entity.node.node.QNode], List[qns.entity.qchannel.qchannel.QuantumChannel]][source]

build the special topology

Returns

the list of QNodes and the list of QuantumChannel

class qns.network.topology.RandomTopology(nodes_number, lines_number: int, nodes_apps: List[qns.entity.node.app.Application] = [], qchannel_args: Dict = {}, cchannel_args: Dict = {}, memory_args: Optional[List[Dict]] = {})[source]

Bases: qns.network.topology.topo.Topology

RandomTopology includes nodes_number Qnodes. The topology is randomly generated.

build() Tuple[List[qns.entity.node.node.QNode], List[qns.entity.qchannel.qchannel.QuantumChannel]][source]

build the special topology

Returns

the list of QNodes and the list of QuantumChannel

class qns.network.topology.Topology(nodes_number: int, nodes_apps: List[qns.entity.node.app.Application] = [], qchannel_args: Dict = {}, cchannel_args: Dict = {}, memory_args: Optional[List[Dict]] = {})[source]

Bases: object

Topology is a factory for QuantumNetwork

add_cchannels(classic_topo: qns.network.topology.topo.ClassicTopology = ClassicTopology.Empty, nl: List[qns.entity.node.node.QNode] = [], ll: Optional[List[qns.entity.qchannel.qchannel.QuantumChannel]] = None)[source]

build classic network topology

Parameters
build() Tuple[List[qns.entity.node.node.QNode], List[qns.entity.qchannel.qchannel.QuantumChannel]][source]

build the special topology

Returns

the list of QNodes and the list of QuantumChannel

class qns.network.topology.TreeTopology(nodes_number, children_number: int = 2, nodes_apps: List[qns.entity.node.app.Application] = [], qchannel_args: Dict = {}, cchannel_args: Dict = {}, memory_args: Optional[List[Dict]] = {})[source]

Bases: qns.network.topology.topo.Topology

TreeTopology includes nodes_number Qnodes. The topology is a tree pattern, where each parent has children_num children.

build() Tuple[List[qns.entity.node.node.QNode], List[qns.entity.qchannel.qchannel.QuantumChannel]][source]

build the special topology

Returns

the list of QNodes and the list of QuantumChannel

class qns.network.topology.WaxmanTopology(nodes_number: int, size: float, alpha: float, beta: float, nodes_apps: List[qns.entity.node.app.Application] = [], qchannel_args: Dict = {}, cchannel_args: Dict = {}, memory_args: Optional[List[Dict]] = {})[source]

Bases: qns.network.topology.topo.Topology

WaxmanTopology is the random topology generator using Waxman’s model.

build() Tuple[List[qns.entity.node.node.QNode], List[qns.entity.qchannel.qchannel.QuantumChannel]][source]

build the special topology

Returns

the list of QNodes and the list of QuantumChannel