Skip to main content

compose_exclusive_linear_operators

Function compose_exclusive_linear_operators 

Source
pub fn compose_exclusive_linear_operators<T, V>(
    target: &SiteIndexNetwork<V, T::Index>,
    operators: &[&LinearOperator<T, V>],
    gap_site_indices: &HashMap<V, Vec<(T::Index, T::Index)>>,
) -> Result<LinearOperator<T, V>>
where T: TensorLike, T::Index: IndexLike + Clone + Hash + Eq + Debug, <T::Index as IndexLike>::Id: Clone + Hash + Eq + Ord + Debug + Send + Sync, V: Clone + Hash + Eq + Ord + Send + Sync + Debug,
Expand description

Compose exclusive LinearOperators into a single LinearOperator.

This function takes multiple non-overlapping operators and combines them into a single operator that acts on the full target space. Gap positions (nodes not covered by any operator) are filled with identity operators using T::delta().

§Arguments

  • target - The full site index network (defines the output structure)
  • operators - Non-overlapping LinearOperators to compose
  • gap_site_indices - Site indices for gap nodes: node_name -> [(input_index, output_index), …]

§Returns

A LinearOperator representing the composed operator on the full target space.

§Errors

Returns an error if:

  • Operators are not exclusive (overlapping)
  • Operator nodes don’t exist in target
  • Gap node site indices not provided