symop.ccr.algebra.density.apply_left¶
Left-application of operator words to density polynomials.
A density polynomial is a finite linear combination of terms
where each term stores a complex coefficient c_k and two normally-ordered
monomials (left=L_k, right=R_k).
This module provides the symbolic action of an operator word \(W = \hat o_1 \hat o_2 \cdots \hat o_L\) on the left:
For each term, the product \(W L_k\) is expanded and normal-ordered using
commutation relations via expand_word_times_monomial().
Each expansion contribution updates the term’s left monomial and coefficient,
while keeping the right monomial unchanged.
Functions
|
Apply an operator word on the left of a density polynomial. |
- apply_left(terms: tuple[DensityTerm, ...], word: Iterable[LadderOp]) tuple[DensityTerm, ...]¶
Apply an operator word on the left of a density polynomial.
For each density term
t, this function expands the productword * t.leftinto a linear combination of normally-ordered monomials viaexpand_word_times_monomial().Each expanded ket-term
ktcontributes a density term with:coeff = t.coeff * kt.coeffleft = kt.monomialright = t.right(unchanged)
All contributions from all input terms are concatenated and then merged using
combine_like_terms_density().- Parameters:
terms (
tuple[DensityTerm,...]) – Input density polynomial terms.word (
Iterable[LadderOp]) – Iterable of ladder operators forming the operator product applied on the left of each term’s left monomial.
- Returns:
Output density polynomial terms after left application and combination.
- Return type:
tuple[DensityTerm, …]
Notes
This is purely symbolic. Normal ordering is performed using commutation relations inside
expand_word_times_monomial.