Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
2ad0f7c
Measure the surface-code threshold with a matched prior and a dense grid
meandmytram Sep 10, 2026
402960c
Update the notebook run-time estimates
meandmytram Sep 10, 2026
67a97e6
Regenerate the matched-prior threshold sweep at full scale
meandmytram Sep 11, 2026
aa0096c
Estimate the threshold crossing by a weighted fit and report every si…
meandmytram Sep 12, 2026
6e7c45f
Make the surface-code prose match the plots and the printed numbers
meandmytram Sep 12, 2026
400b56b
Take the gap's standard error from the paired per-shot differences
meandmytram Sep 12, 2026
781bbb2
Describe the reversed ordering as noisy and drop the unsupported trun…
meandmytram Sep 13, 2026
4f09de6
Run the crossing fit in fast mode, guard it against zero errors, and …
meandmytram Sep 13, 2026
2242207
Count only strict sign changes of the gap, and list exact ties separa…
meandmytram Sep 14, 2026
e29a916
Merge remote-tracking branch 'origin/main' into notebooks-threshold-fix
meandmytram Sep 14, 2026
cb7015e
Regenerate the example notebooks on the optimised decoder
meandmytram Sep 15, 2026
9e89443
Match the notebook text and runtimes to the regenerated outputs
meandmytram Sep 15, 2026
27b77de
Document the per-cell timeout a full notebook regeneration needs
meandmytram Sep 15, 2026
067b1c5
Merge main (the uv migration, #583) into notebooks-threshold-fix
meandmytram Sep 15, 2026
b8efb01
Rerun the surface-code threshold sweep at chi_max = 128
meandmytram Sep 16, 2026
91b88ee
Match the surface-code narrative to the chi_max = 128 sweep
meandmytram Sep 16, 2026
836b926
Raise the documented per-cell timeout above the measured sweep
meandmytram Sep 16, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 6 additions & 7 deletions .github/workflows/notebooks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,12 @@ name: notebooks
# nothing ran these.
#
# MDOPT_NB_FAST=1 shrinks the workloads: at the committed full-scale settings
# the suite totals roughly 10 hours (quantum_surface ~4.9h, classical_ldpc
# ~2.5h, quantum_three_qubit ~1.6h, maxbonddim ~1.2h -- see
# docs/source/notebook_pipeline.rst), past the 6h GitHub caps a job at and far
# too dear to spend per pull request. The notebooks read that variable
# themselves. What is being tested is that they execute, not the numbers they
# produce -- the outputs are discarded, and the ones the documentation shows
# come from a full-scale run committed by hand.
# the suite totals roughly 34 hours (quantum_surface ~27h, maxbonddim ~3.2h,
# classical_ldpc ~2.8h -- see docs/source/notebook_pipeline.rst), past the 6h
# GitHub caps a job at and far too dear to spend per pull request. The
# notebooks read that variable themselves. What is being tested is that they
# execute, not the numbers they produce -- the outputs are discarded, and the
# ones the documentation shows come from a full-scale run committed by hand.

on:
push:
Expand Down
54 changes: 33 additions & 21 deletions docs/source/notebook_pipeline.rst
Original file line number Diff line number Diff line change
Expand Up @@ -39,36 +39,48 @@ Regenerating the results

.. code-block:: bash

python scripts/run_notebooks.py --inplace # all of them
python scripts/run_notebooks.py --inplace --timeout 172800 # all of them
python scripts/run_notebooks.py --inplace examples/decoding/shor.ipynb

``--inplace`` writes the executed outputs back into the notebook. Commit the
notebook afterwards; the next push to ``main`` opens the sync PR, and the docs
follow once it is merged.

Expect this to take hours. Measured on an M-series laptop, one notebook at a
time (``classical_ldpc`` is the one estimate here -- it has not yet completed
a full run):
``--timeout`` is the limit per cell, in seconds. Its default of 1800 (or
``MDOPT_NB_TIMEOUT``, if set) suits the fast CI workloads, but at full scale
the longest cells below run for hours -- the surface-code threshold sweep
alone took 26.6 h -- so a full regeneration needs a limit well above that;
the last one allowed two days.

=========================== =================
Expect this to take hours: the last full run took about 34 hours. Measured on
an M-series laptop (10 cores: 4 performance, 6 efficiency), one notebook at a
time, with one BLAS thread per process:

=========================== ==============================================================
notebook full run
=========================== =================
=========================== ==============================================================
``main_component`` 4 s
``ground_state`` 11 s
``mps-rand-circ`` 26 s
``dephasing_dmrg_debug_bb`` 39 s
``shor`` 39 s
``quantum_five_qubit`` 43 s
``maxbonddim`` 1.2 h
``quantum_three_qubit`` 1.6 h
``quantum_surface`` 4.9 h
``classical_ldpc`` ~2.5 h (estimate)
=========================== =================

The shot counts in the four expensive notebooks were chosen to land in that
range. They were once far larger -- ``quantum_surface`` alone needed 33 hours,
which nobody was going to run -- so the results here are deliberately noisier
than a cluster campaign would give. The thesis figures come from the scripts in
``quantum_five_qubit`` 7 s
``ground_state`` 9 s
``shor`` 10 s
``mps-rand-circ`` 14 s
``dephasing_dmrg_debug_bb`` 1.5 min
``quantum_three_qubit`` 4.6 min
``classical_ldpc`` 2.8 h (the truncation sweep 2.2 h, the BP comparison 36 min)
``maxbonddim`` 3.2 h
``quantum_surface`` 27.4 h (the threshold sweep alone 26.6 h, at chi_max = 128)
=========================== ==============================================================

``classical_ldpc`` and ``quantum_surface`` end with a cell that regenerates
its data through a pool of worker processes (all but two cores by default;
``MDOPT_NB_PROCESSES`` overrides it). Their times above are with eight
workers; note that concurrent workers on this laptop run about three times
slower per shot than a single process, because they share the efficiency
cores, so a lone-process estimate understates them badly. The shot counts in
the expensive notebooks were chosen to keep them at this scale -- the surface
threshold sweep once needed 33 hours in the natural qubit order, which nobody
was going to run -- so the results here are deliberately noisier than a
cluster campaign would give. The thesis figures come from the scripts in
``mdopt/examples/decoding/plotting/`` and their cluster datasets, not from these
notebooks.

Expand Down
Loading