Edit: As the comments seem to misinterpret my question, let me clarify it. I don't even understand what is the meaning of multiplying a vector (state) by a number with units such has $\hbar$. By definition, in a vector space you can multiply by a vector by a scalar from the field of definition ($\mathbb C$ in our case), but I can't make sense of multiplying by a number with units.
I will build on the material in <PERSON>'s answer and my answer to 'Is 0m dimensionless? .
In physics, calculations are normally done with physical quantities, and not with real numbers. This is important, because physical quantities are not a field, since not all additions are well-defined. 359
Instead, the set of physical quantities is a set $$ \mathcal P = {(q,d):q\in \mathbb C,d\in \mathbb Q^N} $$ whose elements consist of the quantity value $q$, which may be real but we allow in general to be complex, and the dimension, which is an $N$-tuple of rational numbers, with $N$ the number of algebraically-independent dimensions that you want to include in your theory.
Now, as I said, $\mathcal P$ is not a field, and instead it what you might call a field-with-dimensions, which is equipped with the following operations:
* addition, $(q_1,d)+(q_2,d) = (q_1+q_2,d)$, when both quantities have equal dimension; and
* multiplication, $(q_1,d_1)\times(q_2,d_2) = (q_1\times q_2, d_1+d_2)$.
Since these are not field operations, the field axioms do not even make sense. However, they have transparent generalizations; if you really care about this then it's a good exercise to write them down.
Now, this works thus far for scalar physics, but we have yet to touch vector spaces. Those are normally defined relative to a field, but we want to move away from those dimensionless mathematics, so we need to define a new structure, which you might call a vector-space-with-(physical)-dimensions. To do this we need a pre-existing vector space $V$ over $F=\mathbb C$ (or $\mathbb R$ as required), and we basically generate $\mathbb Q$-fold copies of $V$, each with its own physical dimension: $$ V_\mathcal P = {(v,d):v\in V,d\in \mathbb Q^N}. $$ As above, we need to define the operations anew, and this is again transparent:
* addition, $(v_1,d)+(v_2,d) = (v_1+v_2,d)$, when both vectors have equal physical dimension; and
* scalar multiplication, $(s,d_1)\times(v,d_2) = (s\, v, d_1+d_2)$, for $s\in \mathbb F$ and $v\in V$.
Since these are not the algebraic operations of a vector space, the vector-space axioms no longer make sense, so instead they need to be generalized to this setting; again, the generalization is transparent and obvious.
Finally, what happens with linear operators? We want to assign them physical dimensionality as well, so how is that done? Basically, again, by direct imposition: we define linear operators on vector-spaces-with-physical-dimensions as functions $$ A:V_\mathcal P \to V_\mathcal P $$ with an assigned dimension $d_A$ such that $A(v,d_v)$ has dimension $(d_V+d_A)$ for every $(v,d_v)\in V_\mathcal P$, and such that
* $A\big((v_1,d_v)+(v_2,d_v)\big) = A(v_1,d_v)+A(v_2,d_v)$; and
* $A((s,d_s)\times(v,d_v)) = (s,d_s)\times A(v,d_v)$.
At least on the surface, this looks different enough to the normal definition of linear operator that the entire work needs to be repeated, but this is easy to avoid. 499