Skip to content

Commit 2a447e4

Browse files
authored
Update surface code demo (#1834)
### Before submitting Please complete the following checklist when submitting a PR: - [ ] Ensure that your tutorial executes correctly, and conforms to the guidelines specified in the [README](https://github.com/PennyLaneAI/demos/blob/master/README.md). - [ ] Remember to do a grammar check of the content you include. - [ ] All tutorials conform to [PEP8 standards](https://www.python.org/dev/peps/pep-0008/). To auto format files, simply `pip install black`, and then run `black -l 100 path/to/file.py`. When all the above are checked, delete everything above the dashed line and fill in the pull request template. ------------------------------------------------------------------------------------------------------------ **Title:** **Summary:** **Relevant references:** **Possible Drawbacks:** **Related GitHub Issues:** ---- If you are writing a demonstration, please answer these questions to facilitate the marketing process. * GOALS — Why are we working on this now? *Eg. Promote a new PL feature or show a PL implementation of a recent paper.* * AUDIENCE — Who is this for? *Eg. Chemistry researchers, PL educators, beginners in quantum computing.* * KEYWORDS — What words should be included in the marketing post? * Which of the following types of documentation is most similar to your file? (more details [here](https://www.notion.so/xanaduai/Different-kinds-of-documentation-69200645fe59442991c71f9e7d8a77f8)) - [ ] Tutorial - [ ] Demo - [ ] How-to
1 parent 266e075 commit 2a447e4

22 files changed

Lines changed: 26 additions & 24 deletions

File tree

demonstrations_v2/surface_code/demo.py renamed to demonstrations_v2/intro_to_surface_code/demo.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
============================
55
66
The surface code is the gold standard for deploying `quantum error correction (QEC) <https://pennylane.ai/codebook/quantum-error-correction>`__ on hardware today.
7-
Not only does it provide a high circuit-level :doc:`error threshold <demos/tutorial_ft_threshold>` (around 1%), but it only requires local connectivity, making it amenable to hardware with 2D nearest-neighbor connectivity, such as :doc:`superconducting qubits <demos/tutorial_sc_qubits>`.
7+
Not only does it provide a high circuit-level :doc:`error threshold <demos/tutorial_fault_tolerant_threshold>` (around 1%), but it only requires local connectivity, making it amenable to hardware with 2D nearest-neighbor connectivity, such as :doc:`superconducting qubits <demos/tutorial_sc_qubits>`.
88
99
Beyond it being a fully-functioning QEC code, it serves as a great introduction to the world of `fault-tolerant quantum computing (FTQC) <https://pennylane.ai/topics/fault-tolerant-quantum-computing>`__,
1010
because its working principles are ubiquitous in most modern QEC codes such as :doc:`qLDPC codes <demos/tutorial_qldpc_codes>` that break the locality requirement and are more qubit efficient.

demonstrations_v2/surface_code/metadata.json renamed to demonstrations_v2/intro_to_surface_code/metadata.json

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,13 @@
77
],
88
"executable_stable": true,
99
"executable_latest": true,
10-
"dateOfPublication": "2026-07-17T00:00:00+00:00",
11-
"dateOfLastModification": "2026-07-09T00:00:00+00:00",
10+
"dateOfPublication": "2026-07-14T00:00:00+00:00",
11+
"dateOfLastModification": "2026-07-14T00:00:00+00:00",
1212
"categories": [
1313
"Quantum Computing",
14-
"FTQC"
14+
"FTQC",
15+
"Quantum Computing",
16+
"Quantum Hardware"
1517
],
1618
"tags": [],
1719
"previewImages": [

demonstrations_v2/tutorial_active_volume/demo.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
1414
For readers unfamiliar with ZX-diagrams, it will be useful (but not necessary) to take a look at
1515
our :doc:`introduction to ZX-calculus <demos/tutorial_zx_calculus>` first.
16-
Further, it can be instructive to get a primer on :doc:`the surface code <demos/surface_code>`, :doc:`lattice surgery <demos/tutorial_lattice_surgery>`
16+
Further, it can be instructive to get a primer on :doc:`the surface code <demos/intro_to_surface_code>`, :doc:`lattice surgery <demos/tutorial_lattice_surgery>`
1717
and dive into the :doc:`Game of Surface Codes <demos/tutorial_game_of_surface_codes>`, but this
1818
is not a requirement either.
1919

demonstrations_v2/tutorial_active_volume/metadata.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"executable_stable": true,
1212
"executable_latest": true,
1313
"dateOfPublication": "2026-01-21T10:00:00+00:00",
14-
"dateOfLastModification": "2026-06-19T12:00:00+00:00",
14+
"dateOfLastModification": "2026-07-14T12:00:00+00:00",
1515
"categories": [
1616
"Quantum Computing",
1717
"Compilation"

demonstrations_v2/tutorial_bp_catalyst/demo.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ def _decode(syndrome: ArrayLike):
267267

268268
######################################################################
269269
# While this approach is optimal for small codes, it rapidly becomes infeasible for larger examples.
270-
# For instance, the distance-:math:`30` :doc:`rotated surface code <demos/surface_code>`, which encodes only :math:`1` logical qubits, has :math:`450`
270+
# For instance, the distance-:math:`30` :doc:`rotated surface code <demos/intro_to_surface_code>`, which encodes only :math:`1` logical qubits, has :math:`450`
271271
# stabilizers for both :math:`X` and :math:`Z`. A full lookup table decoder for just one check type
272272
# would require approximately :math:`2.9\times 10^{35}` entries.
273273
#

demonstrations_v2/tutorial_bp_catalyst/metadata.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
}
77
],
88
"dateOfPublication": "2025-08-25T14:30:00+00:00",
9-
"dateOfLastModification": "2026-04-17T15:48:14+00:00",
9+
"dateOfLastModification": "2026-07-14T15:48:14+00:00",
1010
"categories": [
1111
"Quantum Computing"
1212
],

demonstrations_v2/tutorial_fault_tolerant_threshold/demo.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
2424
In this demo, we will learn the theoretical framework of the fault-tolerant threshold
2525
theorem and observe this phenomenon in action. We will construct a QEC scheme called the
26-
:doc:`rotated surface code <demos/surface_code>`, and subject it to simulated quantum noise across a range of physical
26+
:doc:`rotated surface code <demos/intro_to_surface_code>`, and subject it to simulated quantum noise across a range of physical
2727
error rates, computing two key metrics: (i) the pseudo-threshold (:math:`p_{pseudo}`), which
2828
is the break-even point where a specific error-correcting code becomes better than doing
2929
nothing at all, and (ii) the fault-tolerant threshold (:math:`p_{th}`), the fundamental

demonstrations_v2/tutorial_fault_tolerant_threshold/metadata.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"executable_stable": true,
77
"executable_latest": true,
88
"dateOfPublication": "2026-04-24T15:00:00+00:00",
9-
"dateOfLastModification": "2026-04-29T15:00:00+00:00",
9+
"dateOfLastModification": "2026-07-14T15:00:00+00:00",
1010
"categories": [
1111
"Quantum Computing",
1212
"FTQC",

demonstrations_v2/tutorial_game_of_surface_codes/demo.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
Introduction
1717
------------
1818
19-
The game of surface codes is a high-level framework for designing :doc:` surface code <demos/surface_code>` quantum computing architectures.
19+
The game of surface codes is a high-level framework for designing :doc:` surface code <demos/intro_to_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,

demonstrations_v2/tutorial_game_of_surface_codes/metadata.json

Lines changed: 1 addition & 1 deletion
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": "2026-06-16T00:00:00+00:00",
11+
"dateOfLastModification": "2026-07-14T00:00:00+00:00",
1212
"categories": [
1313
"Quantum Computing",
1414
"Compilation",

0 commit comments

Comments
 (0)