symop.ccr.algebra.ket.scale

Scalar multiplication for CCR ket expansions.

This module provides scalar multiplication of ket expansions represented as tuples of ket terms.

Given

\[\lvert \psi \rangle \;\sim\; \sum_i c_i\, M_i,\]

scalar multiplication by \(\lambda \in \mathbb{C}\) yields

\[\lambda \lvert \psi \rangle \;\sim\; \sum_i (\lambda c_i)\, M_i.\]

The monomials are left unchanged; only the coefficients are scaled.

Functions

ket_scale(terms, c)

Scale a ket expansion by a complex scalar.

ket_scale(terms: tuple[KetTerm, ...], c: complex) tuple[KetTerm, ...]

Scale a ket expansion by a complex scalar.

Parameters:
  • terms (tuple[KetTerm, ...]) – Tuple of ket terms representing a symbolic ket expansion.

  • c (complex) – Complex scalar multiplier.

Returns:

New tuple where each term coefficient has been multiplied by c.

Return type:

tuple[KetTerm, …]

Notes

  • Monomials are preserved exactly.

  • This corresponds to scalar multiplication \(c \lvert \psi \rangle\).

  • If terms is empty, an empty tuple is returned.