I have a function which has something like
myFunc[q,a state[c,d]]
a
could be anything, and I want to tell Mathematica that this part of the function is linear, so that the coefficient of state[c,d]
can be taken outside so that it achieves this result
a myFunc[q,state[c,d]]
Can this be done?
Why is this important? I'm doing simulations on quantum mechanics, and operators have to be linear with respect to numbers, and this is important to make calculations easier.