As far as I understand, in QM we treat observables as operators, and the eigenvalues of these operators are the possible values we can measure of the observables. It is usually simpler to work in the eigenbasis of an operator if we are talking about its corresponding observable. I have a doubt regarding the interpretation of two operators in QM.
The two texts that I've turned to both say something along the following lines:
First Part
If we have a function $f(x)$, we can think of it as being the projection of the vector $|f\rangle$ on the $|x\rangle$ basis. For this basis, we must have $\langle x|x'\rangle=\delta(x-x')$, so that the basis kets are orthogonal, and the completeness relation is satisfied.
Next, we define an operator $\hat{K}=-i\hat{D}$ where $\hat{D}$ is the differential operator. This operator has an eigenbasis $|k\rangle$. Interestingly enough, there's an awesome relation between the function $f(k)$, which is $|f\rangle$ expanded in the $|k\rangle$ basis, and $f(x)$, the function we'd talked about before. They're each others' Fourier transforms: $$f(k)=\frac{1}{\sqrt{2\pi}}\int_{-\infty}^\infty e^{-ikx}f(x) dx$$ Up to here, I can follow comfortably. All that was needed was to solve the eigenvalue problem for $\hat{K}$ in the $|x\rangle$ basis, which gives the relation between the two bases, and then churn through a few calculations.
Second Part
My problem is with the interpretation of the operators we just spoke of. Just because we gave them the names $\hat{X}$ and $\hat{K}$, do we have to interpret them as position $x$ and wave number $k$? I understand that to each observable corresponds a Hermitian operator, but what if, for example, we had started with two operators named $\hat{A}$ and $\hat{B}$ instead of $\hat{X}$ and $\hat{K}$, and found the following: $$f(a)=\frac{1}{\sqrt{2\pi}}\int_{-\infty}^\infty e^{-iab}f(b) db$$
Where we're working with the bases $|a\rangle$ and $|b\rangle$. Seeing these letters, maybe I decide to associate with $\hat{A}$ the acceleration of a particle, and with $\hat{B}$ the particle's position, or even worse, the magnetic field that the particle is in. I know that this is a crazy example, but I want to illustrate my point- What is it that tells us that the position and momentum (or wave number) in QM must be associated to those operators that I mentioned in the first part? Thanks in advance.
PS. If anyone's curious, I'm reading Shankar's and Zettili's texts.