|
Uni20
Asynchronous tensor and runtime library.
|
Immutable sparse coefficient tensor for an R/A/B/C contraction. More...
#include <rabc_contraction_plan.hpp>
Public Types | |
| using | a_key_type = AKey |
| using | b_key_type = BKey |
| using | c_key_type = CKey |
| using | r_key_type = RKey |
| using | scalar_type = Scalar |
| using | term_type = RabcTerm< scalar_type > |
Public Member Functions | |
| auto | a_keys () const noexcept -> std::span< a_key_type const > |
| Return left-environment logical keys addressed by term indices. | |
| auto | b_keys () const noexcept -> std::span< b_key_type const > |
| Return input-center logical keys addressed by term indices. | |
| auto | c_keys () const noexcept -> std::span< c_key_type const > |
| Return right-environment logical keys addressed by term indices. | |
| auto | r_keys () const noexcept -> std::span< r_key_type const > |
| Return output logical keys addressed by term indices. | |
| RabcContractionPlan ()=default | |
| Construct an empty sparse coefficient plan. | |
| RabcContractionPlan (std::vector< r_key_type > r_keys, std::vector< a_key_type > a_keys, std::vector< b_key_type > b_keys, std::vector< c_key_type > c_keys, std::vector< term_type > terms) | |
| Retain logical key tables and canonicalize sparse coefficients. | |
| auto | term_count () const noexcept -> std::size_t |
| Return the number of canonical nonzero terms. | |
| auto | terms () const noexcept -> std::span< term_type const > |
| Return the canonical nonzero terms. | |
Immutable sparse coefficient tensor for an R/A/B/C contraction.
The four sorted key tables provide logical block identity relative to the symmetry and boundaries for which the caller constructs the plan. Terms index those tables and are canonicalized by (r,a,b,c); duplicate coefficients are summed and exact zeros are omitted. Storage ordinals and placement are resolved only during backend preparation. The plan contains no left-first, right-first, placement, or communication decisions. Binding a plan to operands with different symmetry or boundary semantics violates the contraction precondition; the plan deliberately does not retain or compare that metadata at runtime.
| Scalar | Real or complex coefficient type. |
| RKey | Output logical block-key type. |
| AKey | Left-environment logical block-key type. |
| BKey | Input-center logical block-key type. |
| CKey | Right-environment logical block-key type. |
| using uni20::tensor_network::RabcContractionPlan< Scalar, RKey, AKey, BKey, CKey >::a_key_type = AKey |
| using uni20::tensor_network::RabcContractionPlan< Scalar, RKey, AKey, BKey, CKey >::b_key_type = BKey |
| using uni20::tensor_network::RabcContractionPlan< Scalar, RKey, AKey, BKey, CKey >::c_key_type = CKey |
| using uni20::tensor_network::RabcContractionPlan< Scalar, RKey, AKey, BKey, CKey >::r_key_type = RKey |
| using uni20::tensor_network::RabcContractionPlan< Scalar, RKey, AKey, BKey, CKey >::scalar_type = Scalar |
| using uni20::tensor_network::RabcContractionPlan< Scalar, RKey, AKey, BKey, CKey >::term_type = RabcTerm<scalar_type> |
|
default |
Construct an empty sparse coefficient plan.
|
inline |
Retain logical key tables and canonicalize sparse coefficients.
| r_keys | Sorted unique output logical keys. |
| a_keys | Sorted unique left-environment logical keys. |
| b_keys | Sorted unique input-center logical keys. |
| c_keys | Sorted unique right-environment logical keys. |
| terms | Possibly unordered terms with possible duplicate coordinates. |
|
inlinenoexcept |
Return left-environment logical keys addressed by term indices.
|
inlinenoexcept |
Return input-center logical keys addressed by term indices.
|
inlinenoexcept |
Return right-environment logical keys addressed by term indices.
|
inlinenoexcept |
Return output logical keys addressed by term indices.
|
inlinenoexcept |
Return the number of canonical nonzero terms.
|
inlinenoexcept |
Return the canonical nonzero terms.