symop.ccr.algebra.density.scale

Scaling of symbolic density polynomials.

Given a density polynomial

\[\rho = \sum_i c_i \, |L_i\rangle\langle R_i|,\]

this module provides scalar multiplication

\[c \rho = \sum_i (c\,c_i)\,|L_i\rangle\langle R_i|.\]

The structure of monomials is unchanged; only coefficients are scaled.

Functions

density_scale(terms, c)

Scale all density terms by a complex coefficient.

density_scale(terms: tuple[DensityTerm, ...], c: complex) tuple[DensityTerm, ...]

Scale all density terms by a complex coefficient.

Multiplies each term’s coefficient by \(c\) and returns a new tuple.

Parameters:
  • terms (tuple[DensityTerm, ...]) – Input density polynomial.

  • c (complex) – Complex scalar multiplier.

Returns:

New density terms with coefficients scaled by \(c\).

Return type:

tuple[DensityTermProto, …]

Notes

  • The original terms are not modified.

  • Left and right monomials are preserved.