kosmos.topology.predefined_quantum.builders

Module Attributes

DEFAULT_COHERENCE_TIME: float = 1.0
DEFAULT_DISTANCE: float = 1.0
DEFAULT_ATTENUATION: float = 0.0
DEFAULT_SIGNAL_SPEED: float = 0.0002
DEFAULT_REPETITION_RATE: float = 1000000.0

Classes

class PredefinedQuantumTopology

Bases: abc.ABC

Abstract base class for predefined quantum topologies.


Methods

build() kosmos.topology.net.Network

Construct the topology and return a Network instance.

Returns:

Constructed network instance.

Return type:

Network


class LineTopology(num_nodes: int, num_qubits: int)

Bases: PredefinedQuantumTopology

Line quantum topology.

Initialize the line quantum topology.

Parameters:
  • num_nodes (int) – Number of nodes (must be >= 2).

  • num_qubits (int) – Number of qubits for the node.


Methods

build() kosmos.topology.net.Network

Build the line quantum topology.

Returns:

Network with nodes connected in a linear chain.

Return type:

Network


class RingTopology(num_nodes: int, num_qubits: int)

Bases: PredefinedQuantumTopology

Ring quantum topology.

Initialize the ring quantum topology.

Parameters:
  • num_nodes (int) – Number of nodes (must be >= 3).

  • num_qubits (int) – Number of qubits for the node.


Methods

build() kosmos.topology.net.Network

Build the ring quantum topology.

Returns:

Network forming a closed cycle.

Return type:

Network


class StarTopology(num_nodes: int, num_qubits: int)

Bases: PredefinedQuantumTopology

Star quantum topology.

Initialize the star quantum topology.

Parameters:
  • num_nodes (int) – Number of nodes (must be >= 2).

  • num_qubits (int) – Number of qubits for the node.


Methods

build() kosmos.topology.net.Network

Build the star quantum topology.

Returns:

Network with one central node and all other nodes connected to the center.

Return type:

Network