Solution (source code)

= Solution

For a narrow unstable state, the effective <Hamiltonian> has the complex <eigenvalue> $m_j-i\Gamma_j/2$. With <natural units> and $\Gamma_j=1/\tau_j$, its <Schrödinger equation> gives
$$
A_j(t)=A_j(0)e^{-im_jt}e^{-t/(2\tau_j)},\qquad j=S,L.
$$
The first factor is the ordinary <energy> phase; squaring the second gives the <exponential decay> of the survival <probability>, $e^{-t/\tau_j}$. This assumes the approximately constant <decay rate> regime; exact very early and very late behavior need not be exponential.

Writing the surviving state as $A_S(t)|K_S\rangle+A_L(t)|K_L\rangle$, invert the two <kaon CP eigenstates> definitions:
$$
\boxed{A_{K^0}(t)=\frac{A_S(t)+A_L(t)}{\sqrt2},\qquad
A_{\bar K^0}(t)=\frac{A_S(t)-A_L(t)}{\sqrt2}.}
$$
Here $t$ is the <proper time>. For a relativistic beam of fixed <Lorentz factor> $\gamma$, substitute $t=t_{\mathrm{lab}}/\gamma$; in ordinary units the <mass> phase is $m_jc^2t/\hbar$.