So basically I have a lot of objects like H:
a= sympy.Symbol('a', commutative=False)
beta= sympy.Symbol('beta',commutative=True)
gamma= sympy.Symbol('\gamma',commutative=True)
ad = sympy.Symbol('a^{\dagger}', commutative=False)
H=gamma*ad*a+beta*ad*a
and all I wanna do is rewrite it as H=(gamma+beta)ad*a but using collect throws the error
AttributeError: Can not collect noncommutative symbol
is there any way to do this ?