@@ -17,13 +17,13 @@ everything you need::
1717Core concepts
1818--------------
1919
20- ^^^^^^^^^^^^^^^^^^^^^
20+ ^^^^^^^^^^^^^^^^^
2121NetQASMConnection
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
2828Create 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
3737If 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+ ^^^^^
4245Qubit
43- ^^^^^^^^^^^^^^^^^^^^^
46+ ^^^^^
4447
4548A 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
5558Gates are **queued ** — nothing executes until you call ``flush() ``.
5659
57- ^^^^^^^^^^^^^^^^^^^^^
60+ ^^^^^^^^^
5861EPRSocket
59- ^^^^^^^^^^^^^^^^^^^^^
62+ ^^^^^^^^^
6063
6164Used 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+ ^^^^^^^
7477flush()
75- ^^^^^^^^^^^^^^^^^^^^^
78+ ^^^^^^^
7679
7780The **sync point ** that executes all queued quantum operations and makes measurement results available.
7881Before ``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
9497See the mid-circuit logic example in `Examples <Examples.rst >`_ for a full demonstration.
9598
96- -----------------------
99+ ---------------
97100Minimal example
98- -----------------------
101+ ---------------
99102
100103A 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+ --------------------
114117Two-node EPR example
115- -----------------------
118+ --------------------
116119
117120Alice 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
139142Both sides will print the same random number (0 or 1), demonstrating quantum correlation.
140143
141- --------------------------
144+ -----------------------
142145Classical communication
143- --------------------------
146+ -----------------------
144147
145148For exchanging classical messages between nodes (e.g. measurement outcomes for teleportation corrections),
146149SimulaQron provides ``SimulaQronClassicalClient `` and ``SimulaQronClassicalServer ``.
0 commit comments