Skip to content

Commit f426a77

Browse files
authored
Fixes issue #137 updating the .github/workflows/docs.yml (#261)
1 parent ead6b7f commit f426a77

11 files changed

Lines changed: 48 additions & 29 deletions

File tree

.github/workflows/docs.yml

Lines changed: 24 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,19 +14,35 @@ jobs:
1414
outputs:
1515
exists: ${{ steps.deltakit-token.outputs.exists }}
1616
steps:
17-
- id: deltakit-token
18-
env:
19-
DELTAKIT_TOKEN: ${{ secrets.DELTAKIT_TOKEN }}
20-
if: ${{ env.DELTAKIT_TOKEN != '' }}
21-
run: echo "exists=true" >> $GITHUB_OUTPUT
17+
- id: deltakit-token
18+
env:
19+
DELTAKIT_TOKEN: ${{ secrets.DELTAKIT_TOKEN }}
20+
if: ${{ env.DELTAKIT_TOKEN != '' }}
21+
run: echo "exists=true" >> $GITHUB_OUTPUT
22+
23+
check-documentation-links:
24+
runs-on: ubuntu-latest
25+
steps:
26+
- name: Checkout repo
27+
uses: actions/checkout@v6
28+
29+
- name: Install uv
30+
uses: astral-sh/setup-uv@v7
31+
32+
- name: Package synchronisation
33+
run: uv sync --python 3.13 --resolution highest --group docs
34+
35+
- name: Check documentation links
36+
run: uv run --no-sync sphinx-build -W -D nb_execution_mode=off -b linkcheck docs docs/_build/linkcheck
2237

2338
build-docs:
2439
needs: [check-deltakit-token]
25-
if: needs.check-deltakit-token.outputs.exists == 'true'
2640
runs-on: ubuntu-latest
41+
env:
42+
NB_EXECUTION_MODE: ${{ needs.check-deltakit-token.outputs.exists == 'true' && 'force' || 'off' }}
2743
steps:
2844
- name: Checkout repo
29-
uses: actions/checkout@v4
45+
uses: actions/checkout@v6
3046

3147
- name: Install uv
3248
uses: astral-sh/setup-uv@v7
@@ -35,6 +51,6 @@ jobs:
3551
run: uv sync --python 3.13 --resolution highest --group docs
3652

3753
- name: Build documentation
38-
run: uv run --no-sync sphinx-build -W -b html docs docs/_build/html
54+
run: uv run --no-sync sphinx-build -W -D nb_execution_mode=${NB_EXECUTION_MODE} -b html docs docs/_build/html
3955
env:
4056
DELTAKIT_TOKEN: ${{ secrets.DELTAKIT_TOKEN }}

deltakit-core/src/deltakit_core/data_formats/_b801_parsers.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ def b8_to_syndromes(
2626
and the number of detectors that should be in each syndrome, return a
2727
generator of syndromes.
2828
29-
Informed by https://github.com/quantumlib/Stim/blob/main/doc/result_formats.md#b8
29+
Informed by the b8 format section of https://github.com/quantumlib/Stim/blob/main/doc/result_formats.md
3030
"""
3131
bytes_per_shot = (detector_num + 7) // 8
3232
b8_byte_arr: bytearray = to_bytearray(b8_input)
@@ -46,7 +46,7 @@ def b8_to_measurements(b8_input: Path, measurement_num: int) -> Iterator[Bitstri
4646
and the number of measurements in each shot,
4747
return a generator of measurement bitstrings.
4848
49-
Informed by https://github.com/quantumlib/Stim/blob/main/doc/result_formats.md#b8
49+
Informed by the b8 format section of https://github.com/quantumlib/Stim/blob/main/doc/result_formats.md
5050
"""
5151
bytes_per_shot = (measurement_num + 7) // 8
5252
b8_byte_arr: bytearray = to_bytearray(b8_input)
@@ -68,7 +68,7 @@ def b8_to_logical_flip(
6868
and the number of detectors that should be in each syndrome, return a
6969
generator of logical flips.
7070
71-
Informed by https://github.com/quantumlib/Stim/blob/main/doc/result_formats.md#b8
71+
Informed by the b8 format section of https://github.com/quantumlib/Stim/blob/main/doc/result_formats.md
7272
"""
7373
bytes_per_shot = (num_logicals + 7) // 8
7474
b8_byte_arr: bytearray = to_bytearray(b8_input)
@@ -87,7 +87,7 @@ def syndromes_to_b8_file(
8787
syndrome_b8_out: Path, detector_num: int, syndromes: Iterator[OrderedSyndrome]
8888
):
8989
"""Given a syndrome generator, this will output them to file in the b8 format.
90-
Informed by https://github.com/quantumlib/Stim/blob/main/doc/result_formats.md#b8
90+
Informed by the b8 format section of https://github.com/quantumlib/Stim/blob/main/doc/result_formats.md
9191
"""
9292
with syndrome_b8_out.open("wb") as b8_out_handle:
9393
b8_out_handle.writelines(
@@ -102,7 +102,7 @@ def logical_flips_to_b8_file(
102102
"""Given a logical flip generator, this will output them to file in the b8 format.
103103
b8 is a byte-padded bitstring representation for logical flips. This is more
104104
efficient than the string-based 01 representation.
105-
Informed by https://github.com/quantumlib/Stim/blob/main/doc/result_formats.md#b8
105+
Informed by the b8 format section of https://github.com/quantumlib/Stim/blob/main/doc/result_formats.md
106106
"""
107107
with logical_flips_b8_out.open("wb") as data_b8:
108108
data_b8.writelines(

deltakit-decode/src/deltakit_decode/analysis/_matching_decoder_managers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ class B8DecoderManager(DecoderManager):
166166
and target logical flips.
167167
168168
The b8 data formats were proposed by Google Quantum AI and can be read
169-
about here: https://github.com/quantumlib/Stim/blob/main/doc/result_formats.md#b8
169+
about in the b8 format section of https://github.com/quantumlib/Stim/blob/main/doc/result_formats.md
170170
171171
Parameters
172172
----------

deltakit-explorer/src/deltakit_explorer/_api/_client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ def decode(
180180
- `BELIEF_MATCHING` for Belief Matching
181181
(https://arxiv.org/abs/2203.04948).
182182
- `BP_OSD` for Belief Propagation - Ordered Statistics Decoding
183-
(BP-OSD) (https://quantum-journal.org/papers/q-2021-11-22-585/),
183+
(BP-OSD) (https://arxiv.org/abs/1904.02703),
184184
- `AC` for Ambiguity Clustering (https://arxiv.org/abs/2406.14527).
185185
- `LCD` for Local Clustering Decoder (https://arxiv.org/abs/2411.10343).
186186
@@ -252,7 +252,7 @@ def decode_measurements(
252252
- `BELIEF_MATCHING` for Belief Matching
253253
(https://arxiv.org/abs/2203.04948).
254254
- `BP_OSD` for Belief Propagation - Ordered Statistics Decoding
255-
(BP-OSD) (https://quantum-journal.org/papers/q-2021-11-22-585/),
255+
(BP-OSD) (https://arxiv.org/abs/1904.02703),
256256
- `AC` for Ambiguity Clustering (https://arxiv.org/abs/2406.14527).
257257
- `LCD` for Local Clustering Decoder (https://arxiv.org/abs/2411.10343).
258258

deltakit-explorer/src/deltakit_explorer/_cloud_decoders.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ class BeliefMatchingDecoder(_CloudDecoder):
222222
decoder workflows.
223223
224224
This cloud-based decoder implements Belief Matching
225-
(https://journals.aps.org/prx/abstract/10.1103/PhysRevX.13.031007).
225+
(https://arxiv.org/abs/2203.04948).
226226
"""
227227

228228
_decoder_type = enums.DecoderType.BELIEF_MATCHING
@@ -260,7 +260,7 @@ class BPOSDecoder(_CloudDecoder):
260260
decoder workflows.
261261
262262
This cloud-based decoder implements Belief Propagation - Ordered Statistics Decoding
263-
(https://quantum-journal.org/papers/q-2021-11-22-585/).
263+
(https://arxiv.org/abs/1904.02703).
264264
"""
265265

266266
_decoder_type = enums.DecoderType.BP_OSD

deltakit-explorer/src/deltakit_explorer/enums/_api_enums.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ class DecoderType(Enum):
4646
----------
4747
.. [1] https://arxiv.org/abs/2303.15933
4848
.. [2] https://arxiv.org/abs/2309.05558
49-
.. [3] https://journals.aps.org/prx/abstract/10.1103/PhysRevX.13.031007
50-
.. [4] https://quantum-journal.org/papers/q-2021-11-22-585/
49+
.. [3] https://arxiv.org/abs/2203.04948
50+
.. [4] https://arxiv.org/abs/1904.02703
5151
.. [5] https://arxiv.org/abs/2406.14527
5252
.. [6] https://arxiv.org/abs/2411.10343
5353

docs/conf.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,3 +109,6 @@
109109
suppress_warnings = [
110110
"autosummary.import_cycle",
111111
]
112+
113+
linkcheck_timeout = 60
114+
linkcheck_retries = 2

docs/examples/notebooks/simulation/leakage-aware_decoding.ipynb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
"## Introduction\n",
3737
"The [Local Clustering Decoder](https://arxiv.org/pdf/2411.10343) is the first surface code decoder that retains the performance advantage offered by hardware decoders, while obtaining levels of accuracy and flexibility competitive with software counterparts. LCD is an adaptive and distributed version of an error-clustering algorithm based on Union-Find. Adaptivity refers to updating LCD's error prior based on runtime events, such as heralded leaked qubit measurements. In this notebook, we demonstrate the benefits of LCD by decoding a surface code patch under a circuit-level noise model with leakage — a damaging correlated noise channel affecting most qubit types. We observe a significant improvement in the error-correction performance when leakage adaptivity is included, effectively halving the code distance d required for computation.\n",
3838
"\n",
39-
"Leakage is a problematic source of noise in quantum circuits. It refers to the tendency for qubits to drift out of the computational states ($|0\\rangle$ and $|1\\rangle$) to higher energy leaked states ($|2\\rangle$, $|3\\rangle$, etc). Unlike erasure, leakage is silent until measurement. Leakage also differs from conventional Pauli noise — it is long-lived and may spread subsequent noise to other qubits through multi-qubit interactions. This leads to correlated errors in spacetime, which can severely degrade the exponential suppression of logical error that comes with increasing numbers of data qubits in quantum error correction (QEC). Therefore, it is imperative to mitigate the damage of leakage noise both through circuit design with leakage-reduction units and designing decoders that consider its effects. See for example [Coping with qubit leakage in topological codes](https://journals.aps.org/pra/abstract/10.1103/PhysRevA.88.042308)."
39+
"Leakage is a problematic source of noise in quantum circuits. It refers to the tendency for qubits to drift out of the computational states ($|0\\rangle$ and $|1\\rangle$) to higher energy leaked states ($|2\\rangle$, $|3\\rangle$, etc). Unlike erasure, leakage is silent until measurement. Leakage also differs from conventional Pauli noise — it is long-lived and may spread subsequent noise to other qubits through multi-qubit interactions. This leads to correlated errors in spacetime, which can severely degrade the exponential suppression of logical error that comes with increasing numbers of data qubits in quantum error correction (QEC). Therefore, it is imperative to mitigate the damage of leakage noise both through circuit design with leakage-reduction units and designing decoders that consider its effects. See for example [Coping with qubit leakage in topological codes](https://arxiv.org/abs/1308.6642)."
4040
]
4141
},
4242
{
@@ -67,7 +67,7 @@
6767
"## Read-in circuits\n",
6868
"We read in circuits for quantum memory experiments in a $d \\times d \\times d$ surface code, where $d \\in \\{5, 7, 9, 11, 13\\}$. These circuits are subject to a noise model with leakage. Our noise model is an extension of the SI1000 noise model, as described in [Local Clustering Decoder: a fast and adaptive hardware decoder for the surface code](https://arxiv.org/abs/2411.10343). SI1000 is a one-parameter model describing noise in superconducting systems. This parameter $p$ can be taken to be the noise of 2-qubit gates. Our noise model supplements SI1000 with a second parameter, $p_l$, representing the probability that a 2-qubit gate causes a qubit to leak. Leakage may also occur upon reset. A leaked qubit fully depolarises other qubits via 2-qubit gates. Once a qubit is leaked, it can relax back to the computational subspace through relaxation processes, which have their own probability. Eg, qubit resets relax leaked qubits with 100% probability, while 2-qubit gates relax with the same probability they leak: $p_l$.\n",
6969
"\n",
70-
"Our circuits contain a leakage reduction unit (LRU) known as patch wiggling, introduced in [Relaxing Hardware Requirements for Surface Code Circuits using Time-dynamics](https://quantum-journal.org/papers/q-2023-11-07-1172/#). This LRU is a small modification in the standard syndrome-extraction (SE) circuits that achieves a role-exchange between data and auxiliary qubits at every round SE. This ensures that every physical qubit is reset every two rounds of SE, flushing regularly leakage from all qubits, and limiting the longevity of leakage to two rounds of SE.\n",
70+
"Our circuits contain a leakage reduction unit (LRU) known as patch wiggling, introduced in [Relaxing Hardware Requirements for Surface Code Circuits using Time-dynamics](https://arxiv.org/abs/2302.02192). This LRU is a small modification in the standard syndrome-extraction (SE) circuits that achieves a role-exchange between data and auxiliary qubits at every round SE. This ensures that every physical qubit is reset every two rounds of SE, flushing regularly leakage from all qubits, and limiting the longevity of leakage to two rounds of SE.\n",
7171
"\n",
7272
"We explore two different parametrisations of our SI1000+leakage noise model, where leakage is both a dominant and subdominant error mechanism by setting $p$ and $p_l$ as follows:\n",
7373
"1. **Low leakage (LL)**: $p$ = 10<sup>-3</sup> and $p_l$ = 10<sup>-4</sup>.\n",
@@ -78,7 +78,7 @@
7878
"cell_type": "markdown",
7979
"metadata": {},
8080
"source": [
81-
"In our circuits, leakage and relaxation processes are represented as noise channels, that our leakage simulator can interpret. Our simulator is an extension of [Stim: a fast stabilizer circuit simulator](https://quantum-journal.org/papers/q-2021-07-06-497/#). The figure below is an example circuit diagram for a 3x3 surface code with wiggling; run for 2 rounds. In the diagram, the\n",
81+
"In our circuits, leakage and relaxation processes are represented as noise channels, that our leakage simulator can interpret. Our simulator is an extension of [Stim: a fast stabilizer circuit simulator](https://arxiv.org/abs/2103.02202). The figure below is an example circuit diagram for a 3x3 surface code with wiggling; run for 2 rounds. In the diagram, the\n",
8282
"\n",
8383
"- Orange boxes are Leakage channels;\n",
8484
"- Blue boxes are Relaxation channels;\n",

docs/guide/adding_noise.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ and a reasonably rich palette of error mechanisms,
5252
which may be used to approximate different types of noise.
5353
Deltakit benefits from both Stim's simulation and error implementation approaches.
5454
You may read about these building blocks in detail in the
55-
[Noise Channels section](https://github.com/quantumlib/Stim/blob/main/doc/gates.md#noise-channels)
55+
[Noise Channels section](https://github.com/quantumlib/Stim/blob/main/doc/gates.md)
5656
of the Stim documentation.
5757

5858
With these tools in your hands, you may implement different **noise models**.

docs/guide/authentication.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,10 +93,10 @@ jobs:
9393
If the token is not set, or not provided as an environment variable, usage of the cloud API will raise an exception:
9494
9595
```text
96-
RuntimeError: Token could not be found neither in ([...]/deltakit-explorer/.env) nor environment variable (DELTAKIT_TOKEN). Please obtain your token at https://deltakit.rivelane.com/dashboard/token and use `Client.set_token` function to register it.
96+
RuntimeError: Token could not be found neither in ([...]/deltakit-explorer/.env) nor environment variable (DELTAKIT_TOKEN). Please obtain your token at https://deltakit.riverlane.com/dashboard/token and use `Client.set_token` function to register it.
9797
```
9898
99-
If you see this message, please visit the [Deltakit token generation page](https://deltakit.rivelane.com/dashboard/token), generate a token, and set it with `Client.set_token(...)`.
99+
If you see this message, please visit the [Deltakit token generation page](https://deltakit.riverlane.com/dashboard/token), generate a token, and set it with `Client.set_token(...)`.
100100

101101
### Token is wrong
102102

0 commit comments

Comments
 (0)