Solution (source code)

= Solution

Zero reflection means $B=0$. Matching the first interface then gives
$$
C=\frac A2\left(1+\frac{k_0}{k_1}\right),\qquad D=\frac A2\left(1-\frac{k_0}{k_1}\right).
$$
The specified layer <quantum phase> is $k_1a=\pi/2$, so $e^{ik_1a}=i$ and $e^{-ik_1a}=-i$. The second-interface conditions become
$$
F=i(C-D)=i\frac{k_0}{k_1}A,\qquad i k_1(C+D)=k_2F.
$$
Since $C+D=A$, compatibility requires $\boxed{k_1^2=k_0k_2}$. This is a <quantum quarter-wave matching layer>: the intermediate <wavenumber> is the geometric mean, and the two interface reflections cancel after their round trip through the layer.

In terms of the physical energies,
$$
\boxed{E-V_1=\sqrt{E(E-V_2)},\qquad (E-V_1)^2=E(E-V_2).}
$$
Rearranging also gives
$$
\boxed{E=\frac{V_1^2}{2V_1-V_2}.}
$$
A finite positive <energy> satisfying the stated ordering requires $V_2/2<V_1<V_2$. Under that condition $E-V_2=(V_2-V_1)^2/(2V_1-V_2)>0$, consistent with the assumed propagating transmitted wave. The width must simultaneously satisfy the given quarter-wave <quantum phase> condition.