SupportsCommutators¶
- class SupportsCommutators¶
Bases:
Protocol[T]A runtime-checkable Protocol indicating support for efficient commutator generation.
Implementation of this protocol requires the three methods below.
- static _commutator_(op_a, op_b)¶
Computes the commutator of two operator instances.
See
commutator()for more details.- Parameters:
op_a (T)
op_b (T)
- Return type:
T
- static _anti_commutator_(op_a, op_b)¶
Computes the anti-commutator of two operator instances.
See
anti_commutator()for more details.- Parameters:
op_a (T)
op_b (T)
- Return type:
T
- static _double_commutator_(op_a, op_b, op_c, sign)¶
Computes the double-commutator of three operator instances.
See
double_commutator()for more details.- Parameters:
op_a (T)
op_b (T)
op_c (T)
sign (bool)
- Return type:
T