triqs_modest.embedding.Embedding.merge_embed_block_by_imp

Embedding.merge_embed_block_by_imp

Merge consecutive \(\alpha\) blocks belonging to the same impurity into a single block.

Merges consecutive \(\alpha\) blocks that belong to the same atom into a single block. Atom boundaries are detected by monitoring the \(\gamma\) index: within one atom the \(\gamma\) values are strictly increasing; when \(\gamma\) resets or the impurity index changes a new group is started. Disconnected blocks (imp_idx == -1) are never merged and pass through unchanged.