You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<h1>Classical Communication<aclass="headerlink" href="#classical-communication" title="Permalink to this headline">¶</a></h1>
78
+
<p>In the figure below there is a schematic overview of how the communication is realized between the nodes in a network simulated by SimulaQron.
79
+
In this setup there are three nodes: Alice, Bob and Eve.
80
+
Firstly, the applications in each node communicate with a CQC (classical-quantum-combiner) server that in turn talk to a SimulaQron server.
81
+
CQC is an interface between the classical control information in the network and the hardware, here simulated by SimulaQron.
82
+
The communication between the nodes needed to simulate the quantum hardware is handled by the SimulaQron servers, denoted SimulaQron internal communication in the figure.
83
+
Note that such communication is needed since entanglement cannot be simulated locally.
84
+
SimulaQron comes with a Python library that handles all the communication between the application and the CQC server.
85
+
In this library, the object <codeclass="code docutils literal notranslate"><spanclass="pre">CQCConnection</span></code> takes care of this communication.
86
+
Any operation applied to the qubits in this Python library is translated to a message sent to the CQC server, by the <codeclass="code docutils literal notranslate"><spanclass="pre">CQCConnection</span></code>.</p>
87
+
<p>On top of the quantum network there will be classical communication between the applications, denoted Application communication in the figure.
88
+
This communication include for example the case where Alice can sends Bob an encoded classical message or a measurement outcome.
89
+
Such communication would also be present in a real implementation of a quantum network.
90
+
There is a built-in feature in the Python library that realize this functionality, which have been developed for ease of use for someone not familiar with a client/server setup.</p>
91
+
<divclass="admonition note">
92
+
<pclass="first admonition-title">Note</p>
93
+
<pclass="last">To have classical communication between the applications, one is not forced to use the built-in functionality realized by the <codeclass="docutils literal notranslate"><spanclass="pre">CQCConnection</span></code>. You can just as well setup your own client/server communication using the method of your preference. More information and a template for setting up a client/server interaction can be found in <aclass="reference internal" href="NativeModeTemplate.html"><spanclass="doc">Template for programming in native mode</span></a>:.</p>
94
+
</div>
95
+
<p>The built-in classical communication of the Python library is handled by the object <codeclass="code docutils literal notranslate"><spanclass="pre">CQCConnection</span></code>.
96
+
Let assume that Alice wants to send a classical message to Bob and that Alice and Bob are instances of <codeclass="code docutils literal notranslate"><spanclass="pre">CQCConnection</span></code> at the respective nodes.
97
+
This can be done by simply executing <codeclass="code docutils literal notranslate"><spanclass="pre">Alice.sendClassical("Bob",</span><spanclass="pre">msg)</span></code>, where <codeclass="code docutils literal notranslate"><spanclass="pre">msg</span></code> is the message to be sent from Alice to Bob.
98
+
The method <codeclass="code docutils literal notranslate"><spanclass="pre">sendClassical</span></code> tries to open a socket connection to Bob and to sent the message.
99
+
Note that if this method is never called, a socket connection is never opened.
100
+
The socket connection between Alice and Bob are closed after the message is sent.
101
+
This classical communication is thus not built for efficiency but for easy of use for someone not familiar with client/server setup.</p>
102
+
<divclass="admonition note">
103
+
<pclass="first admonition-title">Note</p>
104
+
<pclass="last">CQC and the python library does not require SimulaQron to function. However if you want to use the built-in classical communication you need SimulaQron installed.</p>
0 commit comments