pytc.solver.bug_core.truncate_sym¶
- pytc.solver.bug_core.truncate_sym(M, tau, rmin=1, max_rank=None, rule='relative', energy_metric=None, dense_core='device')[source]¶
Tolerance-truncate a symmetric core
M.rulesets whattaubounds:'relative'keeps|s| > tau*max|s|,'absolute'keeps|s| > tau, and'energy'keeps the modes whose energy share|e_i|exceedstau(Hartree), wheree_i = s_i w_i^T G w_iforG = energy_metricso that the energy issum_i e_i. An absolute cut is the same in every system, so its error is extensive and cancels in energy differences; a relative one moves with each system’s largest amplitude.dense_corepicks where the eigendecomposition runs (run_dense()).Returns
(W, s, info): the retained eigenvectors (the caller formsU_new = U_aug @ W), the retained eigenvalues, andTruncInfo.- Parameters:
tau (float)
rmin (int)
max_rank (int | None)
rule (str)
dense_core (Literal['device', 'host'])