symop.ccr.algebra.density.expand_monomial_times_word

Expansion of a monomial multiplied by an operator word.

This module provides a helper for symbolic normal ordering of products

\[\hat{M} \cdot W,\]

where \(\hat{M}\) is a normally-ordered monomial in ladder operators and \(W\) is an operator word (an ordered sequence of ladder operators).

The result is returned as a list of ket terms representing the normally-ordered expansion of \(\hat{M} W\).

Functions

expand_monomial_times_word(M, word)

Expand a monomial multiplied by an operator word.

expand_monomial_times_word(M: Monomial, word: Iterable[LadderOp]) list[KetTerm]

Expand a monomial multiplied by an operator word.

Produces all normally ordered ket terms resulting from

\[\hat{M} \cdot W = \left(\prod_i \hat{a}_i^\dagger \prod_j \hat{a}_j\right) W,\]

where \(\hat{M}\) is the given monomial and W is a sequence of ladder operators.

The result is obtained by converting the concatenated operator sequence into a normally-ordered ket expansion using ket_from_word().

Parameters:
  • M (Monomial) – Base monomial to expand from.

  • word (Iterable[LadderOp]) – Operator word applied on the right.

Returns:

Expanded ket terms in normal order.

Return type:

list[KetTerm]