Update multi-product-formula tutorial to conform to new template#5170
Update multi-product-formula tutorial to conform to new template#5170henryzou50 wants to merge 21 commits into
Conversation
- Restructure both the small-scale simulator example and the large-scale
hardware example so each section follows the four-step template
(Step 2 = transpile, Step 3 = execute, Step 4 = post-process). The
previous labeling had Step 2 doing execution and Step 3 doing
post-processing.
- Rewrite the Background section to address review feedback: focus on
the trade-off between Trotter step count k and circuit depth (rather
than PF order), introduce r and k_j on first appearance, give the
explicit eta_n / chi exponent pattern for symmetric vs non-symmetric
PFs, and replace the stability paragraph with a derivation-based
explanation of why t/k_min <~ 1 matters.
- Fix Prerequisites links (point to the compilation-methods tutorial and
SuzukiTrotter / LieTrotter API pages instead of the mismatched course
URLs) and tighten the Requirements list.
- Restore the per-code-cell narrative that had been trimmed from earlier
passes (LSE inspection, identity_factory / Neel MPS setup, dynamic-
coefficients loop).
- Correct the small-scale post-plot commentary so it no longer reads as
if MPFs work better at t/k > 1, and expand the sampling-error
explanation with the explicit sigma_MPF^2 = sum x_j^2 sigma_{k_j}^2
formula.
- Correct the large-scale section: drop the misleading "Steps 1-4
combined" header (the cell is only Step 1), fix the inline comment
on the k=6 baseline (it is a depth-comparable single-circuit run, not
one that matches the MPF's effective Trotter error), and rewrite the
results discussion to match the new run (dynamic MPF beats every
individual product formula here; exact-static MPF is worst because
||x||_1 = 5.63 amplifies hardware noise).
- Suppress TeNPy's unit_cell_width future-API UserWarning in the Setup
cell. The default is correct for Chain lattices, which is what
CouplingMap.from_line(...) produces.
- Extend cspell:ignore with the new technical / LaTeX terms.
|
One or more of the following people are relevant to this code:
|
|
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
| "\n", | ||
| "where $\\chi$ is the order of the symmetric PF and $s_p = \\left( 4 - 4^{1/(2p-1)} \\right)^{-1}$. For long time-evolutions, one can split the time interval $t$ into $k$ intervals, called Trotter steps, of duration $t/k$ and approximate the time-evolution in each interval with a $\\chi$ order product formula $S_{\\chi}$. Thus, the PF of order $\\chi$ for time-evolution operator over $k$ Trotter steps is:\n", | ||
| "where $\\langle A \\rangle_{k_j}(t)$ is the expectation value of an observable $A$ at time $t$ estimated from a Trotter circuit with $k_j$ steps, and the coefficients $\\{x_j\\}_{j=1}^r$ are chosen so that the leading Trotter-error terms in the combination cancel. We will revisit this expression in [Step 4](#step-4-post-process-and-return-result-in-desired-classical-format), where we evaluate it explicitly to combine our Trotter results. The key practical point is that the deepest circuit in the MPF only needs $k_{\\max}$ steps, which is much smaller than the single $k$ that would be required to reach the same effective Trotter error directly. The shallower circuits make the MPF approach better suited to noisy hardware.\n", |
There was a problem hiding this comment.
Which step 4 should this link to, since we have two headers with this same title?
Also - should the step names ever change, I suggest future-proofing it with this syntax on the line right before the relevant step 4:
<span id="step-4-or-whatever-anchor-name-you-want"></span>
and then you can use [Step 4](#step-4-or-whatever-anchor-name-you-want) to call it.
There was a problem hiding this comment.
Oh this should link to step 4 of the small scale example. I just pushed a change for that and did your suggestion! That is good to know and thanks!
| "\n", | ||
| "- **Trotter error.** The individual product formulas (grey markers) deviate from the exact curve more and more as time grows, with the largest deviation for $k=1$ — that circuit is the shallowest, but it is also already in the regime where $t/k \\gtrsim 1$, so the leading $1/k^{2}$ error term is large. The MPF combinations (colored markers) cancel several of these leading Trotter-error terms, so they track the exact curve much more closely than any single $k_j$ circuit. The remaining gap reflects the higher-order Trotter terms that the MPF does *not* cancel: an order-$2$, $r=3$ static MPF only kills the first two error orders, and at large $t/k_{\\min}$ the uncancelled tail eventually dominates — so MPF is not a free pass to use very shallow circuits at arbitrary times.\n", |
There was a problem hiding this comment.
| "- **Trotter error.** The individual product formulas (grey markers) deviate from the exact curve more and more as time grows, with the largest deviation for $k=1$ — that circuit is the shallowest, but it is also already in the regime where $t/k \\gtrsim 1$, so the leading $1/k^{2}$ error term is large. The MPF combinations (colored markers) cancel several of these leading Trotter-error terms, so they track the exact curve much more closely than any single $k_j$ circuit. The remaining gap reflects the higher-order Trotter terms that the MPF does *not* cancel: an order-$2$, $r=3$ static MPF only kills the first two error orders, and at large $t/k_{\\min}$ the uncancelled tail eventually dominates — so MPF is not a free pass to use very shallow circuits at arbitrary times.\n", | |
| "- **Trotter error.** The individual product formulas (grey markers) deviate from the exact curve more and more as time grows. The $k=1$ circuit has the largest deviation and is the shallowest, but it is also already in the regime where $t/k \\gtrsim 1$, so the leading $1/k^{2}$ error term is large. The MPF combinations (colored markers) cancel several of these leading Trotter-error terms, so they track the exact curve much more closely than any single $k_j$ circuit. The remaining gap reflects the higher-order Trotter terms that the MPF does *not* cancel: an order-$2$, $r=3$ static MPF only kills the first two error orders, and at large $t/k_{\\min}$ the uncanceled tail eventually dominates — so MPF does not necessarily invite using very shallow circuits at arbitrary times.\n", |
There was a problem hiding this comment.
With translations in mind, I tried rewriting the last sentence to avoid colloquialisms, but perhaps you can come up with something better?
There was a problem hiding this comment.
Good point, I went with: "so MPF does not guarantee that very shallow circuits remain accurate at arbitrary times." This should read a bit more naturally than "invite using" and should translate cleanly. Also fixed a stray double-backslash in \gtrsim that snuck in. Let me know if you'd prefer different phrasing!
|
I've finished a copyedit sweep ✅ |
Co-authored-by: abbycross <across@us.ibm.com>
Co-authored-by: abbycross <across@us.ibm.com>
Co-authored-by: abbycross <across@us.ibm.com>
Co-authored-by: abbycross <across@us.ibm.com>
Co-authored-by: abbycross <across@us.ibm.com>
Co-authored-by: abbycross <across@us.ibm.com>
Co-authored-by: abbycross <across@us.ibm.com>
Co-authored-by: abbycross <across@us.ibm.com>
Co-authored-by: abbycross <across@us.ibm.com>
Co-authored-by: abbycross <across@us.ibm.com>
Co-authored-by: abbycross <across@us.ibm.com>
Co-authored-by: abbycross <across@us.ibm.com>
Co-authored-by: abbycross <across@us.ibm.com>
Co-authored-by: abbycross <across@us.ibm.com>
Co-authored-by: abbycross <across@us.ibm.com>
Co-authored-by: abbycross <across@us.ibm.com>
Co-authored-by: abbycross <across@us.ibm.com>
Co-authored-by: abbycross <across@us.ibm.com>
Summary
Brings
multi-product-formula.ipynbin line with new tutorial template and the conventions established by recent tutorial updates.Both the small-scale simulator example and the large-scale hardware example now follow the standard four-step layout. Labels match content: Step 2 = transpile/optimize, Step 3 = execute, Step 4 = post-process (compute MPF coefficients and combine). Previously, Step 2 was doing execution and Step 3 was doing post-processing.
Other changes:
unit_cell_widthUserWarning suppressed in the Setup cell. The default is correct for Chain lattices, which is whatCouplingMap.from_line(...)produces here.Acknowledgments
Thanks to Boseong for the detailed review of the prior draft. The descriptions, Step-label fixes, and several of the Background corrections above incorporate that feedback directly.