docs: Documenter.jl setup, tutorials, and API fixes#30
Merged
Conversation
- AGENTS.md: add Error Handling and Documentation Requirements sections - docs/make.jl: Documenter.jl build with per-module API pages - docs/src/: index, module architecture, 7 API reference pages, tutorial stubs - .github/workflows/docs.yml: CI builds Rust lib, generates docs, deploys to gh-pages Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The Rust C API (PR #393) expanded t4a_quanticscrossinterpolate_f64 and t4a_quanticscrossinterpolate_discrete_f64 from 7/9 to 13/15 parameters, adding options, initial_pivots, n_pivots, out_ranks, out_errors, and out_n_iters. The Julia ccall bindings were not updated, causing stack misalignment and a capacity overflow panic in parse_initial_pivots. - C_API.jl: update both ccall bindings to match 13/15-parameter signatures - QuanticsTCI.jl: allocate rank/error buffers, return (qtci, ranks, errors) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Covers grid creation, QTCI with both max_bonddim and tolerance modes, evaluation, integration, bond dimension inspection, and MPS conversion. Uses multi-scale oscillatory function f(x)=exp(-x)*cos(x/B) as main example. Migrated from T4APlutoExamples/quantics1d.jl to Tensor4all.jl API. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Pipeline: QuanticsTCI → MPS → fourier_operator → set_iospaces! → apply → evaluate. Demonstrates DFT on 2^40-point grid with sum-of-exponentials test function. Shows analytical verification via geometric series and high-frequency access. Migrated from T4APlutoExamples/qft.jl Part A. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- C_API.jl: add t4a_treetn_swap_site_indices binding - TreeTN.jl: add swap_site_indices!(ttn, target) and rearrange_siteinds - Tensor4all.jl: export new functions Note: adjacent swaps work; non-adjacent multi-site swaps may fail due to a convergence limitation in the Rust swap algorithm (to be fixed upstream). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
swap_site_indices!andrearrange_siteindsto TreeTN APIChanges
Documentation infrastructure
docs/Project.toml,docs/make.jl: Documenter.jl build with per-module API pagesdocs/src/index.md: Overview + quick startdocs/src/modules.md: Module dependency graph and data flowdocs/src/api/: 7 API reference pages (Core, SimpleTT, TreeTN, QuanticsGrids, QuanticsTCI, QuanticsTransform, TreeTCI).github/workflows/docs.yml: CI builds Rust lib, generates docs, deploys to gh-pagesTutorials (migrated from T4APlutoExamples)
docs/src/tutorials/quantics1d.md: Grid creation, QTCI, evaluation, integration, MPS conversiondocs/src/tutorials/fourier1d.md: QTT Fourier transform pipeline on 2^40-point gridBug fix
t4a_quanticscrossinterpolate_f64from 7 to 13 params; Julia ccall was not updated, causing stack misalignment → segfault. Now synced. Returns(qtci, ranks, errors)tuple.New API
swap_site_indices!(ttn, target): Swap site indices to target vertices via SVDrearrange_siteinds(ttn, layout): High-level site rearrangementAGENTS.md updates
Requires (tensor4all-rs)
Two C API functions were added to tensor4all-rs (separate PR needed):
t4a_linop_set_input_space/t4a_linop_set_output_spacet4a_treetn_swap_site_indicesTest plan
julia --project=docs docs/make.jlbuilds without errors🤖 Generated with Claude Code