|
Uni20
Asynchronous tensor and runtime library.
|
Matrix-free two-site Hamiltonian compiled from environments and MPO sites. More...
#include <two_site_effective_hamiltonian.hpp>
Public Types | |
| using | center_type = std::remove_cvref_t< Center > |
| using | codomain_type = block_tensor_codomain_t< center_type > |
| using | domain_type = block_tensor_domain_t< center_type > |
| using | first_mpo_type = std::remove_cvref_t< FirstMpo > |
| using | key_type = block_tensor_key_t< center_type > |
| using | left_environment_type = std::remove_cvref_t< LeftEnvironment > |
| using | plan_type = RabcContractionPlan< scalar_type, key_type, block_tensor_key_t< left_environment_type >, key_type, block_tensor_key_t< right_environment_type > > |
| using | right_environment_type = std::remove_cvref_t< RightEnvironment > |
| using | scalar_type = block_tensor_value_t< center_type > |
| using | second_mpo_type = std::remove_cvref_t< SecondMpo > |
Public Member Functions | |
| template<MutableBlockTensorView Output, detail::MpoEffectiveCenter Input> requires detail::CompatibleTwoSiteCenters<Output, Input> && std::same_as<block_tensor_value_t<Output>, scalar_type> && std::same_as<block_tensor_key_t<Output>, key_type> && std::same_as<block_tensor_domain_t<Output>, domain_type> && std::same_as<block_tensor_codomain_t<Output>, codomain_type> | |
| void | operator() (Output &output, Input const &input) |
| Overwrite a compatible fixed center with one planned Hamiltonian apply. | |
| auto | plan () const noexcept -> plan_type const & |
| Return the immutable sparse coefficient plan used by the prepared backend. | |
| auto | prepared_intermediate_count () const noexcept -> std::size_t |
| Return the number of retained right-first intermediate blocks. | |
| auto | term_count () const noexcept -> std::size_t |
| Return the number of compiled logical R/A/B/C contributions. | |
| TwoSiteEffectiveHamiltonian (center_type const &prototype, left_environment_type left_environment, first_mpo_type first_mpo, second_mpo_type second_mpo, right_environment_type right_environment) | |
| Compile one fixed-center sparse effective-Hamiltonian plan. | |
Matrix-free two-site Hamiltonian compiled from environments and MPO sites.
Construction joins the stored logical keys of the left environment, two adjacent MPO sites, and right environment into an immutable sparse R/A/B/C term plan for one fixed center structure and snapshots their scalar coefficients into an immutable sparse f(r,a,b,c) tensor. Construction also selects and prepares the current R/A/B/C backend so repeated applications reuse its schedule and intermediate workspace. No whole-center dense projection or high-rank BlockTensor intermediate is formed. The two environments are retained by value. If either is a borrowed view, its ultimate payload owner must outlive this operation object.
| Center | Fixed two-site center structure used to compile block ordinals. |
| LeftEnvironment | Left (bra bond, auxiliary, ket bond) environment. |
| FirstMpo | Left MPO site with (left auxiliary, ket, right auxiliary, bra) key order. |
| SecondMpo | Right MPO site with the same key convention. |
| RightEnvironment | Right (bra bond, auxiliary, ket bond) environment. |
| using uni20::tensor_network::TwoSiteEffectiveHamiltonian< Center, LeftEnvironment, FirstMpo, SecondMpo, RightEnvironment >::center_type = std::remove_cvref_t<Center> |
| using uni20::tensor_network::TwoSiteEffectiveHamiltonian< Center, LeftEnvironment, FirstMpo, SecondMpo, RightEnvironment >::codomain_type = block_tensor_codomain_t<center_type> |
| using uni20::tensor_network::TwoSiteEffectiveHamiltonian< Center, LeftEnvironment, FirstMpo, SecondMpo, RightEnvironment >::domain_type = block_tensor_domain_t<center_type> |
| using uni20::tensor_network::TwoSiteEffectiveHamiltonian< Center, LeftEnvironment, FirstMpo, SecondMpo, RightEnvironment >::first_mpo_type = std::remove_cvref_t<FirstMpo> |
| using uni20::tensor_network::TwoSiteEffectiveHamiltonian< Center, LeftEnvironment, FirstMpo, SecondMpo, RightEnvironment >::key_type = block_tensor_key_t<center_type> |
| using uni20::tensor_network::TwoSiteEffectiveHamiltonian< Center, LeftEnvironment, FirstMpo, SecondMpo, RightEnvironment >::left_environment_type = std::remove_cvref_t<LeftEnvironment> |
| using uni20::tensor_network::TwoSiteEffectiveHamiltonian< Center, LeftEnvironment, FirstMpo, SecondMpo, RightEnvironment >::plan_type = RabcContractionPlan<scalar_type, key_type, block_tensor_key_t<left_environment_type>, key_type, block_tensor_key_t<right_environment_type> > |
| using uni20::tensor_network::TwoSiteEffectiveHamiltonian< Center, LeftEnvironment, FirstMpo, SecondMpo, RightEnvironment >::right_environment_type = std::remove_cvref_t<RightEnvironment> |
| using uni20::tensor_network::TwoSiteEffectiveHamiltonian< Center, LeftEnvironment, FirstMpo, SecondMpo, RightEnvironment >::scalar_type = block_tensor_value_t<center_type> |
| using uni20::tensor_network::TwoSiteEffectiveHamiltonian< Center, LeftEnvironment, FirstMpo, SecondMpo, RightEnvironment >::second_mpo_type = std::remove_cvref_t<SecondMpo> |
|
inline |
Compile one fixed-center sparse effective-Hamiltonian plan.
| prototype | Center value whose exact boundary and stored keys define the vector space. |
| left_environment | Left environment retained by value. |
| first_mpo | Left MPO site whose coefficients are compiled into f. |
| second_mpo | Right MPO site whose coefficients are compiled into f. |
| right_environment | Right environment retained by value. |
| std::invalid_argument | If spaces are incompatible or the center stored pattern is not closed under the represented Hamiltonian. |
|
inline |
Overwrite a compatible fixed center with one planned Hamiltonian apply.
The sparse R/A/B/C kernel backend owns contraction ordering, intermediate reuse, batching, placement, and communication.
|
inlinenoexcept |
Return the immutable sparse coefficient plan used by the prepared backend.
|
inlinenoexcept |
Return the number of retained right-first intermediate blocks.
|
inlinenoexcept |
Return the number of compiled logical R/A/B/C contributions.