ariadnetor-algorithms 0.0.3

Tensor-network algorithms built on ariadnetor
Documentation
//! DMRG (Density Matrix Renormalization Group) algorithm primitives.
//!
//! Exposes the environment-tensor data structure ([`DmrgEnvs`],
//! generic over a [`DmrgEnvOps`]-implementing layout type so the
//! same struct serves Dense and BlockSparse chains) and a single
//! layout-generic 2-site sweep driver [`sweep_2site`] dispatched
//! over [`DmrgOps`] so one call site covers both the Dense and
//! BlockSparse / U(1) paths. Internally the driver runs a local
//! 2-site update step in two parallel forms (Dense and BlockSparse /
//! U(1)) — effective Hamiltonian + local-eigensolver drive (Lanczos
//! by default, ARPACK behind the `arpack` feature; the BlockSparse
//! path reuses the Dense Krylov family through a flat-buffer adapter)
//! plus a truncated-SVD split — but these per-step primitives are
//! crate-internal, not part of the exposed surface. The driver shares
//! `DmrgSweepParams`, `DmrgSweepError`, `DmrgResult`,
//! `DmrgSweepRecord`, `DmrgStepRecord`, and `SweepDirection`.
//!
//! For non-expert callers, [`dmrg_2site`] wraps the low-level driver
//! with defensive `psi0.clone()`, automatic canonicalization to
//! `Mixed { center: 0 }`, and a fresh [`DmrgEnvs::build`], reporting
//! its own [`DmrgError`] that subsumes empty / length-mismatch input
//! and forwards underlying env / sweep failures.

mod dispatch;
mod env;
mod env_block_sparse;
mod heff;
mod heff_block_sparse;
mod heff_error;
mod sealed;
mod solver;
mod sweep;
mod wrapper;

pub use dispatch::{AbsorbedStep, DmrgOps, FullStepError};
pub use env::{DmrgEnvError, DmrgEnvOps, DmrgEnvs};
pub use heff::TwoSiteStepResult;
pub use heff_block_sparse::TwoSiteStepResultBlockSparse;
pub use heff_error::DmrgHeffError;
pub use solver::LocalEigensolverParams;
pub use sweep::{
    DmrgResult, DmrgStepRecord, DmrgSweepError, DmrgSweepParams, DmrgSweepRecord, SweepDirection,
    sweep_2site,
};
pub use wrapper::{DmrgError, dmrg_2site};