Bring Jupyter tutorials up to spec and translate to zh-cn/ja - #133
Bring Jupyter tutorials up to spec and translate to zh-cn/ja#133Ooolab wants to merge 6 commits into
Conversation
The 10 Jupyter-based ALPS tutorials didn't meet the tutorial page checklist: no DOI citations, no parameter tables, no lattice diagrams, no stated numerical results, and no summary/outlook questions. Fix all of that in English using real output from running the simulations locally (sparsediag/dmrg/dmft), then translate all 10 pages plus the section index into zh-cn and ja. Along the way, running extrapolationenergygapspinonechain.md surfaced a real convergence issue: SWEEPS=5 doesn't reliably resolve the near-degenerate ground-state doublet at L=128, corrupting the gap extrapolation. Documented the fix (SWEEPS=10) as a convergence note. Also fixes a pre-existing "isomers" -> "dimers" typo in spectra1dsystems.md and its index entry, and a copy-pasted "spin-half" description on the spin-1 extrapolation page. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
|
@Ooolab A few potential issues (see attachments). In the side menu some of the tutorials are in English. Some of the cn tutorials have en labels for subsections The inline comments for shellsessions are all in English. The translated DMRG tutorials seem behind the updated DMRG in en. This could be my local hugo, but I am also seeing those fraction rendering issues I mentioned as an issue.
|
There was a problem hiding this comment.
Pull request overview
Updates all 10 Jupyter tutorials to satisfy the tutorial checklist and synchronizes Chinese and Japanese translations.
Changes:
- Adds model context, parameters, lattice diagrams, method rationale, numerical results, and outlook questions.
- Documents the spin-1 DMRG convergence issue.
- Translates tutorial pages and indexes into Chinese and Japanese.
Reviewed changes
Copilot reviewed 33 out of 33 changed files in this pull request and generated 9 comments.
Show a summary per file
| File | Description |
|---|---|
content/en/tutorials/jupyter/_index.md |
Corrects the dimers index entry. |
content/en/tutorials/jupyter/qbits/qbitenergy.md |
Expands the qubit tutorial. |
content/en/tutorials/jupyter/ed/isingTransverseField.md |
Expands the Ising tutorial. |
content/en/tutorials/jupyter/ed/spinGapSpinOneHeisenbergChain.md |
Expands the spin-gap tutorial. |
content/en/tutorials/jupyter/ed/spectra1dsystems.md |
Expands the 1D spectra tutorial. |
content/en/tutorials/jupyter/dmrg/groundstatespinchain.md |
Expands the ground-state tutorial. |
content/en/tutorials/jupyter/dmrg/energygapspinhalf.md |
Expands the spin-1/2 gap tutorial. |
content/en/tutorials/jupyter/dmrg/energygapspinone.md |
Expands the spin-1 gap tutorial. |
content/en/tutorials/jupyter/dmrg/extrapolationenergygapspinhalfchain.md |
Adds spin-1/2 extrapolation results. |
content/en/tutorials/jupyter/dmrg/extrapolationenergygapspinonechain.md |
Adds results and convergence guidance. |
content/en/tutorials/jupyter/dmft/dmftBetheHubbard.md |
Expands the DMFT tutorial. |
content/zh-cn/tutorials/jupyter/_index.md |
Translates the tutorial index. |
content/zh-cn/tutorials/jupyter/qbits/qbitenergy.md |
Adds the Chinese qubit tutorial. |
content/zh-cn/tutorials/jupyter/ed/isingTransverseField.md |
Adds the Chinese Ising tutorial. |
content/zh-cn/tutorials/jupyter/ed/spinGapSpinOneHeisenbergChain.md |
Adds the Chinese spin-gap tutorial. |
content/zh-cn/tutorials/jupyter/ed/spectra1dsystems.md |
Adds the Chinese spectra tutorial. |
content/zh-cn/tutorials/jupyter/dmrg/groundstatespinchain.md |
Adds the Chinese ground-state tutorial. |
content/zh-cn/tutorials/jupyter/dmrg/energygapspinhalf.md |
Adds the Chinese spin-1/2 gap tutorial. |
content/zh-cn/tutorials/jupyter/dmrg/energygapspinone.md |
Adds the Chinese spin-1 gap tutorial. |
content/zh-cn/tutorials/jupyter/dmrg/extrapolationenergygapspinhalfchain.md |
Adds the Chinese spin-1/2 extrapolation tutorial. |
content/zh-cn/tutorials/jupyter/dmrg/extrapolationenergygapspinonechain.md |
Adds the Chinese spin-1 extrapolation tutorial. |
content/zh-cn/tutorials/jupyter/dmft/dmftBetheHubbard.md |
Adds the Chinese DMFT tutorial. |
content/ja/tutorials/jupyter/_index.md |
Translates the tutorial index. |
content/ja/tutorials/jupyter/qbits/qbitenergy.md |
Adds the Japanese qubit tutorial. |
content/ja/tutorials/jupyter/ed/isingTransverseField.md |
Adds the Japanese Ising tutorial. |
content/ja/tutorials/jupyter/ed/spinGapSpinOneHeisenbergChain.md |
Adds the Japanese spin-gap tutorial. |
content/ja/tutorials/jupyter/ed/spectra1dsystems.md |
Adds the Japanese spectra tutorial. |
content/ja/tutorials/jupyter/dmrg/groundstatespinchain.md |
Adds the Japanese ground-state tutorial. |
content/ja/tutorials/jupyter/dmrg/energygapspinhalf.md |
Adds the Japanese spin-1/2 gap tutorial. |
content/ja/tutorials/jupyter/dmrg/energygapspinone.md |
Adds the Japanese spin-1 gap tutorial. |
content/ja/tutorials/jupyter/dmrg/extrapolationenergygapspinhalfchain.md |
Adds the Japanese spin-1/2 extrapolation tutorial. |
content/ja/tutorials/jupyter/dmrg/extrapolationenergygapspinonechain.md |
Adds the Japanese spin-1 extrapolation tutorial. |
content/ja/tutorials/jupyter/dmft/dmftBetheHubbard.md |
Adds the Japanese DMFT tutorial. |
Suppressed comments (3)
content/en/tutorials/jupyter/ed/isingTransverseField.md:56
chain latticeis periodic, not open (the repository documentation explicitly states this atcontent/en/documentation/methods/dmrg/nonintdmrg.md:28), and the later use ofTOTAL_MOMENTUMalso relies on translational symmetry. The new diagram and open-boundary rationale misdescribe the actual simulation and its finite-size spectrum; update them to show a ring/periodic chain in every locale.
The `chain lattice` is a 1D open chain of `L` sites, with the Ising coupling $J_z$ living on the bonds and the transverse field $\Gamma$ acting on each site:
content/en/tutorials/jupyter/ed/spinGapSpinOneHeisenbergChain.md:44
chain latticeis the periodic ALPS chain, not an open chain (seecontent/en/documentation/methods/dmrg/nonintdmrg.md:28). The reported gaps are consequently periodic-chain gaps; describing open boundaries here and on line 52 gives readers the wrong lattice and physical interpretation. Correct the diagram and prose in all locales.
The `chain lattice` is a 1D open chain of `L` spin-1 sites coupled by nearest-neighbour exchange $J$:
content/en/tutorials/jupyter/dmrg/energygapspinone.md:223
- For an open spin-1 chain, the near-degenerate edge-state manifold is fourfold (one singlet plus the three components of a triplet), not twofold. Method 1 sees only two states because it is restricted to
Sz_total=0; Method 2's near-degenerateSz_total=1state is part of the same manifold. Calling the full ground state twofold here and in the question misstates the physics.
Unlike the gapless spin-1/2 chain, the spin-1 Heisenberg chain has a 2-fold degenerate ground state and a finite excitation gap even at $L=64$ — direct DMRG confirmation of Haldane's prediction for integer-spin chains.
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| | `CONSERVED_QUANTUMNUMBERS` | quantum numbers fixed in the basis | `Sz` | | ||
| | `Sz_total` | total magnetization sector | `0` | | ||
| | `J` | Heisenberg exchange coupling | `1` | | ||
| | `SWEEPS` | number of DMRG sweeps | `5` | |
|
|
||
| | $J_2$ | $E_0$ | | ||
| |---|---| | ||
| | 0.0 | -1.00000 | |
|
|
||
| Ground-state energies and the gap to the first excited state, from running the code above: | ||
|
|
||
| | System | $L$ | $E_0$ | $E_0/L$ | Gap to $E_1$ | |
| | `NUMBER_EIGENVALUES` | number of low-lying eigenstates kept | `5` | | ||
| | `L` | chain length | `10, 12` | | ||
|
|
||
| With `Jz=-1` and `Gamma=0.5`, $\Gamma/J=0.5$, which is exactly the critical point of the model. |
| - $U$ 是在位相互作用能,$U > 0$对应于排斥相互作用。 | ||
| - $n_{i,\sigma} = c_{i,\sigma}^\dagger c_{i,\sigma}$ 是格点$i$处自旋味$\sigma$费米子的数目算符。 | ||
|
|
||
| ### Parameters |
|
|
||
| | Method | Quantity | Value | | ||
| |---|---|---| | ||
| | 1 | $E_0-E_1$ (ground-state degeneracy splitting) | $3\times10^{-7}$ | |
| | `MODEL` | Hamiltonian family | `spin` | | ||
| | `local_S` | spin quantum number per site | `1` | | ||
| | `J` | Heisenberg exchange coupling $J$ | `1` | | ||
| | `L` | chain length | `4, 6, 8, 10, 12, 14` | |
| $$S^{\dagger}|s\rangle = \sqrt{S(S+1)-s(s+1)}|s+1\rangle$$, | ||
| $$S^{-}|s\rangle = \sqrt{S(S+1)-s(s-1)}|s-1\rangle$$, | ||
| where $S=1/2$ and $s=-S, -S+1$. | ||
| 其中 $S=1/2$,$s=-S, -S+1$。 |
| ``` | ||
|
|
||
| Note that `local_S = 1`, which gives us the spin-1 system. The `NUMBER_EIGENVALUES = 4` will produce the lowest 4 energies from the DMRG simulations. To ensure enough accuracy, we have also set the number of sweeps `SWEEPS = 5` and the truncation of the number of states `NUMBER_EIGENVALUES = 300`. | ||
| 注意 `local_S = 1` 给出了自旋-1系统。`NUMBER_EIGENVALUES = 4` 将从DMRG模拟中给出最低的4个能量。为了确保足够的精度,我们还设置了扫描次数 `SWEEPS = 5` 以及保留态数目的截断 `NUMBER_EIGENVALUES = 300`。 |
…als-fix-and-translate # Conflicts: # content/en/tutorials/jupyter/ed/isingTransverseField.md
…ranslate' into feat/jupyter-tutorials-fix-and-translate
This reverts commit 8e0f995.
The Bethe-lattice DMFT page was the only jupyter tutorial whose section headings, table headers and lattice-diagram annotations were left in English in both the Japanese and Simplified Chinese trees. Headings and table headers now use the terms already established across the other jupyter pages: パラメータ/格子/手法の選択/シミュレーション/結果/ まとめと展望 and 参数/晶格/方法选择/模拟/结果/总结与展望, with "| パラメータ | 意味 | 値 |" and "| 参数 | 含义 | 值 |" for the parameter tables and フレーバー / 味 for the Flavor column in the results table. Proper nouns follow each page's existing convention: ja uses ベーテ格子 and ハバードモデル (as in its own title and body), zh-cn keeps Bethe and Hubbard in Latin (Bethe晶格, Hubbard模型). The ASCII lattice diagram keeps its art and only the annotations are translated. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
Pushed four commits to this branch to unblock it and finish a few leftovers. Quite a few English words were present still. Summary of what changed and why below. (CLAUDE) Conflict resolutionThe branch was 131 commits behind
Resolved by taking one from
Every other file merged cleanly. PR now reports mergeable. Reverted the
|
| English | ja | zh-cn |
|---|---|---|
| Bethe Lattice | ベーテ格子 | Bethe晶格 |
| Hubbard Model | ハバードモデル | Hubbard模型 |
| Parameters | パラメータ | 参数 |
| Lattice | 格子 | 晶格 |
| Method Choice | 手法の選択 | 方法选择 |
| Simulation | シミュレーション | 模拟 |
| Results | 結果 | 结果 |
| Summary and Outlook | まとめと展望 | 总结与展望 |
Also translated, in both trees:
- the parameter table header
| Parameter | Meaning | Value |→| パラメータ | 意味 | 値 |/| 参数 | 含义 | 值 | - the
Flavorcolumn in the results table →フレーバー/味 - the annotations on the ASCII lattice diagram (
each site has z=3 neighbours,connected in a loop-free tree,→ Bethe lattice, coordination z=3). The diagram art itself is unchanged.
Terms were taken from what the other jupyter pages already use, so nothing new was invented — パラメータ/格子/手法の選択/シミュレーション/結果/まとめと展望 appear across the ja pages, 参数/晶格/方法选择/模拟/结果/总结与展望 across the zh-cn ones, and | パラメータ | 意味 | 値 | is the parameter-table header used 23 times in the ja tree.
Proper nouns follow each page's own existing convention rather than a single rule: ja writes ベーテ / ハバード (its own title is ベーテ格子上のハバードモデルのDMFT), zh-cn keeps Bethe and Hubbard in Latin (its title is Bethe晶格上Hubbard模型的DMFT).
Still outstanding
One more instance of the same defect, not fixed here since it is outside the DMFT page: content/ja/tutorials/jupyter/ed/isingTransverseField.md:41 still has | Parameter | Meaning | Value |. It is the only remaining English table header in the ja tree.
hugo --gc --minify builds clean, and all 11 jupyter pages render in each of en, ja and zh-cn.
marcusr2ML
left a comment
There was a problem hiding this comment.
I fixed the issues I was worried about.




Summary
content/en/tutorials/jupyter/**) up to the tutorial-page checklist: DOI citations, parameter tables, ASCII lattice diagrams, method-choice justification, real numerical results, and summary/outlook questions.sparsediag,dmrg,dmft), not placeholder text.extrapolationenergygapspinonechain.md:SWEEPS=5doesn't reliably resolve the near-degenerate ground-state doublet at L=128, corrupting the extrapolated gap;SWEEPS=10fixes it. Added as a convergence note in the tutorial._index.mdinto zh-cn and ja, preserving code/math/URLs verbatim.spectra1dsystems.md(and its index link), and a copy-pasted "spin-half" front-matter description on the spin-1 extrapolation page.Test plan
hugo --gcbuilds cleanly across en/zh-cn/ja with no errorssparsediag/dmrg/dmft), not fabricated🤖 Generated with Claude Code