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
|
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:
- Returns:
New tuple where each term coefficient has been multiplied by
c.- Return type:
Notes
Monomials are preserved exactly.
This corresponds to scalar multiplication \(c \lvert \psi \rangle\).
If
termsis empty, an empty tuple is returned.