Skip to content

ACE benchmarks on Paanini and figures - #20

Merged
Gauthameshwar merged 12 commits into
mainfrom
benchmarking-ace
Sep 30, 2026
Merged

Gauthameshwar merged 12 commits into
mainfrom
benchmarking-ace

Conversation

@Gauthameshwar

@Gauthameshwar Gauthameshwar commented Sep 30, 2026 •

Copy link
Copy Markdown
Owner

Summary

Production ACE construction timings and figures from the Paanini workstation, plus two correctness fixes found while checking those runs against exact references.

Benchmarks

All new suites live under benchmark/ and share julia --project=benchmark. CSVs and figures are committed; C++ ACE is a separate clone and is not in the repo. Construction is single-threaded (julia -t 1, one OpenMP/BLAS thread). Methodology is in the folder READMEs.

Julia vs C++ (benchmark/JuliaVsC++/).

  • Head-to-head build_process_tensor against Cygorek C++ ACE with dont_propagate.
  • Central spin: $J=1$, $JT=20$, $J\Delta t=0.1$, $\varepsilon=10^{-10}$, $N_E\in{5,10,25,50,100}$, fully / partially / unpolarised baths, :zipup_cpp.
  • Lorentzian spin-boson (Nat. Phys. 2022 SI grid, $C/\Omega^2=0.2$): $M=5$, $\Omega T=8$, $\varepsilon=10^{-8}$, $N_E\in{5,10,20,50,100}$, $k_BT/\Omega\in{0,0.5,1,3}$.
  • Julia and C++ report the same $D_{\max}$ on every central-spin row (for example polarised $N=100$: both 13; unpolarised $N=10$: both 75).
  • Julia build_s is lower throughout: polarised $N=5$ is 4.6 s vs 21 s, unpolarised $N=10$ is 117 s vs 1400 s. The same pattern holds for the spin-boson grid (vacuum $N_E=5$: 920 s vs 2300 s, both $D_{\max}=69$).
  • Figure: benchmark/JuliaVsC++/results/julia_vs_cpp.pdf.
  • Small sanity runs against joint ED give relative Frobenius errors $\sim 10^{-8}$ (central spin) and $\sim 10^{-5}$ (two-mode boson), with Julia–C++ disagreement another one to two orders smaller.

Compressor comparison (benchmark/ace_compressors/).
:zipup_cpp vs :canonzip at the same cutoff: unpolarised central-spin scaling in $N$, an eight-spin cutoff sweep (trajectory error vs a canonzip $\varepsilon=10^{-13}$ reference), and BLAS-thread scaling of one easy polarised central spin and one hard spin-boson PT. Figure: benchrk/ace_compressors/results/ace_compression.pdf.

SciPost Figure 1 (benchmark/scipost_fig1/). Four-mode $S_z\otimes S_z$ bath. Direct 32-dimensional ED is the $\Delta t$-free reference; Dense() is the exact PT; ACE uses :canonzip at $10^{-12}$. Panels compare timestep and propagation order. Figure: benchmark/scipost_fig1/results/fig1.pdf.

SciPost Figure 2 (benchmark/scipost_fig2/). Unpolarised central spin, $N=50$, one archived Xoshiro(20260905) bath for every $(\Delta t,\varepsilon)$. Panel (a) is the bond profile $D_k(t)$; panel (b) is $D_{\max}$ over $\Delta t\in{1.5,0.5,0.2,0.1,0.05}$ and $\varepsilon\in{10^{-6},\ldots,10^{-12}}$. Finer timesteps and tighter cutoffs raise $D_{\max}$ (for example $\Delta t=0.1$, $\varepsilon=10^{-6}$ gives $D_{\max}=4$; $\varepsilon=10^{-12}$ gives 42). Figure: benchmark/scipost_fig2/results/fig2.pdf.

Deprecation of :zipup

The previous default joined a mode ahead of truncation. That is not the C++ ACE schedule. The C++ forward pass truncates the current core before the next timestep is joined, then sweeps backward.
:zipup is removed. ACE(; compression) is now :zipup_cpp (default) or :canonzip. :zipup_cpp is that truncate-then-join order with the ITensors default SVD (gesdd). Passing :zipup throws and names :zipup_cpp. Compressor figures and examples were regenerated on this interface. This is a pre-1.0 keyword break; the package version stays 0.2.0.

Bug fixes

PT-vs-full-ED tests were loose enough that a reversed bath channel looked like Trotter error.

  • Single-mode bath MPOs wired the Liouvillian input and output backwards relative to liouvillian_propagator_itensor, so the contracted channel was time-reversed. prime(env) is now the left (input) bond and env the right (output) bond.
  • Multimode Dense cores had the fused bath input/output combiners swapped relative to the one-mode builder, so non-commuting baths were not trace-preserving. Those links follow the same chronological convention.
    Tests now compare $\rho_{\mathrm{PT}}$ to the same discrete split propagator at $\sim 10^{-11}$. Disagreement with $e^{-itH}$ is reported separately as Trotter error. Dense and ACE are also checked against that split schedule on random Hermitian baths.

Test plan

  • CI

  • bench: correctness of builders against discretisation methods

  • bench: compression using cutoff and timestep

  • chore: format README latex expressions correctly

  • fix: restore chronological bath bonds in process-tensor cores

  • test: silence package logs in the test suite

  • feat: drop :zipup compressor and make :zipup_cpp the default ACE compression

  • fix: restore chronological fused-bath links in Dense PTs

  • bench: add Julia vs C++ ACE construction comparison

  • bench: use a shared --project=benchmark environment

  • chore: add links to files in benchmark READMEs

  • chore: larger fonts in plots

Gauthameshwar and others added 11 commits September 5, 2026 11:29
The shared Liouvillian propagator uses unprimed = output and primed = input,
but bath MPO wiring still mapped those legs backwards. Evolution then used
the time-reversed channel, which loose PT-vs-full-ED tolerances hid as
Trotter error.
Wire prime(env) to the left bond and env to the right, and compare PT
snapshots to the same discrete U(Δt) at ~1e-11. Keep e^{-itH} only as a
separate Trotter check.
Wrap the suite in NullLogger after the progress tests, and assert
expected warnings with @test_logs so Julia 1.12 does not look at stderr.
…ression

ACE now offers `:zipup_cpp` (ACE C++ styled truncate-then-join with
ITensors gesdd solver) or `:canonzip`. Examples, docs, tests, and ACE
compressor figures are regenerated on that interfact.
Multimode Dense cores had bath input/output combiners swapped relative
to the one-mode builder, so non-commuting batyhs were not TP. Align
fused links and initial/trace attachments with the chronological
convention, and cover Dense/ACE against matching split-ED schedules with
random Hermitian baths for a rigorous correctness verification.
Record single-core zipup_cpp ProcessTensors.jl construction of various
process tensors next to Cygorek's ACE on the same models and bathmode
grids.

Also contains files to check the sanity of both C++ and Julia PT
constructors' evolution against ED results for a small bath made of
spins and bosons.

Refer to README.md files on each folder to know the details of
the benchmark implementations and the folder contents.
Replace per-suite .bench_env/.plot_env activation with benchmark/Project.toml
(and Manifest), plus a small env.jl instantiate helper that parallel workers
can skip via SKIP_INSTANTIATE=1. Point all suite entrypoints and READMEs at
julia --project=benchmark, ignore local *smoke*.csv artefacts, and escape
LaTeX underscores in benchmark READMEs so GitHub does not treat subscripts
as Markdown italics.

Co-authored-by: Cursor <cursoragent@cursor.com>
Copilot AI balanced review requested due to automatic review settings September 30, 2026 08:33

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@codecov

codecov Bot commented Sep 30, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 97.59036% with 2 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/builders/abstract_builders.jl 50.00% 1 Missing ⚠️
src/builders/ace_process_tensor.jl 98.64% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

@Gauthameshwar
Gauthameshwar merged commit 5953814 into main Sep 30, 2026
11 checks passed
@Gauthameshwar
Gauthameshwar deleted the benchmarking-ace branch September 30, 2026 10:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants