# 2D electron gas in magnetic field

I am trying to understand the derivation for the wavefunctions and levels of free electrons in a 2D surface perpendicular to a magnetic field. The usual prescription is to take a vector potential $\vec{A}=Bx\hat{y}$ and write the Schroedinger equation, using the momentum operator $\vec{p}=-i\hbar\nabla +e\vec{A}$

Then you take the ansatz $\Psi(x,y)=\exp(ik_y y)\phi(x)$, which turns the equation for $\phi(x)$ into an analogue of the harmonic oscillator.

But I don't understand this. Why choose the $y$-direction to have the exponential part of the equation? And once you've done this, it looks to me like the solution is free electrons in $y$-direction, but bound in $x$ in a harmonic potential. I know that in reality the electrons are "bound" in both directions and are orbiting a given $x,y$ value, given by $\frac{\hbar \vec{k}}{eB}$. So how does using that ansatz and getting a harmonic oscillator in 1 dimension with free electrons in the other, translate to this physical picture?

Obviously I am misunderstanding something basic about the derivation. Any suggestions?

If you write down the Hamiltonian with the vector potential you provided, you should see that the Hamiltonian commutes with $p_{y} = -i\hbar\partial_{y}$. Given that, you know that the eigenfunctions of $H$ must also be eigenfunctions of $p_{y}$ - namely, the $y$-dependence of $\Psi$ must be of the form of a plane wave, as you have correctly written it.
The next part of your question is addressed by gauge invariance. As I'm sure you know, you can change $\vec{A}$ by the gradient of any scalar function and recover the same electromagnetic field configurations. That is, the gauge-transformed field $\vec{A}' = \vec{A}-\nabla f(\vec{x},t)$ is physically equivalent to $\vec{A}$. However, since the potentials (NOT the fields) are the objects that appear in the quantization procedure, it can be very non-trivial to verify that physics is the same in different gauges in quantum mechanics. For practice, you should try to find a gauge transformation which gives plane waves in the $x$-direction and a harmonic oscillator in the $y$ direction.
Another thing to try if you're feeling ambitious is to find a gauge that includes both $x$ and $y$ - this is typically called symmetric gauge. It is the closest in spirit to capturing the classical physics underlying charged particle motion in a magnetic field (namely, cyclotron motion), but it is dramatically different from the two gauges mentioned thus far (which are both Landau gauges).