triqs_modest.embedding.Embedding.replace_imp

Embedding.replace_imp()

Dispatched C++ function(s).

[1] (imp_idx_old: int, imp_idx_new: int)
  -> Embedding

Redirect all \(\psi\) entries from one impurity to another.

Rewires every \((\alpha, \sigma)\) that currently points to imp_idx_old so that it points to imp_idx_new instead. The impurity at imp_idx_old remains in the embedding but becomes dangling — no \(\alpha\) block maps to it any longer. Call drop_imp(imp_idx_old) afterwards to remove the dangling entry and compact the indices.

Parameters:
imp_idx_oldint

The impurity whose \(\alpha\) connections are redirected.

imp_idx_newint

The impurity that will receive those connections.

Returns:
Embedding

New embedding with the updated \(\psi\) map (dangling impurity retained).