kosmos.topology.predefined_quantum.builders

Module Attributes

DEFAULT_COHERENCE_TIME: float = 1.0

Classes

class PredefinedQuantumTopology[source]

Bases: abc.ABC

Abstract base class for predefined quantum topologies.


Methods

build() kosmos.topology.net.Network[source]

Construct the topology and return a Network instance.

Returns:

Constructed network instance.

Return type:

Network


class LineTopology(num_nodes: int, num_qubits: int)[source]

Bases: PredefinedQuantumTopology

Line quantum topology.

num_nodes

Number of nodes in the line.

Type:

int

num_qubits

Number of qubits per node.

Type:

int

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[source]

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)[source]

Bases: PredefinedQuantumTopology

Ring quantum topology.

num_nodes

Number of nodes in the ring.

Type:

int

num_qubits

Number of qubits per node.

Type:

int

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[source]

Build the ring quantum topology.

Returns:

Network forming a closed cycle.

Return type:

Network


class StarTopology(num_nodes: int, num_qubits: int)[source]

Bases: PredefinedQuantumTopology

Star quantum topology.

num_nodes

Number of nodes in the star (including center).

Type:

int

num_qubits

Number of qubits per node.

Type:

int

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[source]

Build the star quantum topology.

Returns:

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

Return type:

Network