Skip to content

Review fixes for driven solver documentation#762

Merged
hughcars merged 3 commits into
phdum/driven_solver_docsfrom
hughcars/driven_solver_docs_review_fixes
Jun 16, 2026
Merged

Review fixes for driven solver documentation#762
hughcars merged 3 commits into
phdum/driven_solver_docsfrom
hughcars/driven_solver_docs_review_fixes

Conversation

@hughcars

Copy link
Copy Markdown
Collaborator

Builds on #702 and addresses the review feedback there without changing the original PR branch directly.

Summary:

  • Split the large driven-solver tutorial into a feature guide plus reference material.
  • Move the practical user-facing material to docs/src/features/adaptive_driven_solver.md.
  • Move PROM/MRI algorithm details to docs/src/reference.md.
  • Port plotting scripts from Python to Julia/CairoMakie and update stale script references.
  • Add actionable guidance to the minimal-rational-interpolation rank-deficiency warning.

Validation:

  • julia --project=docs docs/make.jl

If this looks good, I plan to merge this into phdum/driven_solver_docs, then continue with the original PR #702.

hughcars added 2 commits June 11, 2026 12:17
* docs/src/examples/tutorial_driven_uniform_v_adaptive.md
  - Quick-start: rephrase the adaptive-solver introduction to flag it as
    a source of approximation error rather than just a setup cost.
  - Quick-start: switch the tolerance bullet to the standard
    `["Solver"]["Linear"]["Tol"]` nested-config notation, both in the
    bullet list and again in the 'Numerical problems' challenge.
  - Quick-start: re-target the broken
    `cpw_lumped_uniform_convergence.json` link to the file that is
    actually used by the tutorial, `cpw_tutorial_lumped_uniform.json`.
  - Quick-start: 'examples (CPWs and the single transmon)' for clarity.
  - Uniform solver: drop the redundant 'very' before 'poorly conditioned',
    and link to the `Samples` anchor with the right pluralisation.
  - Adaptive solver: change "internal" frequency grid to *internal* so
    it reads as emphasis (consistent with the rest of the page).
  - Projective construction: render `Re(x*)`, `Im(x*)` with explicit
    parentheses, and italicise *internal* in the same paragraph.
  - Choosing internal samples: 'does not explain how' (was 'tell us'),
    and soften 'is familiar' to 'may be familiar'.
  - Adaptive solver problems: re-flow 'Early termination' and
    'Numerical problems' as a numbered list so the bold labels render and
    the structure is obvious. (Previously the bolds collapsed into prose
    on the rendered preview, see PR704 preview build.)
  - User guidance: 'efficiently choose samples based on the observed
    approximation error', drop the now-unused 'computer' before 'memory',
    and call out 'linear solver tolerance' alongside adaptive tolerance
    in the validation paragraph.
  - Transmon set-up: switch all `\\textrm` units to `\\mathrm` for
    consistency with the rest of the docs (`nH`, `fF`, two `GHz`).
  - Transmon set-up: typo `\\Ohm` -> `\\Omega`.
  - Transmon Part II: 'behavior' (was 'behaviour'), to keep with US
    spelling already used elsewhere.
  - References: hyperlink the four DOIs.
  - Add a maintainer note (HTML comment, invisible to readers) at the top
    of the file documenting that the SVGs are committed snapshots, not
    auto-generated, and giving the regeneration recipe. Auto-generation is
    not feasible: each Palace run takes hours, so neither CI long-tests
    nor docs build-time hooks can absorb the cost. We accept that the
    plots may drift relative to the current solver; refresh by hand if a
    change meaningfully alters the qualitative shape of these curves.

* examples/cpw/cpw_tutorial_lumped_driven.jl
  - Replace the commented-out uniform-sweep block with a kwarg-style
    extension: `adaptive_tols` now starts with `0.0`, which Palace
    treats as the uniform driven solver, and is written to
    `postpro/tutorial_driven_rom/driven_uniform_reference`. This is
    the directory the plotting scripts already expect, so the script
    now generates the full set of tutorial data in a single invocation.

* CHANGELOG.md
  - Add an 'In progress' entry under 'New Features' announcing the new
    'Driven Solver: Uniform vs Adaptive' tutorial.

The Python plot scripts are not touched in this commit; they will be
replaced by the Julia/Makie ports in a follow-up PR.

Signed-off-by: Hugh Carson <hughcars@amazon.com>
Replaces the two Python plotting scripts with Julia/CairoMakie ports so
the data generation (`*_tutorial_driven.jl`) and the result plots are
both in the same language, dropping the language split flagged in the
PR review.

* examples/cpw/cpw_tutorial_lumped_driven_plots.jl (new)
* examples/transmon/transmon_tutorial_driven_plots.jl (new)
  - Reproduce the matplotlib plots: matplotlib `plasma` palette sampled
    over [0.1, 0.9], serif (Times) typography, two-line titles, dashed
    tolerance bands, dotted 1e-12 reference floor, diamond markers for
    the adaptive sample frequencies, and the gray-star initialization
    points on the convergence curve.
  - Use CairoMakie + ColorSchemes + CSV + DataFrames; no native deps
    beyond what `Plots` already pulled in.
  - Equation labels in titles and the per-axis `S_{ij}` annotations are
    rendered as `LaTeXString`s via MathTeXEngine. The descriptive
    line of two-line titles uses a plain string in a separate Label
    (LaTeX line breaks `\\\\` are not supported by MathTeXEngine).
  - Both scripts accept `--out <dir>` to override the default
    `docs/src/assets/examples` output, useful for previewing.

* examples/cpw/cpw_tutorial_lumped_driven_plots.py (deleted)
* examples/transmon/transmon_tutorial_driven_plots.py (deleted)

* examples/Project.toml
  - Add ColorSchemes (used directly by the new plotting scripts; was
    already an indirect dependency through CairoMakie).

* docs/src/assets/examples/driven_ua_*.svg
  - Regenerate all 11 SVGs from the same simulation outputs using the
    new Julia plotters. The files in this commit are visually equivalent
    to the matplotlib originals (same data, same palette, same axis
    limits and tick spacings).

* docs/src/examples/tutorial_driven_uniform_v_adaptive.md
  - Update the maintainer note and the in-page `!!! note` block to
    reference the `.jl` plot scripts instead of the now-deleted
    `.py` scripts.

Signed-off-by: Hugh Carson <hughcars@amazon.com>
@hughcars hughcars requested a review from Sbozzolo June 11, 2026 17:26
@hughcars hughcars force-pushed the phdum/driven_solver_docs branch from 15a6d45 to 236fe0a Compare June 11, 2026 17:39
@hughcars hughcars force-pushed the hughcars/driven_solver_docs_review_fixes branch from b1419bf to 8ee73df Compare June 11, 2026 17:39
@hughcars hughcars force-pushed the hughcars/driven_solver_docs_review_fixes branch from 8ee73df to 85bc89f Compare June 11, 2026 18:00
@hughcars hughcars added the no-long-tests This PR does not require the long tests to be merged label Jun 11, 2026
@hughcars hughcars merged commit 9d43666 into phdum/driven_solver_docs Jun 16, 2026
72 checks passed
@hughcars hughcars deleted the hughcars/driven_solver_docs_review_fixes branch June 16, 2026 17:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no-long-tests This PR does not require the long tests to be merged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants