symop.ccr.algebra.density.apply_right¶
Right-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 right:
Operationally, right-action is implemented using the identity
which, at the level of symbolic normal ordering, can be computed by expanding the left action of the reversed daggered word on the right monomial.
Concretely we form
and expand \(W_{\mathrm{dag}} \cdot R_k\) via the normal-ordering engine.
Functions
|
Apply an operator word on the right of a density polynomial. |
- apply_right(terms: tuple[DensityTerm, ...], word: Iterable[LadderOp]) tuple[DensityTerm, ...]¶
Apply an operator word on the right of a density polynomial.
For each density term
t, this function computes the symbolic right action by expanding the left action of the reversed, daggered word on the right monomial:form
dag_word = reversed(word)with each operator daggeredexpand
dag_word * t.rightviaexpand_word_times_monomial()
Each expanded ket-term
ktcontributes an output density term with:coeff = t.coeff * kt.coeffleft = t.left(unchanged)right = kt.monomial
All contributions are concatenated and then canonicalized 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 right.
- Returns:
Output density polynomial terms after right application and combination.
- Return type:
tuple[DensityTerm, …]
Notes
This is purely symbolic. Normal ordering is performed using commutation relations inside
expand_word_times_monomial.