feynlag.vacuum.diagonalize.diagonalize_svd¶
- feynlag.vacuum.diagonalize.diagonalize_svd(M, left_fields, right_fields, new_left, new_right, method='auto', dps=50)[source]¶
Singular-value decomposition for a Dirac mass matrix.
Finds rotations
new = R·oldwithR_L M R_R† = diag(m_i ≥ 0)(rows ofM= left/bar legs, columns = right legs; for real orthogonalR_Rthis isR_L M R_Rᵀ). The bar legs rotate withR*— useRotation.bar()to build that rotation.- Parameters:
method –
"symbolic"diagonalizesM Mᵀ/Mᵀ Mexactly through SymPy (realMonly; it raises on an explicitI) and returns orthogonal rotations, right-handed rows sign-fixed so the masses are non-negative."numeric"uses mpmath’s complex SVD atdpsdigits, returns unitary rotations and orders the rows by increasing mass; it needs a square matrix without free symbols."auto"(default) is numeric for a numeric matrix that is complex, floating-point or larger than 2×2 and symbolic otherwise — the exact route stalls on a genericN > 2matrix and cannot represent a complex one.dps – working precision of the numeric route (a quark-mass hierarchy spans ~5 orders of magnitude, so keep it well above double).
- Returns:
(rot_left, rot_right)Rotationobjects (ψ_L → R_L ψ_L,ψ_R → R_R ψ_R).