# Clean way of approximating an oscillator by a qubit

Let me consider a (quantum) Harmonic oscillator of (bare) Hamiltonian:

$$H_0=\frac{p^2}{2m}+\frac{1}{2} m \omega^2 x^2$$

(I can add to it an anharmonicity $$V=\alpha x^4$$ if necessary for the purpose of this question.)

The main purpose of my question is to know how we can properly approximate it to a two level system as often done in superconducting qubit.

The Harmonic oscillator annihilation/creation operators are defined as:

$$a=\sqrt{\frac{\hbar}{2 m \omega}}(x+\frac{i}{m \omega}p)$$ $$a^{\dagger}=\sqrt{\frac{\hbar}{2 m \omega}}(x-\frac{i}{m \omega}p)$$

I end up with $$H_0=\hbar \omega a^{\dagger} a$$

Now, let's assume that for any reason I know that the dynamic should be restricted to the two first levels only: I want to approximate my system by a two level system.

One way that I thought we could do is to take the energy gap $$\hbar \omega_0$$ between the two first level, and to consider:

$$H_0=-\frac{\hbar \omega_0}{2} \sigma_z$$

But let's assume that our oscillator is interacting with a driving field $$F(t)$$ via:

$$H=H_0+H_d(t)$$ $$H_d=f(p)*F(t)$$

Where $$f(p)$$ is a polynome in $$p$$ for instance. How should I modify $$f(p)$$ for the two level approximation ?

I initially believed that the mapping oscillator $$\to$$ qubit would consist in $$a \to \sigma_-$$. But doing so we end up with $$p^{2n}$$ and $$x^{2n}$$ being proportional to identity (if $$H_d(t)$$ involves even power of $$p$$ the interaction then vanishes).

Indeed,

$$p=i\sqrt{\frac{\hbar m \omega}{2}}(a^{\dagger}-a) \to \sqrt{\frac{\hbar m \omega}{2}} \sigma_y$$ $$x=\sqrt{\frac{\hbar}{2 m \omega}}(a^{\dagger}+a) \to \sqrt{\frac{\hbar}{2 m \omega}} \sigma_x$$

My question is thus:

How, given an oscillator potentially interacting with "something else" with polynomial interaction in $$x$$ and $$p$$ should I define the associated two level description. For the "bare" Hamiltonian it is clear but as soon as interaction are involved it is not so clear for me. Is it normal that indeed terms of order $$p^2$$ vanish in the interaction ?