Solution (source code)

= Solution

Eliminate the lower component to get $(E^2-m^2c^4)\varphi=c^2(\sigma\cdot\Pi)^2\varphi$. Since $[\Pi_x,\Pi_y]=ie\hbar B/c$, the Pauli identity gives $(\sigma\cdot\Pi)^2=\Pi^2-e\hbar B\sigma_3/c$. Substitute the three <momenta> and rearrange:
$$
\boxed{\left[\frac{d^2}{dy^2}-\frac{(p_xc+eBy)^2}{\hbar^2c^2}+\frac{E^2-m^2c^4}{\hbar^2c^2}-\frac{p_z^2}{\hbar^2}+\frac{eB}{\hbar c}\sigma_3\right]\varphi=0.}
$$
The spin-field sign follows from the <Electric charge>[charge] convention and commutator, not an independent assignment.