symop.ccr.algebra.op.multiply

Multiplication of operator-term tuples.

This module implements the Cartesian product multiplication of two collections of operator terms.

Given two finite collections

\[A = \{ T_i \}, \quad B = \{ S_j \},\]

their product is defined term-wise as

\[T_i S_j = (c_i d_j) \, (W_i || V_j),\]

where W_i || V_j denotes concatenation of operator words.

Functions

multiply(a, b, *, term_factory)

Cartesian product multiplication of operator terms.

multiply(a: tuple[OpTerm, ...], b: tuple[OpTerm, ...], *, term_factory: Callable[[tuple[LadderOp, ...], complex], OpTermT]) tuple[OpTermT, ...]

Cartesian product multiplication of operator terms.

For each pair (t_i, t_j) in a x b, a new term is formed whose operator word is the concatenation

\[W_{ij} = W_i || V_j,\]

and whose coefficient is

\[c_{ij} = c_i d_j.\]
Parameters:
  • a (tuple[OpTerm, ...]) – Left operator terms.

  • b (tuple[OpTerm, ...]) – Right operator terms.

  • term_factory (Callable[[tuple[LadderOp, ...], complex], TypeVar(OpTermT, bound= OpTerm)]) – Callable constructing a term from (ops, coeff).

Returns:

Tuple containing len(a) * len(b) terms in row-major order.

Return type:

tuple[OpTermT, …]

Notes

This function performs purely algebraic concatenation. No simplification or combination of like terms is performed. Callers should apply combine_like_terms() if normalization is required.