symop.ccr.algebra.ket.identity_coeff¶
Identity-coefficient extraction for CCR ket expansions.
This module provides helpers to extract the scalar (identity) component from a normally ordered ket-term expansion.
Given
the identity coefficient corresponds to the term where
i.e. the monomial has no creation or annihilation operators.
This scalar term typically arises from commutator contractions in normal ordering and represents the c-number component of the expansion.
Functions
|
Return the coefficient of the identity monomial. |
- identity_coeff(terms: tuple[KetTerm, ...]) complex¶
Return the coefficient of the identity monomial.
- Parameters:
terms (
tuple[KetTerm,...]) – Tuple of ket terms forming a normally ordered expansion.- Returns:
The coefficient associated with the identity monomial (no creators and no annihilators). Returns
0.0 + 0.0jif no identity term is present.- Return type:
Notes
The identity term represents the scalar contribution of an operator expansion after commutator contractions.
If multiple identity terms exist (which should not occur after canonicalization), the first match is returned.