|
Uni20
Asynchronous tensor and runtime library.
|
Classes | |
| struct | DmrgLanczosOptions |
| Numerical policy for one lightweight DMRG local Lanczos solve. More... | |
| struct | DmrgLanczosResult |
| Approximate local ground state produced by fixed-step DMRG Lanczos. More... | |
| class | FiniteMpo |
| Homogeneous finite MPO owner with exact auxiliary connectivity. More... | |
| class | FiniteMps |
| Homogeneous finite MPS owner with exact bond connectivity. More... | |
| struct | InstalledMpsBond |
| Bond data retained after installing a two-site MPS split. More... | |
| class | LocalTwoSiteEffectiveHamiltonian |
| Apply a local two-site operator to a fixed BlockTensor center. More... | |
| class | MpoEnvironmentCache |
| Directional MPO environment cache borrowed from finite MPS and MPO owners. More... | |
| class | PreparedRightFirstRabcContraction |
| Prepared right-first executor for one fixed R/A/B/C structure. More... | |
| struct | rabc_contract_op |
| Fixed-output sparse R/A/B/C contraction operation tag. More... | |
| class | RabcContractionPlan |
| Immutable sparse coefficient tensor for an R/A/B/C contraction. More... | |
| struct | RabcTerm |
One nonzero coefficient in R_r += f(r,a,b,c) A_a B_b transpose(C_c). More... | |
| struct | RightFirstRabcBackend |
Executor that reuses right-first (B_b,C_c) intermediates. More... | |
| struct | TwoSiteDmrgOptions |
| Numerical policies for one finite-chain two-site DMRG update. More... | |
| struct | TwoSiteDmrgRunOptions |
| Policies for an alternating finite-chain two-site DMRG run. More... | |
| struct | TwoSiteDmrgRunResult |
| Result of an alternating finite-chain two-site DMRG run. More... | |
| struct | TwoSiteDmrgStepResult |
| Diagnostics and selected bond data from one DMRG bond update. More... | |
| struct | TwoSiteDmrgSweepSummary |
| Aggregate diagnostics for one completed directional DMRG sweep. More... | |
| class | TwoSiteEffectiveHamiltonian |
| Matrix-free two-site Hamiltonian compiled from environments and MPO sites. More... | |
| struct | TwoSiteMpsSplit |
| Directionally absorbed two-site MPS factors and retained bond data. More... | |
Concepts | |
| concept | RabcPlan |
| Concrete logical R/A/B/C coefficient-plan type. | |
Typedefs | |
| using | DetailedTwoSiteDmrgPerformanceMeasurements = performance::DetailedMeasurements< TwoSiteDmrgPerformanceEvent, static_cast< std::size_t >(TwoSiteDmrgPerformanceEvent::count)> |
| Detailed DMRG measurements including per-sector block-SVD batch timings. | |
| template<typename Scalar , class BraBond , class Auxiliary , class KetBond , BlockTensorStorage Storage = SeparateSparseBlockStorage<>> | |
| using | MpoEnvironment = BlockTensor< Scalar, Domain< BraBond, Auxiliary >, Codomain< KetBond >, Storage > |
Left or right MPO environment with (bra bond, auxiliary, ket bond) key order. | |
| template<typename Scalar , class LeftAuxiliary , class InputPhysical , class RightAuxiliary , class OutputPhysical , BlockTensorStorage Storage = SeparateSparseBlockStorage<>> | |
| using | MpoSite = BlockTensor< Scalar, Domain< LeftAuxiliary, InputPhysical >, Codomain< RightAuxiliary, OutputPhysical >, Storage > |
| One MPO site with input physical and left auxiliary domain factors. | |
| template<typename Scalar , class LeftBond , class Physical , class RightBond , BlockTensorStorage Storage = SeparateSparseBlockStorage<>> | |
| using | MpsSite = BlockTensor< Scalar, Domain< LeftBond, Physical >, Codomain< RightBond >, Storage > |
| One MPS site with the physical factor on the domain side. | |
| template<typename Scalar , BlockTensorStorage Storage = SeparateSparseBlockStorage<>> | |
| using | ScalarEnvironment = BlockTensor< Scalar, Domain<>, Codomain<>, Storage > |
| Rank-zero BlockTensor used for a scalar boundary environment. | |
| template<typename Scalar , class LeftBond , class LeftPhysical , class RightPhysical , class RightBond , BlockTensorStorage Storage = SeparateSparseBlockStorage<>> | |
| using | TwoSiteCenter = BlockTensor< Scalar, Domain< LeftBond, LeftPhysical, RightPhysical >, Codomain< RightBond >, Storage > |
| Two adjacent MPS sites combined into one optimization center. | |
| using | TwoSiteDmrgPerformanceMeasurements = performance::DurationMeasurements< TwoSiteDmrgPerformanceEvent, static_cast< std::size_t >(TwoSiteDmrgPerformanceEvent::count)> |
| Coarse inclusive wall-duration measurements for two-site DMRG phases. | |
| template<typename Scalar , class LeftPhysical , class RightPhysical , BlockTensorStorage Storage = PackedSparseBlockStorage<>> | |
| using | TwoSiteLocalOperator = BlockTensor< Scalar, Domain< Dual< LeftPhysical >, Dual< RightPhysical > >, Codomain< Dual< LeftPhysical >, Dual< RightPhysical > >, Storage > |
| Charge-preserving operator acting on two adjacent physical spaces. | |
Enumerations | |
| enum class | MpsSweepDirection { left_to_right , right_to_left } |
| Direction in which a two-site split moves the MPS canonical center. More... | |
| enum class | TwoSiteDmrgPerformanceEvent { run , sweep , bond_update , center_construction , local_eigensolver , effective_hamiltonian_application , krylov_vector_allocation , krylov_vector_update , krylov_reduction , block_svd , svd_sector_batch , state_selection , factor_materialization , environment_update , count } |
| Stable phase identifiers for two-site DMRG performance measurements. More... | |
Functions | |
| template<detail::TwoSiteSvdCenter Center, class Measurements , class Event > requires uni20::LapackScalar<block_tensor_value_t<Center>> && performance::BatchMeasurementPolicy<Measurements, Event> | |
| auto | decompose_two_site_center (Center const ¢er, linalg::SvdOptions options, Measurements &measurements, Event batch_event) |
| Factorize a canonical two-site MPS center by its internal cut with performance measurements. | |
| template<detail::TwoSiteSvdCenter Center> requires uni20::LapackScalar<block_tensor_value_t<Center>> | |
| auto | decompose_two_site_center (Center const ¢er, linalg::SvdOptions options={}) |
| Factorize a canonical two-site MPS center by its internal cut. | |
| template<uni20::LapackRealOrComplex Scalar, class Vector , krylov::KrylovMatrixFreeOperator< Vector, Scalar > Ops> | |
| auto | dmrg_lanczos_ground_state (Ops &ops, Vector const &initial, DmrgLanczosOptions< uni20::make_real_t< Scalar > > const &options={}) -> DmrgLanczosResult< uni20::make_real_t< Scalar >, Vector > |
| Perform a lightweight fixed-step Lanczos local ground-state update. | |
| template<SparseBlockStorage OutputStorage = SeparateSparseBlockStorage<>, detail::EnvironmentMatrixView Environment, detail::EnvironmentMatrixView BraSite, detail::EnvironmentMpoView Mpo, detail::EnvironmentMatrixView KetSite> requires detail::CompatibleEnvironmentUpdateScalars<Environment, BraSite, Mpo, KetSite> && detail::CompatibleLeftEnvironmentUpdateSpaces<Environment, BraSite, Mpo, KetSite> && detail::EnvironmentStorageFor<OutputStorage, block_tensor_value_t<Environment>> | |
| auto | extend_left_environment (Environment const &environment, BraSite const &bra_site, Mpo const &mpo, KetSite const &ket_site) |
| Extend a left MPO environment across distinct bra and ket MPS sites. | |
| template<SparseBlockStorage OutputStorage = SeparateSparseBlockStorage<>, detail::EnvironmentMatrixView Environment, detail::EnvironmentMatrixView Site, detail::EnvironmentMpoView Mpo> | |
| auto | extend_left_environment (Environment const &environment, Site const &site, Mpo const &mpo) |
| Extend a left MPO environment using one site as both bra and ket. | |
| template<SparseBlockStorage OutputStorage = SeparateSparseBlockStorage<>, detail::EnvironmentMatrixView Environment, detail::EnvironmentMatrixView BraSite, detail::EnvironmentMpoView Mpo, detail::EnvironmentMatrixView KetSite> requires detail::CompatibleEnvironmentUpdateScalars<Environment, BraSite, Mpo, KetSite> && detail::CompatibleRightEnvironmentUpdateSpaces<Environment, BraSite, Mpo, KetSite> && detail::EnvironmentStorageFor<OutputStorage, block_tensor_value_t<Environment>> | |
| auto | extend_right_environment (Environment const &environment, BraSite const &bra_site, Mpo const &mpo, KetSite const &ket_site) |
| Extend a right MPO environment across distinct bra and ket MPS sites. | |
| template<SparseBlockStorage OutputStorage = SeparateSparseBlockStorage<>, detail::EnvironmentMatrixView Environment, detail::EnvironmentMatrixView Site, detail::EnvironmentMpoView Mpo> | |
| auto | extend_right_environment (Environment const &environment, Site const &site, Mpo const &mpo) |
| Extend a right MPO environment using one site as both bra and ket. | |
| template<class IntermediateStorage , class ContractionSelector , detail::WritableRabcTensor Output, RabcPlan Plan, detail::ReadableRabcTensor A, detail::ReadableRabcTensor B, detail::ReadableRabcTensor C> requires detail::CompatibleRabcOperands<Output, Plan, A, B, C> | |
| consteval auto | kernel_accepts_types (RightFirstRabcBackend< IntermediateStorage, ContractionSelector > const &, rabc_contract_op const &, Output &, Plan const &, A const &, B const &, C const &) |
| Report right-first eligibility for matrix-block operands. | |
| template<class Hamiltonian > | |
| LocalTwoSiteEffectiveHamiltonian (Hamiltonian) -> LocalTwoSiteEffectiveHamiltonian< std::remove_cvref_t< Hamiltonian > > | |
| template<typename Value , SparseBlockStorage Storage = SeparateSparseBlockStorage<>> requires Scalar<Value> && detail::EnvironmentStorageFor<Storage, Value> | |
| auto | make_identity_mpo_environment (BlockSpace const &bond, LocalSpace const &auxiliary, std::size_t auxiliary_index) -> MpoEnvironment< Value, BlockSpace, LocalSpace, BlockSpace, Storage > |
| Construct an identity MPO environment at one scalar auxiliary state. | |
| template<typename Value , SparseBlockStorage Storage = SeparateSparseBlockStorage<>, class Context > requires Scalar<Value> && detail::EnvironmentStorageFor<Storage, Value> && requires( BlockSpace const& bond, LocalSpace const& auxiliary, std::vector<typename MpoEnvironment<Value, BlockSpace, LocalSpace, BlockSpace, Storage>::key_type> keys, Context& context) { MpoEnvironment<Value, BlockSpace, LocalSpace, BlockSpace, Storage>( uninitialized, bond.symmetry(), Domain{bond, auxiliary}, Codomain{bond}, std::move(keys), context); } | |
| auto | make_identity_mpo_environment (BlockSpace const &bond, LocalSpace const &auxiliary, std::size_t auxiliary_index, Context &context) -> MpoEnvironment< Value, BlockSpace, LocalSpace, BlockSpace, Storage > |
| Construct an identity MPO environment in an explicit leaf allocation context. | |
| template<detail::MpoEffectiveCenter Center, detail::MpoEffectiveEnvironment LeftEnvironment, detail::MpoEffectiveSite FirstMpo, detail::MpoEffectiveSite SecondMpo, detail::MpoEffectiveEnvironment RightEnvironment> requires detail::CompatibleMpoEffectiveScalars<Center, LeftEnvironment, FirstMpo, SecondMpo, RightEnvironment> | |
| auto | make_two_site_effective_hamiltonian (Center const &prototype, LeftEnvironment const &left_environment, FirstMpo const &first_mpo, SecondMpo const &second_mpo, RightEnvironment const &right_environment) |
| Compile a two-site effective Hamiltonian borrowing environment payloads. | |
| template<SparseBlockStorage OutputStorage = SeparateSparseBlockStorage<>, class Decomposition > requires detail::MpsSiteStorage<OutputStorage, typename Decomposition::scalar_type> | |
| auto | materialize_two_site_mps_split (Decomposition const &decomposition, BlockSvdSelection< typename Decomposition::real_type > const &selection, MpsSweepDirection direction, BlockSvdMaterializationOptions options={}) |
| Materialize selected SVD states as a directional pair of owning MPS sites. | |
| template<class MpsChain , class MpoChain > | |
| MpoEnvironmentCache (MpsChain const &, MpoChain const &, std::size_t, std::size_t) -> MpoEnvironmentCache< MpsChain, MpoChain > | |
| Deduce chain owner types while retaining the default environment storage. | |
| template<class MpsChain , class MpoChain , SparseBlockStorage EnvironmentStorage, class Measurements , BlockTensorStorage CenterStorage = typename MpsChain::storage_policy> requires detail::TwoSiteCenterStorageFor<CenterStorage, typename MpsChain::value_type> && performance::DurationMeasurementPolicy<Measurements, TwoSiteDmrgPerformanceEvent> | |
| auto | optimize_two_site_dmrg_bond (MpsChain &mps, MpoChain const &mpo, MpoEnvironmentCache< MpsChain, MpoChain, EnvironmentStorage > &cache, std::size_t first_site, MpsSweepDirection direction, TwoSiteDmrgOptions< make_real_t< typename MpsChain::value_type > > const &options, Measurements &measurements, CenterStorage center_storage={}) |
| Optimize and replace one adjacent MPS pair with a measured ground-state DMRG step. | |
| template<class MpsChain , class MpoChain , SparseBlockStorage EnvironmentStorage, BlockTensorStorage CenterStorage = typename MpsChain::storage_policy> requires detail::TwoSiteCenterStorageFor<CenterStorage, typename MpsChain::value_type> | |
| auto | optimize_two_site_dmrg_bond (MpsChain &mps, MpoChain const &mpo, MpoEnvironmentCache< MpsChain, MpoChain, EnvironmentStorage > &cache, std::size_t first_site, MpsSweepDirection direction, TwoSiteDmrgOptions< make_real_t< typename MpsChain::value_type > > const &options={}, CenterStorage center_storage={}) |
| Optimize and replace one adjacent MPS pair without performance measurements. | |
| template<class IntermediateStorage , class ContractionSelector , detail::WritableRabcTensor Output, RabcPlan Plan, detail::ReadableRabcTensor A, detail::ReadableRabcTensor B, detail::ReadableRabcTensor C> requires detail::CompatibleRabcOperands<Output, Plan, A, B, C> | |
| auto | prepare_rabc_contract (linalg::backend_list< RightFirstRabcBackend< IntermediateStorage, ContractionSelector > > selector, Output const &output, Plan plan, A const &a, B const &b, C const &c) |
| Prepare the single right-first backend selected for fixed R/A/B/C operands. | |
| template<detail::WritableRabcTensor Output, RabcPlan Plan, detail::ReadableRabcTensor A, detail::ReadableRabcTensor B, detail::ReadableRabcTensor C> requires detail::CompatibleRabcOperands<Output, Plan, A, B, C> | |
| auto | prepare_rabc_contract (Output const &output, Plan plan, A const &a, B const &b, C const &c) |
| Select and prepare the R/A/B/C backend for one fixed block structure. | |
| template<linalg::KernelBackendSelector BackendSelector, MutableBlockTensorView Output, RabcPlan Plan, BlockTensorView A, BlockTensorView B, BlockTensorView C> | |
| void | rabc_contract (BackendSelector &&selector, Output &output, Plan const &plan, A const &a, B const &b, C const &c) |
| Execute a fixed-output sparse R/A/B/C contraction with an explicit backend selector. | |
| template<MutableBlockTensorView Output, RabcPlan Plan, BlockTensorView A, BlockTensorView B, BlockTensorView C> | |
| void | rabc_contract (Output &output, Plan const &plan, A const &a, B const &b, C const &c) |
| Execute a sparse R/A/B/C contraction using the output storage policy. | |
| template<typename Scalar , Space Bond, Space Physical, BlockTensorStorage SiteStorage, class Decomposition > requires std::same_as<Bond, BlockSpace> && detail::MpsSiteStorage<SiteStorage, Scalar> | |
| auto | replace_two_site_from_svd (FiniteMps< Scalar, Bond, Physical, SiteStorage > &mps, std::size_t first_index, Decomposition const &decomposition, BlockSvdSelection< typename Decomposition::real_type > const &selection, MpsSweepDirection direction, BlockSvdMaterializationOptions options={}) |
| Materialize and install a selected two-site split in a finite MPS. | |
| template<class MpsChain , class MpoChain , SparseBlockStorage EnvironmentStorage, class Measurements , BlockTensorStorage CenterStorage = typename MpsChain::storage_policy> requires detail::TwoSiteCenterStorageFor<CenterStorage, typename MpsChain::value_type> && performance::DurationMeasurementPolicy<Measurements, TwoSiteDmrgPerformanceEvent> | |
| auto | run_two_site_dmrg (MpsChain &mps, MpoChain const &mpo, MpoEnvironmentCache< MpsChain, MpoChain, EnvironmentStorage > &cache, TwoSiteDmrgRunOptions< make_real_t< typename MpsChain::value_type > > const &options, Measurements &measurements, CenterStorage center_storage={}) |
| Run measured alternating directional sweeps until terminal-energy convergence. | |
| template<class MpsChain , class MpoChain , SparseBlockStorage EnvironmentStorage, BlockTensorStorage CenterStorage = typename MpsChain::storage_policy> requires detail::TwoSiteCenterStorageFor<CenterStorage, typename MpsChain::value_type> | |
| auto | run_two_site_dmrg (MpsChain &mps, MpoChain const &mpo, MpoEnvironmentCache< MpsChain, MpoChain, EnvironmentStorage > &cache, TwoSiteDmrgRunOptions< make_real_t< typename MpsChain::value_type > > const &options={}, CenterStorage center_storage={}) |
| Run alternating directional sweeps without performance measurements. | |
| template<class MpsChain , class MpoChain , SparseBlockStorage EnvironmentStorage, class Measurements , BlockTensorStorage CenterStorage = typename MpsChain::storage_policy> requires detail::TwoSiteCenterStorageFor<CenterStorage, typename MpsChain::value_type> && performance::DurationMeasurementPolicy<Measurements, TwoSiteDmrgPerformanceEvent> | |
| auto | sweep_two_site_dmrg (MpsChain &mps, MpoChain const &mpo, MpoEnvironmentCache< MpsChain, MpoChain, EnvironmentStorage > &cache, MpsSweepDirection direction, TwoSiteDmrgOptions< make_real_t< typename MpsChain::value_type > > const &options, Measurements &measurements, CenterStorage center_storage={}) |
| Traverse every adjacent bond once in one measured two-site DMRG direction. | |
| template<class MpsChain , class MpoChain , SparseBlockStorage EnvironmentStorage, BlockTensorStorage CenterStorage = typename MpsChain::storage_policy> requires detail::TwoSiteCenterStorageFor<CenterStorage, typename MpsChain::value_type> | |
| auto | sweep_two_site_dmrg (MpsChain &mps, MpoChain const &mpo, MpoEnvironmentCache< MpsChain, MpoChain, EnvironmentStorage > &cache, MpsSweepDirection direction, TwoSiteDmrgOptions< make_real_t< typename MpsChain::value_type > > const &options={}, CenterStorage center_storage={}) |
| Traverse every adjacent bond once without performance measurements. | |
| template<class IntermediateStorage , class ContractionSelector , detail::WritableRabcTensor Output, RabcPlan Plan, detail::ReadableRabcTensor A, detail::ReadableRabcTensor B, detail::ReadableRabcTensor C> requires detail::CompatibleRabcOperands<Output, Plan, A, B, C> && (detail::right_first_types_compatible<IntermediateStorage, ContractionSelector, Output, typename std::remove_cvref_t<Plan>::scalar_type, A, B, C>()) | |
| auto | try_kernel (RightFirstRabcBackend< IntermediateStorage, ContractionSelector > const &backend, rabc_contract_op const &, Output &output, Plan const &plan, A const &a, B const &b, C const &c) -> linalg::KernelAttempt |
| Execute a storage-domain right-first R/A/B/C contraction. | |
| constexpr auto | two_site_dmrg_performance_event_name (TwoSiteDmrgPerformanceEvent event) noexcept -> std::string_view |
| Return the stable display name of one DMRG performance event. | |
| template<class Center , class LeftEnvironment , class FirstMpo , class SecondMpo , class RightEnvironment > | |
| TwoSiteEffectiveHamiltonian (Center const &, LeftEnvironment, FirstMpo, SecondMpo, RightEnvironment) -> TwoSiteEffectiveHamiltonian< std::remove_cvref_t< Center >, std::remove_cvref_t< LeftEnvironment >, std::remove_cvref_t< FirstMpo >, std::remove_cvref_t< SecondMpo >, std::remove_cvref_t< RightEnvironment > > | |
Variables | |
| template<class T > | |
| constexpr bool | is_rabc_contraction_plan = false |
| template<uni20::RealOrComplex Scalar, class RKey , class AKey , class BKey , class CKey > | |
| constexpr bool | is_rabc_contraction_plan< RabcContractionPlan< Scalar, RKey, AKey, BKey, CKey > > = true |
| using uni20::tensor_network::DetailedTwoSiteDmrgPerformanceMeasurements = typedef performance::DetailedMeasurements<TwoSiteDmrgPerformanceEvent, static_cast<std::size_t>(TwoSiteDmrgPerformanceEvent::count)> |
Detailed DMRG measurements including per-sector block-SVD batch timings.
| using uni20::tensor_network::MpoEnvironment = typedef BlockTensor<Scalar, Domain<BraBond, Auxiliary>, Codomain<KetBond>, Storage> |
Left or right MPO environment with (bra bond, auxiliary, ket bond) key order.
| using uni20::tensor_network::MpoSite = typedef BlockTensor<Scalar, Domain<LeftAuxiliary, InputPhysical>, Codomain<RightAuxiliary, OutputPhysical>, Storage> |
One MPO site with input physical and left auxiliary domain factors.
| using uni20::tensor_network::MpsSite = typedef BlockTensor<Scalar, Domain<LeftBond, Physical>, Codomain<RightBond>, Storage> |
One MPS site with the physical factor on the domain side.
| using uni20::tensor_network::ScalarEnvironment = typedef BlockTensor<Scalar, Domain<>, Codomain<>, Storage> |
Rank-zero BlockTensor used for a scalar boundary environment.
| using uni20::tensor_network::TwoSiteCenter = typedef BlockTensor<Scalar, Domain<LeftBond, LeftPhysical, RightPhysical>, Codomain<RightBond>, Storage> |
Two adjacent MPS sites combined into one optimization center.
| using uni20::tensor_network::TwoSiteDmrgPerformanceMeasurements = typedef performance::DurationMeasurements<TwoSiteDmrgPerformanceEvent, static_cast<std::size_t>(TwoSiteDmrgPerformanceEvent::count)> |
Coarse inclusive wall-duration measurements for two-site DMRG phases.
| using uni20::tensor_network::TwoSiteLocalOperator = typedef BlockTensor<Scalar, Domain<Dual<LeftPhysical>, Dual<RightPhysical> >, Codomain<Dual<LeftPhysical>, Dual<RightPhysical> >, Storage> |
Charge-preserving operator acting on two adjacent physical spaces.
|
strong |
|
strong |
Stable phase identifiers for two-site DMRG performance measurements.
| auto uni20::tensor_network::decompose_two_site_center | ( | Center const & | center, |
| linalg::SvdOptions | options, | ||
| Measurements & | measurements, | ||
| Event | batch_event | ||
| ) |
Factorize a canonical two-site MPS center by its internal cut with performance measurements.
The input boundary is Domain<left bond, left physical, right physical> -> Codomain<right bond>. A zero-copy repartition presents the matrix boundary Domain<left bond, left physical> -> Codomain<right bond, Dual<right physical>> to the staged block-SVD implementation.
| center | Two-site center supported by the selected block-SVD implementation. |
| options | Dense SVD vector options applied independently by charge. |
| measurements | Explicit measurement policy or collector. |
| batch_event | Event identifying the per-charge factorization batch. |
| auto uni20::tensor_network::decompose_two_site_center | ( | Center const & | center, |
| linalg::SvdOptions | options = {} |
||
| ) |
Factorize a canonical two-site MPS center by its internal cut.
This ordinary overload instantiates no performance measurements.
| center | Two-site center supported by the selected block-SVD implementation. |
| options | Dense SVD vector options applied independently by charge. |
| auto uni20::tensor_network::dmrg_lanczos_ground_state | ( | Ops & | ops, |
| Vector const & | initial, | ||
| DmrgLanczosOptions< uni20::make_real_t< Scalar > > const & | options = {} |
||
| ) | -> DmrgLanczosResult<uni20::make_real_t<Scalar>, Vector> |
Perform a lightweight fixed-step Lanczos local ground-state update.
This is the DMRG local optimization policy, not a general convergence-seeking eigensolver. It uses the Hermitian three-term recurrence without full reorthogonalization, solves one small real tridiagonal projected problem, and always returns its smallest Ritz pair. Exact invariant-subspace breakdown may stop before the requested number of matvecs. The basis is limited by the problem dimension.
| std::invalid_argument | If the problem, initial vector, or iteration count is invalid. |
| std::runtime_error | If a complex projection has a non-negligible imaginary diagonal. |
| Scalar | Real or complex local wavefunction scalar with LAPACK coverage. |
| Vector | Opaque local wavefunction type. |
| Ops | Matrix-free vector and effective-Hamiltonian operations. |
| ops | Matrix-free operations for the fixed local problem. |
| initial | Current two-site wavefunction used as the starting vector. |
| options | Fixed local work policy. |
| auto uni20::tensor_network::extend_left_environment | ( | Environment const & | environment, |
| BraSite const & | bra_site, | ||
| Mpo const & | mpo, | ||
| KetSite const & | ket_site | ||
| ) |
Extend a left MPO environment across distinct bra and ket MPS sites.
Computes each reachable output block as a sparse sum of coefficient * conj(bra)^T * environment * ket contributions.
| OutputStorage | Sparse local storage selected for the result. |
| environment | Environment immediately to the left of the site. |
| bra_site | Bra MPS site whose left bond meets the environment. |
| mpo | MPO site whose left auxiliary meets the environment. |
| ket_site | Ket MPS site whose left bond meets the environment. |
| auto uni20::tensor_network::extend_left_environment | ( | Environment const & | environment, |
| Site const & | site, | ||
| Mpo const & | mpo | ||
| ) |
Extend a left MPO environment using one site as both bra and ket.
| environment | Environment immediately to the left of the site. |
| site | MPS site used as both bra and ket. |
| mpo | MPO site whose left auxiliary meets the environment. |
| auto uni20::tensor_network::extend_right_environment | ( | Environment const & | environment, |
| BraSite const & | bra_site, | ||
| Mpo const & | mpo, | ||
| KetSite const & | ket_site | ||
| ) |
Extend a right MPO environment across distinct bra and ket MPS sites.
Computes each reachable output block as a sparse sum of coefficient * conj(bra) * environment * ket^T contributions.
| OutputStorage | Sparse local storage selected for the result. |
| environment | Environment immediately to the right of the site. |
| bra_site | Bra MPS site whose right bond meets the environment. |
| mpo | MPO site whose right auxiliary meets the environment. |
| ket_site | Ket MPS site whose right bond meets the environment. |
| auto uni20::tensor_network::extend_right_environment | ( | Environment const & | environment, |
| Site const & | site, | ||
| Mpo const & | mpo | ||
| ) |
Extend a right MPO environment using one site as both bra and ket.
| environment | Environment immediately to the right of the site. |
| site | MPS site used as both bra and ket. |
| mpo | MPO site whose right auxiliary meets the environment. |
| consteval auto uni20::tensor_network::kernel_accepts_types | ( | RightFirstRabcBackend< IntermediateStorage, ContractionSelector > const & | , |
| rabc_contract_op const & | , | ||
| Output & | , | ||
| Plan const & | , | ||
| A const & | , | ||
| B const & | , | ||
| C const & | |||
| ) |
Report right-first eligibility for matrix-block operands.
| uni20::tensor_network::LocalTwoSiteEffectiveHamiltonian | ( | Hamiltonian | ) | -> LocalTwoSiteEffectiveHamiltonian< std::remove_cvref_t< Hamiltonian > > |
| auto uni20::tensor_network::make_identity_mpo_environment | ( | BlockSpace const & | bond, |
| LocalSpace const & | auxiliary, | ||
| std::size_t | auxiliary_index | ||
| ) | -> MpoEnvironment<Value, BlockSpace, LocalSpace, BlockSpace, Storage> |
Construct an identity MPO environment at one scalar auxiliary state.
One identity matrix block is stored for every bond sector. The environment key order is (bra bond, auxiliary, ket bond).
| Value | Scalar element type. |
| Storage | Sparse local storage selected for the result. |
| bond | Exact bra and ket bond space. |
| auxiliary | MPO boundary auxiliary space. |
| auxiliary_index | Identity-charge auxiliary state to activate. |
| std::invalid_argument | If symmetries differ, the index is invalid, or the selected auxiliary state is not the identity charge. |
| auto uni20::tensor_network::make_identity_mpo_environment | ( | BlockSpace const & | bond, |
| LocalSpace const & | auxiliary, | ||
| std::size_t | auxiliary_index, | ||
| Context & | context | ||
| ) | -> MpoEnvironment<Value, BlockSpace, LocalSpace, BlockSpace, Storage> |
Construct an identity MPO environment in an explicit leaf allocation context.
| Context | Leaf allocation context accepted by the selected storage. |
| bond | Exact bra and ket bond space. |
| auxiliary | MPO boundary auxiliary space. |
| auxiliary_index | Identity-charge auxiliary state to activate. |
| context | Allocation context retained by the result storage. |
context. | std::invalid_argument | If symmetries differ, the index is invalid, or the selected auxiliary state is not the identity charge. |
| auto uni20::tensor_network::make_two_site_effective_hamiltonian | ( | Center const & | prototype, |
| LeftEnvironment const & | left_environment, | ||
| FirstMpo const & | first_mpo, | ||
| SecondMpo const & | second_mpo, | ||
| RightEnvironment const & | right_environment | ||
| ) |
Compile a two-site effective Hamiltonian borrowing environment payloads.
The returned operation retains identity mapped views by value, so keys, boundaries, and block descriptors are not borrowed from temporary view objects. Environment payload owners must outlive the returned operation. MPO coefficients are snapshotted into the sparse f plan and the MPO payloads are not retained.
| prototype | Center value whose exact boundary and stored keys define the vector space. |
| left_environment | Left environment payload owner. |
| first_mpo | Left MPO site compiled into the sparse coefficient plan. |
| second_mpo | Right MPO site compiled into the sparse coefficient plan. |
| right_environment | Right environment payload owner. |
f plan. | auto uni20::tensor_network::materialize_two_site_mps_split | ( | Decomposition const & | decomposition, |
| BlockSvdSelection< typename Decomposition::real_type > const & | selection, | ||
| MpsSweepDirection | direction, | ||
| BlockSvdMaterializationOptions | options = {} |
||
| ) |
Materialize selected SVD states as a directional pair of owning MPS sites.
Uni20 reconstructs the repartitioned center as right_singular_vectors_adjoint * singular_values * left_singular_vectors. A left-to-right split absorbs the singular values into the second site; a right-to-left split absorbs them into the first site.
| OutputStorage | Sparse local storage for both returned sites. |
| decomposition | Reusable decomposition from decompose_two_site_center(). |
| selection | Nonempty selected singular-state set. |
| direction | Side that receives the singular values. |
| options | Selected bond label and materialization options. |
| std::invalid_argument | If the selection is empty or the sweep direction is invalid. |
| uni20::tensor_network::MpoEnvironmentCache | ( | MpsChain const & | , |
| MpoChain const & | , | ||
| std::size_t | , | ||
| std::size_t | |||
| ) | -> MpoEnvironmentCache< MpsChain, MpoChain > |
Deduce chain owner types while retaining the default environment storage.
| auto uni20::tensor_network::optimize_two_site_dmrg_bond | ( | MpsChain & | mps, |
| MpoChain const & | mpo, | ||
| MpoEnvironmentCache< MpsChain, MpoChain, EnvironmentStorage > & | cache, | ||
| std::size_t | first_site, | ||
| MpsSweepDirection | direction, | ||
| TwoSiteDmrgOptions< make_real_t< typename MpsChain::value_type > > const & | options, | ||
| Measurements & | measurements, | ||
| CenterStorage | center_storage = {} |
||
| ) |
Optimize and replace one adjacent MPS pair with a measured ground-state DMRG step.
The operation forms the current two-site center, obtains the two reusable environments outside the pair, solves the fixed sparse effective Hamiltonian, performs staged block-SVD truncation, and installs the directional split. The existing internal-bond label is preserved. After replacement, only the completed-side environment needed by the next step is rebuilt.
| std::invalid_argument | If the pair, cache, direction, or options are invalid. |
| MpsChain | Concrete finite MPS owner type. |
| MpoChain | Concrete finite MPO owner type. |
| EnvironmentStorage | Sparse local storage used by the cache. |
| Measurements | Compile-time-selected performance measurement policy. |
| CenterStorage | Local ordinary-block storage used by the transient center and Krylov vectors. |
| mps | Mutable MPS whose selected pair is replaced by the fixed-work local update. |
| mpo | Immutable MPO defining the effective Hamiltonian. |
| cache | Environment cache attached to exactly mps and mpo. |
| first_site | Index of the left site in the active pair. |
| direction | Direction in which the canonical center moves. |
| options | Fixed-work local solve and global SVD-truncation policies. |
| measurements | Explicit performance measurement policy or collector. |
| center_storage | Stateless policy tag selecting center allocation and block execution. |
| auto uni20::tensor_network::optimize_two_site_dmrg_bond | ( | MpsChain & | mps, |
| MpoChain const & | mpo, | ||
| MpoEnvironmentCache< MpsChain, MpoChain, EnvironmentStorage > & | cache, | ||
| std::size_t | first_site, | ||
| MpsSweepDirection | direction, | ||
| TwoSiteDmrgOptions< make_real_t< typename MpsChain::value_type > > const & | options = {}, |
||
| CenterStorage | center_storage = {} |
||
| ) |
Optimize and replace one adjacent MPS pair without performance measurements.
| auto uni20::tensor_network::prepare_rabc_contract | ( | linalg::backend_list< RightFirstRabcBackend< IntermediateStorage, ContractionSelector > > | selector, |
| Output const & | output, | ||
| Plan | plan, | ||
| A const & | a, | ||
| B const & | b, | ||
| C const & | c | ||
| ) |
Prepare the single right-first backend selected for fixed R/A/B/C operands.
Preparation validates the fixed block structures, derives the backend-specific schedule, and allocates reusable intermediate storage. This overload intentionally accepts the currently supported one-entry prepared selector; future backend lists must define how preparation chooses and retains one accepted backend.
| selector | Selected R/A/B/C backend and nested dense selector. |
| output | Prototype fixed output structure. |
| plan | Execution-neutral coefficient plan transferred into the executor. |
| a | Prototype left block family. |
| b | Prototype center block family. |
| c | Prototype right block family. |
| auto uni20::tensor_network::prepare_rabc_contract | ( | Output const & | output, |
| Plan | plan, | ||
| A const & | a, | ||
| B const & | b, | ||
| C const & | c | ||
| ) |
Select and prepare the R/A/B/C backend for one fixed block structure.
| output | Prototype fixed output structure and storage policy. |
| plan | Execution-neutral coefficient plan transferred into the executor. |
| a | Prototype left block family. |
| b | Prototype center block family. |
| c | Prototype right block family. |
| void uni20::tensor_network::rabc_contract | ( | BackendSelector && | selector, |
| Output & | output, | ||
| Plan const & | plan, | ||
| A const & | a, | ||
| B const & | b, | ||
| C const & | c | ||
| ) |
Execute a fixed-output sparse R/A/B/C contraction with an explicit backend selector.
Computes R_r = sum(f(r,a,b,c) A_a B_b transpose(C_c)). The sparse plan contains only mathematical coefficients and block keys. The selected backend resolves keys to storage bindings and chooses contraction order, intermediate reuse, placement, and communication. Stored output blocks with no contributing term are overwritten with zero.
| BackendSelector | Explicit R/A/B/C backend selector. |
| selector | Ordered backend selector. |
| output | Existing fixed-structure R block family. |
| plan | Immutable sparse coefficient tensor f. |
| a | Left environment block family. |
| b | Input center block family. |
| c | Right environment block family, stored before transposition. |
| void uni20::tensor_network::rabc_contract | ( | Output & | output, |
| Plan const & | plan, | ||
| A const & | a, | ||
| B const & | b, | ||
| C const & | c | ||
| ) |
Execute a sparse R/A/B/C contraction using the output storage policy.
Backend selection occurs while output storage and execution policy remain available. Input placement remains visible to the selected backend through the fixed block-tensor views.
| auto uni20::tensor_network::replace_two_site_from_svd | ( | FiniteMps< Scalar, Bond, Physical, SiteStorage > & | mps, |
| std::size_t | first_index, | ||
| Decomposition const & | decomposition, | ||
| BlockSvdSelection< typename Decomposition::real_type > const & | selection, | ||
| MpsSweepDirection | direction, | ||
| BlockSvdMaterializationOptions | options = {} |
||
| ) |
Materialize and install a selected two-site split in a finite MPS.
Both replacement sites are constructed before FiniteMps::replace_pair() validates and changes the chain. The returned diagonal tensor records the selected Schmidt spectrum even though its values have been absorbed into one installed site.
| mps | Finite MPS receiving the replacement pair. |
| first_index | Index of the left site in the pair. |
| decomposition | Reusable two-site decomposition. |
| selection | Nonempty selected singular-state set. |
| direction | Sweep direction controlling singular-value absorption. |
| options | Selected internal-bond label. |
| auto uni20::tensor_network::run_two_site_dmrg | ( | MpsChain & | mps, |
| MpoChain const & | mpo, | ||
| MpoEnvironmentCache< MpsChain, MpoChain, EnvironmentStorage > & | cache, | ||
| TwoSiteDmrgRunOptions< make_real_t< typename MpsChain::value_type > > const & | options, | ||
| Measurements & | measurements, | ||
| CenterStorage | center_storage = {} |
||
| ) |
Run measured alternating directional sweeps until terminal-energy convergence.
The terminal local Ritz value is treated as the installed global state energy only when the terminal split has zero discarded weight. Convergence compares two consecutive such terminal energies. An invalid terminal energy clears the comparison state, so provisional local values never stop the run. Per-bond installed spectra are summarized and released after each traversal.
| std::invalid_argument | If the chain, cache, or options are invalid. |
| MpsChain | Concrete finite MPS owner type. |
| MpoChain | Concrete finite MPO owner type. |
| EnvironmentStorage | Sparse local storage used by the cache. |
| Measurements | Compile-time-selected performance measurement policy. |
| CenterStorage | Local ordinary-block storage used by the transient center and Krylov vectors. |
| mps | Mutable finite MPS, initially canonical for the first direction. |
| mpo | Immutable finite MPO. |
| cache | Environment cache attached to both chain objects. |
| options | Run, local-solve, and truncation policies. |
| measurements | Explicit performance measurement policy or collector. |
| center_storage | Stateless policy tag selecting center allocation and block execution. |
| auto uni20::tensor_network::run_two_site_dmrg | ( | MpsChain & | mps, |
| MpoChain const & | mpo, | ||
| MpoEnvironmentCache< MpsChain, MpoChain, EnvironmentStorage > & | cache, | ||
| TwoSiteDmrgRunOptions< make_real_t< typename MpsChain::value_type > > const & | options = {}, |
||
| CenterStorage | center_storage = {} |
||
| ) |
Run alternating directional sweeps without performance measurements.
| auto uni20::tensor_network::sweep_two_site_dmrg | ( | MpsChain & | mps, |
| MpoChain const & | mpo, | ||
| MpoEnvironmentCache< MpsChain, MpoChain, EnvironmentStorage > & | cache, | ||
| MpsSweepDirection | direction, | ||
| TwoSiteDmrgOptions< make_real_t< typename MpsChain::value_type > > const & | options, | ||
| Measurements & | measurements, | ||
| CenterStorage | center_storage = {} |
||
| ) |
Traverse every adjacent bond once in one measured two-site DMRG direction.
A left-to-right sweep visits 0 ... L-2; a right-to-left sweep visits L-2 ... 0. Each step leaves the environment on its completed side ready for the next pair.
| std::invalid_argument | If the chain has fewer than two sites or the direction is invalid. |
| MpsChain | Concrete finite MPS owner type. |
| MpoChain | Concrete finite MPO owner type. |
| EnvironmentStorage | Sparse local storage used by the cache. |
| Measurements | Compile-time-selected performance measurement policy. |
| CenterStorage | Local ordinary-block storage used by the transient center and Krylov vectors. |
| mps | Mutable finite MPS. |
| mpo | Immutable finite MPO. |
| cache | Environment cache attached to both chain objects. |
| direction | Traversal and singular-value absorption direction. |
| options | Shared local-solve and truncation policies for the sweep. |
| measurements | Explicit performance measurement policy or collector. |
| center_storage | Stateless policy tag selecting center allocation and block execution. |
| auto uni20::tensor_network::sweep_two_site_dmrg | ( | MpsChain & | mps, |
| MpoChain const & | mpo, | ||
| MpoEnvironmentCache< MpsChain, MpoChain, EnvironmentStorage > & | cache, | ||
| MpsSweepDirection | direction, | ||
| TwoSiteDmrgOptions< make_real_t< typename MpsChain::value_type > > const & | options = {}, |
||
| CenterStorage | center_storage = {} |
||
| ) |
Traverse every adjacent bond once without performance measurements.
| auto uni20::tensor_network::try_kernel | ( | RightFirstRabcBackend< IntermediateStorage, ContractionSelector > const & | backend, |
| rabc_contract_op const & | , | ||
| Output & | output, | ||
| Plan const & | plan, | ||
| A const & | a, | ||
| B const & | b, | ||
| C const & | c | ||
| ) | -> linalg::KernelAttempt |
Execute a storage-domain right-first R/A/B/C contraction.
|
constexprnoexcept |
Return the stable display name of one DMRG performance event.
event is not TwoSiteDmrgPerformanceEvent::count. | event | Event identifier to name. |
| uni20::tensor_network::TwoSiteEffectiveHamiltonian | ( | Center const & | , |
| LeftEnvironment | , | ||
| FirstMpo | , | ||
| SecondMpo | , | ||
| RightEnvironment | |||
| ) | -> TwoSiteEffectiveHamiltonian< std::remove_cvref_t< Center >, std::remove_cvref_t< LeftEnvironment >, std::remove_cvref_t< FirstMpo >, std::remove_cvref_t< SecondMpo >, std::remove_cvref_t< RightEnvironment > > |
|
inlineconstexpr |
|
inlineconstexpr |