changed substitution for ScalarTimesKet and CoherentStateKet to allow for sympy values