@@ -21,7 +21,7 @@ you can install the *deadsnakes* repository to gain access to some specific pyth
2121
2222 sudo add-apt-repository -y "ppa:deadsnakes/ppa"
2323
24- After adding the repository, you can install the *full * version of python, including the development package and the ::
24+ After adding the repository, you can install the *full * version of python, including the development package::
2525
2626 sudo apt-get install python3.12-full python3.12-dev
2727
@@ -56,10 +56,10 @@ Testing a simple example
5656------------------------
5757
5858Before delving into how to write any program yourself, let's first simply run one of the existing examples.
59- Remember from the Overview that SimulaQron has two parts: the first are the virtual node servers that simulate
60- the hardware at each node as well as the quantum communication between them in a transparent manner.
59+ Remember from the :doc: ` Overview<Overview> ` that SimulaQron has two parts: the first are the virtual node servers
60+ that simulate the hardware at each node as well as the quantum communication between them in a transparent manner.
6161The second are the applications themselves which can be written in two ways: the direct way is to use the native
62- mode using the Python Twisted framework connecting to the virtual node servers (see ` Examples < Examples.rst >`_ ),
62+ mode using the Python Twisted framework connecting to the virtual node servers (see :ref: ` Native mode examples < native-mode-examples >` ),
6363and the recommended way is to use the NetQASM library that calls the virtual nodes via the NetQASM interface.
6464We will here illustrate how to use SimulaQron with the NetQASM library.
6565
@@ -81,7 +81,7 @@ the backend of SimulaQron simply type::
8181 responsibility for problems caused by SimulaQron.
8282
8383For more information on what ``simulaqron start `` does, how to change the nodes and the ports of the network,
84- the topology etc, see `Configuring the Network <ConfNodes.rst >`_ .
84+ the topology etc, see :doc: `Configuring the Network <ConfNodes >` .
8585
8686To stop the backend, simply type::
8787
@@ -99,7 +99,8 @@ Running a protocol
9999^^^^^^^^^^^^^^^^^^^
100100
101101Having started the virtual quantum nodes as above, let us now run a simple test application, which already illustrates
102- some of the aspects in realizing protocols.
102+ some of the aspects in realizing protocols. Before proceeding, please download the SimulaQron examples as shown in the
103+ :ref: `How to get the examples<get-examples> ` section.
103104Our objective will be to realize the following protocol which will generate 1 shared random bit between Alice and Bob.
104105Evidently, there would be classical means to achieve this trivial task chosen for illustration.
105106
@@ -108,11 +109,12 @@ Evidently, there would be classical means to achieve this trivial task chosen fo
108109
109110* Both Alice and Bob measure their respective qubits to obtain a classical random number :math: `x \in \{ 0 ,1 \}`.
110111
111- The examples can be found in ``examples/new-sdk/ `` (see `Examples <Examples.rst >`_ for the full list).
112- Before seeing how this example works, let us simply run the code::
112+ We will follow the example located in ``examples/new-sdk/coorRNG `` (see :ref: `New SDK Examples <new-sdk-examples >` for
113+ the full list). Before seeing how this works, let us simply run the code (assuming you're already in the ``SimulaQron ``
114+ folder cloned from GitHub)::
113115
114116 cd examples/new-sdk/corrRNG
115- sh run.sh
117+ bash run.sh
116118
117119You should be seeing the following two lines::
118120
@@ -125,21 +127,21 @@ going on here? Let us first look at how we will realize the example by making an
125127* Alice and Bob generate one EPR pair, that is, two maximally entangled qubits :math: `A` and :math: `B` of the form
126128 :math: `|\Psi \rangle _{AB} = \frac {1 }{\sqrt {2 }} \left (|0 \rangle _A |0 \rangle _B + |1 \rangle _A |1 \rangle _B\right )`
127129
128- * Alice and Bob are informed of the identifiers of the qubits and are informed that entanglement was generated.
129-
130130* Both Alice and Bob measure their respective qubits to obtain a classical random number :math: `x \in \{ 0 ,1 \}`.
131131
132- While the task we want to realize here is completely trivial, the addition of step 3 does however already highlight a
133- range of choices on how to realize step 3 and the need to find good abstractions to allow easy application development.
134- One way to realize step 3 would be to hardwire Alice's and Bob's measurements: if the hardware can identify the
132+ While the task we want to realize here is completely trivial, the addition of step 2 does however already highlight a
133+ range of choices on how to realize step 2 and the need to find good abstractions to allow easy application development.
134+ One way to realize step 2 would be to hardwire Alice's and Bob's measurements: if the hardware can identify the
135135correct qubits from the entanglement generation, then we could instruct it to measure it immediately without asking
136136for a notification from the entanglement generation process. It is clear that in a network that is a bit larger than
137- our tiny three node setup, identifying the right setup requires a link between the underlying qubits and classical
137+ our tiny two node setup, identifying the right setup requires a link between the underlying qubits and classical
138138control information: this is the objective of the classical/quantum combiner.
139139
140140The script ``run.sh `` executes the following two python scripts::
141141
142- #!/bin/sh
142+ #!/usr/bin/env bash
143+
144+ # Some code to start SimulaQron backend
143145
144146 python3 aliceTest.py
145147 python3 bobTest.py &
@@ -188,7 +190,7 @@ Similarly the core of ``bobTest.py`` is::
188190 m1_val = int(m1)
189191 sim_conn.close()
190192
191- For further examples, see `Examples <Examples.rst >`_ and `The NetQASM Interface <NetQASM.rst >`_ for the full SDK reference.
193+ For further examples, see :doc: `Examples <Examples >` and :doc: `The NetQASM Interface <NetQASM >` for the full SDK reference.
192194
193195.. _settings :
194196
@@ -207,7 +209,7 @@ To set a setting, for example to use the projectQ backend, type::
207209This will create a file named ``simulaqron_settings.json `` in the current folder. This new file contains a full set of
208210simulaqron configuration, including the setting that was just configured (using the `projectq ` backend, in the example).
209211
210- It is also possible to manually create this` `simulaqron_settings.json`` file with any text editor::
212+ It is also possible to manually create this ` `simulaqron_settings.json `` file with any text editor::
211213
212214 {
213215 "backend": "projectq",
@@ -247,7 +249,7 @@ implement using simulaqron.
247249 it, set the settings and start it again.
248250
249251It is also possible to create the default SimulaQron network configuration in the current folder. Check the
250- `Configuring the Network <ConfNodes.rst >`_ document to check how to achieve this.
252+ :doc: `Configuring the Network <ConfNodes >` document to check how to achieve this.
251253
252254^^^^^^^^^^^^^^^^^^^
253255Settings precedence
@@ -270,7 +272,7 @@ Settings Fields
270272The SimulaQron settings file contains a set of fields to control the configurations of the SimulaQron simulation:
271273
272274* ``max_qubit ``: Maximum number of qubits to simulate on the Virtual Node.
273- * ``max_registers ``: Maximmum number of registers to use in the Virtual Node.
275+ * ``max_registers ``: Maximum number of registers to use in the Virtual Node.
274276* ``conn_retry_time ``: Number of seconds to wait between connection retries.
275277* ``conn_max_retries ``: Maximum number of times to retry a connection before failing the whole execution.
276278* ``recv_timeout ``: Maximum number of milliseconds to wait for the messages when trying to create EPR pairs.
0 commit comments