Skip to content

Commit 6cecaaa

Browse files
committed
Update "index" "Overview" and "NetQASM" documentation
1 parent 4eec441 commit 6cecaaa

4 files changed

Lines changed: 43 additions & 22 deletions

File tree

README.md

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,25 @@ After installing the Operating System on the virtual machine, please continue th
6969
the virtual machine using the Linux instructions as mentioned above.
7070

7171

72-
Documentation
73-
-------------
72+
## Tests
73+
74+
There are 2 sets of tests: quick and slow ones. To ease the execution, the `Makefile` provides two targets:
75+
* `tests`: This target only run the quick tests.
76+
* `tests_all`: This target runs quick and slow tests.
77+
78+
To run a test target, simply invoke it with make:
79+
```shell
80+
make tests
81+
```
82+
83+
or:
84+
```shell
85+
make tests_all
86+
```
87+
88+
89+
## Documentation
90+
7491

7592
Documentation and examples are explained in the HTML documentation
7693
https://softwarequtech.github.io/SimulaQron/html/index.html

docs/NetQASM.rst

Lines changed: 20 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,13 @@ everything you need::
1717
Core concepts
1818
--------------
1919

20-
^^^^^^^^^^^^^^^^^^^^^
20+
^^^^^^^^^^^^^^^^^
2121
NetQASMConnection
22-
^^^^^^^^^^^^^^^^^^^^^
22+
^^^^^^^^^^^^^^^^^
2323

24-
Your connection to the **local quantum backend** (SimulaQron's virtual quantum node). This is *not* a connection
25-
to another party — it is how your node talks to its local simulated quantum hardware. All qubit operations are
26-
queued through this connection.
24+
This objects represent your connection to the **local quantum backend** (SimulaQron's virtual quantum node).
25+
This is *not* a connection to another party — it is how your node talks to its local simulated quantum hardware.
26+
All qubit operations are queued through this connection.
2727

2828
Create it once, use it throughout your program, and close it at the end::
2929

@@ -36,11 +36,14 @@ Create it once, use it throughout your program, and close it at the end::
3636

3737
If your program uses EPR pairs, pass the EPR sockets at creation time::
3838

39+
from netqasm.sdk import EPRSocket
40+
41+
epr_socket = EPRSocket("Bob")
3942
conn = NetQASMConnection("Alice", epr_sockets=[epr_socket])
4043

41-
^^^^^^^^^^^^^^^^^^^^^
44+
^^^^^
4245
Qubit
43-
^^^^^^^^^^^^^^^^^^^^^
46+
^^^^^
4447

4548
A qubit allocated on the local quantum backend. Pass the connection so the backend knows where to allocate it::
4649

@@ -54,9 +57,9 @@ A qubit allocated on the local quantum backend. Pass the connection so the backe
5457

5558
Gates are **queued** — nothing executes until you call ``flush()``.
5659

57-
^^^^^^^^^^^^^^^^^^^^^
60+
^^^^^^^^^
5861
EPRSocket
59-
^^^^^^^^^^^^^^^^^^^^^
62+
^^^^^^^^^
6063

6164
Used to create or receive entangled qubit pairs with a remote node::
6265

@@ -70,9 +73,9 @@ Used to create or receive entangled qubit pairs with a remote node::
7073
epr_socket = EPRSocket("Alice")
7174
epr = epr_socket.recv_keep()[0]
7275

73-
^^^^^^^^^^^^^^^^^^^^^
76+
^^^^^^^
7477
flush()
75-
^^^^^^^^^^^^^^^^^^^^^
78+
^^^^^^^
7679

7780
The **sync point** that executes all queued quantum operations and makes measurement results available.
7881
Before ``flush()``, measurement results are just futures/promises. After ``flush()``, you can read them
@@ -93,9 +96,9 @@ You can call ``flush()`` multiple times on the same connection. This enables **m
9396

9497
See the mid-circuit logic example in `Examples <Examples.rst>`_ for a full demonstration.
9598

96-
-----------------------
99+
---------------
97100
Minimal example
98-
-----------------------
101+
---------------
99102

100103
A single-node program that creates a qubit, applies a Hadamard gate, and measures::
101104

@@ -110,9 +113,9 @@ A single-node program that creates a qubit, applies a Hadamard gate, and measure
110113
print("Measurement outcome:", int(m))
111114
conn.close()
112115

113-
-----------------------
116+
--------------------
114117
Two-node EPR example
115-
-----------------------
118+
--------------------
116119

117120
Alice and Bob generate an EPR pair and each measure their qubit to get correlated random numbers.
118121

@@ -138,9 +141,9 @@ Alice and Bob generate an EPR pair and each measure their qubit to get correlate
138141

139142
Both sides will print the same random number (0 or 1), demonstrating quantum correlation.
140143

141-
--------------------------
144+
-----------------------
142145
Classical communication
143-
--------------------------
146+
-----------------------
144147

145148
For exchanging classical messages between nodes (e.g. measurement outcomes for teleportation corrections),
146149
SimulaQron provides ``SimulaQronClassicalClient`` and ``SimulaQronClassicalServer``.

docs/Overview.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ deal with this backend simulation.
7676

7777
Nevertheless, as a guide to the backend, it consists of three essential components:
7878

79-
* quantumEngine - There are currenlty three different quantumEngines implemented: Using `QuTip <http://qutip.org/>`_
79+
* quantumEngine - There are currently three different quantumEngines implemented: Using `QuTip <http://qutip.org/>`_
8080
and mixed state, using `Project Q <https://projectq.ch/>`_ and pure states and finally using stabilizer formalism.
8181
This corresponds to one quantum register full of qubits across which gates can be performed. Should you wish to
8282
use a different backend, you may wish to add a different engine.
@@ -170,7 +170,8 @@ Automated tests
170170
^^^^^^^^^^^^^^^
171171

172172
There are number of automated tests that test many (but not all) of the features of SimulaQron and the NetQASM interface.
173-
See `Getting Started <GettingStarted.rst>`_ for how to run these.
173+
To run these tests, you need to clone the SimulaQron `GitHub repository <https://github.com/SoftwareQuTech/SimulaQron>`_,
174+
and follow the ``README.md`` file to install and run the tests.
174175
Some of the automated tests use quantum tomography and are thus inherently probabilistic.
175176
Therefore if you see that one of these fails, you can try to run the test again and see if it is consistent.
176177
If the tests are to slow on your computer you can also run the short version, which skips the quantum tomography tests.

docs/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Key features
1313

1414
* **Distributed quantum internet simulation** — install a local simulation program on each computer, or run all nodes
1515
on a single machine
16-
* **Three simulation backends** — stabilizer formalism (default, efficient), `QuTip <http://qutip.org/>`_ (mixed
16+
* **Three simulation backends** — stabilizer formalism (efficient), `QuTip <http://qutip.org/>`_ (default, mixed
1717
state), and `ProjectQ <https://projectq.ch/>`_ (pure state)
1818
* **Two programming interfaces** — the NetQASM SDK (recommended) and a native Twisted mode for low-level access
1919
* **Configurable network topologies** — complete, ring, path, random tree, or custom topologies

0 commit comments

Comments
 (0)