Skip to content

Commit 9c99f5c

Browse files
authored
Reduce the number of citations in the GoSC demo (#1608)
1 parent f21b6fb commit 9c99f5c

File tree

2 files changed

+27
-27
lines changed

2 files changed

+27
-27
lines changed

demonstrations_v2/tutorial_game_of_surface_codes/demo.py

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
Introduction
1717
------------
1818
19-
The game of surface codes [#Litinski]_ is a high-level framework for designing surface code quantum computing architectures.
19+
The game of surface codes is a high-level framework for designing surface code quantum computing architectures.
2020
The game helps us understand space-time trade-offs, where designs with a higher qubit overhead allow for faster computations and vice versa.
2121
For example, a space-efficient design might allow a computation with :math:`10^8` T gates to run in :math:`4` hours using :math:`55k` physical qubits,
2222
whereas an intermediate design may run the same computation in :math:`22` minutes using :math:`120k` physical qubits,
@@ -34,7 +34,7 @@
3434
Hence, we mainly care about performing measurements on qubits in arbitrary bases and efficiently distilling and injecting magic states.
3535
3636
We also note that the patches that represent qubits correspond to surface code qubits.
37-
There is a detailed explanation in Appendix A in [#Litinski]_ that describes the surface code realizations of all operations that we are going to see.
37+
There is a detailed explanation in Appendix A of the paper that describes the surface code realizations of all operations that we are going to see.
3838
These are useful to know in order to grasp the full depth of the game, but are not essential to understanding its rules and concluding design principles that we cover in this demo.
3939
For further reading on these subjects, we recommend the `blog posts on the surface code and quantum error correction <https://arthurpesah.me/blog/>`__ by Arthur Pesah, our :doc:`demo on the toric code <demos/tutorial_toric_code>`, as well as the three-part series on the `toric code <https://decodoku.blogspot.com/2016/03/6-toric-code.html>`__ by James Wooton.
4040
@@ -57,7 +57,7 @@
5757
5858
Qubits are defined as patches of tiles on the board.
5959
A single qubit can occupy one tile (a) or multiple tiles (b), where dotted lines correspond to X and solid lines to Z operators.
60-
Image source: [#Litinski]_.
60+
Image source: Daniel Litinski [1].
6161
6262
Every operation in the game has an associated time cost that we measure in units of code cycles 🕒.
6363
There are some discrepancies to actual surface code cycles, but the correspondance is close enough to weigh out space-time trade-offs in architecture designs.
@@ -75,7 +75,7 @@
7575
:target: javascript:void(0)
7676
7777
Simultaneously measuring the patches of two adjacent patches corresponds to the product of their neighboring edges. Here, we measure :math:`ZZ`.
78-
Image source: [#Litinski]_.
78+
Image source: Daniel Litinski [1].
7979
8080
In particular, if the shared edge contains both Z and X edges, we can measure in the Y basis. In the following example, the upper qubit A has both operator edges :math:`Z_A` and :math:`X_A` exposed.
8181
Measuring it together with the auxillary qubit B, initialized in the :math:`|0\rangle` state below, we measure :math:`(Z_A X_A) \otimes Z_B \propto Y_A \otimes Z_B` alltogether.
@@ -86,7 +86,7 @@
8686
:target: javascript:void(0)
8787
8888
`Y` operators can be measured by having both X and Z edges be exposed with an adjacent auxiliary qubit. The measurement corresponds to the product of all involved operators, involving :math:`Z_A X_A \propto Y_A`.
89-
Image source: [#Litinski]_.
89+
Image source: Daniel Litinski [1].
9090
9191
If we want to measure a single qubit patch in practice, we start off deforming it at the cost of 1🕒, initialize an auxiliary qubit at no cost, and perform the joint measurement as shown above (1🕒).
9292
The entire protocol costs 2🕒 and is shown below:
@@ -97,7 +97,7 @@
9797
:target: javascript:void(0)
9898
9999
The protocol for measuring a single qubit in the Y basis involves deforming the patch (Step 2, 1🕒), initializing an auxillary qubit in :math:`|0\rangle` (0🕒), simultaneously measuring both patches (1🕒) and deforming the qubit back again (0🕒).
100-
Image source: [#Litinski]_.
100+
Image source: Daniel Litinski [1].
101101
102102
Auxiliary qubits play an important role as they allow measuring products of Pauli operators on different qubits,
103103
which is the most crucial operation in this framework, since everything is mapped to `Pauli product measurements <https://pennylane.ai/compilation/pauli-product-measurement>`__.
@@ -109,7 +109,7 @@
109109
110110
Measuring :math:`Y_1 X_3 Z_4 X_5` via a joint auxiliary qubit in 1🕒. In principle multi-qubit measurements with many qubits come at the same cost as with fewer qubit.
111111
However, the requirement of having an auxiliary region connecting all qubits may demand extra deformations.
112-
Image source: [#Litinski]_.
112+
Image source: Daniel Litinski [1].
113113
114114
Non-Clifford Pauli rotations
115115
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -127,7 +127,7 @@
127127
Performing a non-Clifford :math:`\pi/8` rotation corresponds to performing the joint measurement of the Pauli word and :math:`Z` on the magic state qubit.
128128
The measurement of :math:`P \otimes Z_m` costs 1🕒, the subsequent :math:`X` measurement is free.
129129
The additional classically controlled Clifford rotations can be merged again with the measurements at the end of the circuit.
130-
Image source: [#Litinski]_.
130+
Image source: Daniel Litinski [1].
131131
132132
Take for example the Pauli word :math:`P = Z_1 Y_2 X_4` on the architecture layout below.
133133
This design allows one to directly perform :math:`e^{-i \frac{\pi}{8} P}` as we have access to all of :math:`X, Y, Z` on each qubit, as well as the :math:`Z` edge for the magic state qubit.
@@ -138,7 +138,7 @@
138138
:target: javascript:void(0)
139139
140140
Performing :math:`e^{-i \frac{\pi}{8} Z_1 Y_2 X_4}` by measuring :math:`Z_1 Y_2 X_4 Z_m`. The additional measurement :math:`X` on the magic state qubit is not shown and has no additional cost. The remaining Clifford Pauli rotations are merged with the terminal measurements at the end of the circuit via compilation.
141-
Image source: [#Litinski]_.
141+
Image source: Daniel Litinski [1].
142142
143143
We are going to see in the next section that one of the biggest problems is performing Y rotations and measurements (same thing, really, in this framework).
144144
@@ -162,7 +162,7 @@
162162
:target: javascript:void(0)
163163
164164
The compact data block design is efficient in space. However, only one edge is exposed to the auxiliary qubit region in the middle.
165-
Image source: [#Litinski]_.
165+
Image source: Daniel Litinski [1].
166166
167167
This design only uses :math:`\frac{3}{2}n + 3` tiles for :math:`n` qubits.
168168
The biggest drawback is rather obvious: we can only access :math:`Z` measurements in the auxiliary qubit region. In order to perform joint :math:`X` measurements,
@@ -174,7 +174,7 @@
174174
:target: javascript:void(0)
175175
176176
A patch rotation can be used to expose the :math:`X` edge to the auxiliary qubit region.
177-
Image source: [#Litinski]_.
177+
Image source: Daniel Litinski [1].
178178
179179
The worst thing that can happen is to have two opposite qubits require an X measurement,
180180
e.g. qubits (3 and 4) or (5 and 6). If either or both occurs, it takes a total of 6🕒 to rotate the patches.
@@ -193,7 +193,7 @@
193193
:target: javascript:void(0)
194194
195195
A Clifford rotation :math:`e^{i \frac{\pi}{4} P}` is performed by measuring :math:`P \otimes Y`.
196-
Image source: [#Litinski]_.
196+
Image source: Daniel Litinski [1].
197197
198198
In particular, we still need to be able to perform a :math:`Y` measurement `somewhere`.
199199
In this case we just outsourced it to another resource qubit, which we can use for all others and for which we left space in the bottom left corner of the compact data block.
@@ -205,7 +205,7 @@
205205
:target: javascript:void(0)
206206
207207
A Clifford rotation :math:`e^{i \frac{\pi}{4} Z_3 Z_5 Z_6}` is performed by measuring :math:`Z_3 Z_5 Z_6 \otimes Y_\text{resource}` with the additional resource qubit in the bottom left corner of the compact block.
208-
Image source: [#Litinski]_.
208+
Image source: Daniel Litinski [1].
209209
210210
The worst case here is having an even number of :math:`Y` operators in the Pauli word, as it requires two distinct :math:`\frac{\pi}{4}` rotations, each costing 2🕒.
211211
@@ -222,7 +222,7 @@
222222
Step 3 performs the additional :math:`X` measurement on the resource qubit at 0🕒.
223223
Same for steps 4 and 5 for performing :math:`e^{i \frac{\pi}{4} Z_3 Z_5 Z_6}` at 1🕒 overall.
224224
Steps 6 and 7 perform the patch rotations at 3🕒, each. And the final measurement of :math:`X_1 X_3 Z_4 X_5 X_6 Z_m` at another 1🕒 in step 8 completes the computation.
225-
Image source: [#Litinski]_.
225+
Image source: Daniel Litinski [1].
226226
227227
228228
Intermediate data blocks
@@ -237,7 +237,7 @@
237237
:target: javascript:void(0)
238238
239239
Intermediate data block design.
240-
Image source: [#Litinski]_.
240+
Image source: Daniel Litinski [1].
241241
242242
As such, this architecture occupies :math:`2n + 4` tiles. One can get additional savings by having the auxiliary qubit region be flexibly the lower or upper row.
243243
This way, one can save on the extra cost of rotating patches back to their original position.
@@ -248,7 +248,7 @@
248248
:target: javascript:void(0)
249249
250250
Performing a :math:`ZXZZX` measurement by performing patch rotations for the appropriate :math:`X` measurements and moving all qubits down into the auxiliary region to save time.
251-
Image source: [#Litinski]_.
251+
Image source: Daniel Litinski [1].
252252
253253
Overall we get a maximum of 2🕒 for the rotations. Adding the base cost of 1🕒 for the measurement
254254
and the maximum 2🕒 for the additional Clifford :math:`\pi/4` Z rotations as in the compact block design,
@@ -267,7 +267,7 @@
267267
:target: javascript:void(0)
268268
269269
Two qubits can be realized by a patch on two tiles. The patch now has 6 distinct edges, corresponding to the operators as indicated in the figure.
270-
Image source: [#Litinski]_.
270+
Image source: Daniel Litinski [1].
271271
272272
With this extra trick up our sleeve, we can construct the fast data block consisting of two-qubit patches with an all-encompassing auxiliary qubit region.
273273
@@ -277,7 +277,7 @@
277277
:target: javascript:void(0)
278278
279279
Fast data block design.
280-
Image source: [#Litinski]_.
280+
Image source: Daniel Litinski [1].
281281
282282
Here, all 15 distinct Pauli operators are readily available. This is because we have
283283
:math:`X_1`, :math:`X_1 \otimes X_2`, :math:`Z_2`, :math:`Z_1 \otimes Z_2` and all products thereof available.
@@ -304,7 +304,7 @@
304304
^^^^^^^^^^^^^^^^^^^^
305305
306306
This protocol uses 15 imperfect magic states with infidelity :math:`p` and outputs a single magic state with infidelity of :math:`35p^3`.
307-
The distillation circuit is shown below, with the details described in section 3.1 in [#Litinski]_:
307+
The distillation circuit is shown below, with the details described in section 3.1 of the paper:
308308
309309
.. figure:: ../_static/demonstration_assets/game_of_surface_codes/15-to-1.png
310310
:align: center
@@ -314,7 +314,7 @@
314314
15-to-1 distillation protocol. Each :math:`\frac{\pi}{8}` rotation involves a magic state injection with an error-prone magic state.
315315
In total, we have :math:`4+11` magic states, each with infidelity :math:`p` and output a magic state :math:`|m\rangle` on the
316316
fifth qubit with infidelity :math:`35p^3`.
317-
Image source: [#Litinski]_.
317+
Image source: Daniel Litinski [1].
318318
319319
Because all operations in the protocol are Z measurements, we can use the compact data block design to perform the distillation.
320320
Another trick the author of [#Litinski]_ proposes is to use the auto-corrected magic state injection protocol below that avoids the additional Clifford :math:`\frac{\pi}{4}` Pauli rotation (and to note that the :math:`\frac{\pi}{2}` Pauli rotation is just a sign flip that can be tracked classically).
@@ -326,7 +326,7 @@
326326
327327
The auto-corrected magic state injection protocol avoids the additional Clifford :math:`\frac{\pi}{4}` Pauli rotation from above at the cost of having an additional qubit that is measured.
328328
However, note that the first two measurements commute and can be performed simultaneously.
329-
Image source: [#Litinski]_.
329+
Image source: Daniel Litinski [1].
330330
331331
Using this injection protocol to perform the non-Clifford :math:`\frac{\pi}{8}` rotations using the error prone magic states, the 15-to-1 protocol on a compact data block is performed in the following way:
332332
@@ -338,7 +338,7 @@
338338
The 15-to-1 protocol executed on a compact data block using the auto-corrected magic state injection subroutine in each of the repeating steps.
339339
Note that both :math:`P \otimes Z_m` and :math:`Z_m \otimes Y_{|0\rangle}` measurements are performed simultaneously.
340340
If all :math:`X` measurements on qubits 1-4 in step 23 yield a :math:`+1` result, a magic state is successfully prepared on qubit 5. The probability for failure is roughly :math:`(1-p)^n`.
341-
Image source: [#Litinski]_.
341+
Image source: Daniel Litinski [1].
342342
343343
The 15-to-1 distillation protocol produces a magic state in 11🕒 on 11 tiles.
344344
@@ -362,7 +362,7 @@
362362
:target: javascript:void(0)
363363
364364
Minimal setup with 100 logical qubits on 153 tiles and 11 extra tiles for a compact distillation block.
365-
Image source: [#Litinski]_.
365+
Image source: Daniel Litinski [1].
366366
367367
For a code distance of :math:`d=13` we would require :math:`164 \cdot 2 \cdot d^2 \approx 55k` physical qubits.
368368
An example computation with :math:`10^8` T gates at a code cycle of :math:`1\mu s` would finish in :math:`d \cdot 11🕒 \cdot 10^8 \approx 4h`.
@@ -378,7 +378,7 @@
378378
:target: javascript:void(0)
379379
380380
Intermediate setup consisting of the intermediate data block and two 15-to-1 distillation blocks on each end.
381-
Image source: [#Litinski]_.
381+
Image source: Daniel Litinski [1].
382382
383383
In this case we require 222 tiles, so :math:`222 \cdot 2 \cdot d^2 \approx 75k` physical qubits, and the same computation mentioned before would finish in half the time after about :math:`2h`.
384384
@@ -388,7 +388,7 @@
388388
389389
We've been introduced to a high-level description of quantum computing that allows us to reason about space-time trade-offs in FTQC architecture designs.
390390
We have seen some basic prototypes that allow computations involving :math:`10^8` T gates in orders of hours using :math:`55k` or :math:`75k` physical qubits.
391-
With this knowledge, we should be able to follow the more involved tricks discussed in sections 4 and 5 in [#Litinski]_, that we have not covered in this demo yet.
391+
With this knowledge, we should be able to follow the more involved tricks discussed in sections 4 and 5 of the Game of Surface Codes paper, that we have not covered in this demo yet.
392392
393393
"""
394394

demonstrations_v2/tutorial_game_of_surface_codes/metadata.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"executable_stable": true,
99
"executable_latest": true,
1010
"dateOfPublication": "2025-06-02T00:00:00+00:00",
11-
"dateOfLastModification": "2025-09-22T15:48:14+00:00",
11+
"dateOfLastModification": "2025-11-24T15:48:14+00:00",
1212
"categories": [
1313
"Quantum Computing",
1414
"Algorithms"
@@ -55,4 +55,4 @@
5555
"weight": 1.0
5656
}
5757
]
58-
}
58+
}

0 commit comments

Comments
 (0)