The `fully_commutes_with_sum` property was incorrectly using `sum()` on the flattened commuting structure, which does not yield a boolean. Changed to use `all()` to ensure the property returns True only if all sub-encoders fully commute with sum. Added type assertions in tests to verify the return type is boolean.
PiperOrigin-RevId: 924707489
R
Ricardo Torres committed
b607fa381adf3deb8a03020a56dab87cd787e247
Parent: 6fbc2ce
Committed by A. Unique TensorFlower <gardener@tensorflow.org>
on 6/1/2026, 2:52:57 PM