It would be a good idea to make the function QE_emit work OK with a single scalar value of lambda (without any vectorization). Once you have tested that function, you can call it vectorized with vector argument(s).
What I noticed so far:
When you write a(lambda) Prime assumes a function a, which does not exist. If you meant a * lambda you would have to explicitly write is a multiplication. So you would write e.g.

but I still wonder as you defined x being zero, so this expression would always be constant 1
As you now multiply by a (which has unit 1/m), there is again a unit mismatch because now the exponent again is not dimensionless but has the unit meter.
You could make x dimensionless again, but you would run into problems with the sinh and cosh function. Their argument must be dimensionless, too, and as Ln is a length, xj must be a length, too.
Further unit mismatches in the expressions

and

where one summand is dimensionless while the other is a length.
So you have to fix the unit mismatches in your formula first, then set up the function in a way that it works for a single argument lambda and the n you should be able to call it with vector arguments.
P.S.: Guess we again are far away from the thread topic "Range Plot with Logspace and Units "