QuantumNetworkServer#
- class QuantumNetworkServer(socket_ip=None, port=None, background=False)[source]#
This class sets up a server to coordinate the QuantumNetwork. All the simulations are performed in this instance, so the machine running it should preferably have abundant computational resources.
- Parameters
- socket_ipstr, optional
The IP address of the network socket. By default, the IP adress of the executing machine is used.
- portint, optional
The port to listen for requests. The default is 7070.
- backgroundbool, optional
If set to True, the server will run in the background as a separate thread. The default is False.
Examples
We create a server listening to the localhost IP address:
>>> from qrisp.quantum_network import QuantumNetworkServer >>> example_server = QuantumNetworkServer(socket_ip = "127.0.0.1") >>> example_server.start()
Methods#
Starts the server. |
|
Stops the server. |