simulaqron package

Submodules

simulaqron.SimulaQron module

class simulaqron.SimulaQron.SimulaQronDaemon(pidfile, name=None, nrnodes=None, nodes=None, topology=None, new=True)[source]

Bases: daemons.prefab.run.RunDaemon

run()[source]

Starts all nodes defined in netsim’s config directory.

simulaqron.network module

class simulaqron.network.Network(name=None, nodes=None, topology=None, network_config_file=None, force=False, new=True)[source]

Bases: object

property running

Is the network up and running?

start(wait_until_running=True)[source]

Starts the network. The boolean flag ‘wait_until_running’ can be used whether the call to this method should blog until the all processes are running and are connected or not. :param wait_until_running: bool

stop()[source]

Stops the network.

simulaqron.network.construct_topology_config(topology, nodes)[source]

Constructs a json file at config/topology.json, used to define the topology of the network.

Parameters
  • topology – str Should be one of the following: None, ‘complete’, ‘ring’, ‘random_tree’.

  • nodes – list of str List of the names of the nodes.

Returns

None

simulaqron.network.get_random_connected(nodes, nr_edges)[source]

Constructs a dictionary describing a random connected graph with a specified number of edges, with the name of the vertices are taken from the ‘nodes’

Parameters
  • nodes – list of str Name of the nodes to be used

  • nr_edges – int The number of edges that the graph should have.

Returns

dct keys are the names of the nodes and values their neighbors

simulaqron.network.get_random_tree(nodes)[source]

Constructs a dictionary describing a random tree, with the name of the vertices are taken from the ‘nodes’

Parameters

nodes – list of str Name of the nodes to be used

Returns

dct keys are the names of the nodes and values their neighbors

simulaqron.settings module

class simulaqron.settings.Config[source]

Bases: object

class Decorator[source]

Bases: object

classmethod get_setting(method)[source]
classmethod set_setting(method)[source]
property app_file
property backend
config_folder = '/home/travis/virtualenv/python3.6.7/lib/python3.6/site-packages/simulaqron/config'
property conn_retry_time
property cqc_file
default_settings()[source]
property log_level
property max_qubits
property max_registers
property network_config_file
property nodes_file
property noisy_qubits
property recv_retry_time
property recv_timeout
simulaqron_path = '/home/travis/virtualenv/python3.6.7/lib/python3.6/site-packages/simulaqron'
property t1
property topology_file
update_settings(default=False)[source]
property vnode_file

simulaqron.tests_run module

simulaqron.tests_run.main(test_type='quick')[source]
simulaqron.tests_run.parse_args()[source]

Module contents

simulaqron.tests(test_type='quick')