Hermitian operator on a nonorthogonal two-state basis (source code)

= Hermitian operator on a nonorthogonal two-state basis

For normalized independent states with $H|\psi\rangle=g|\phi\rangle$ and $H|\phi\rangle=g^*|\psi\rangle$, Hermiticity is equivalent to $g\langle\psi|\phi\rangle\in\mathbb R$. Writing $r=g\langle\psi|\phi\rangle/|g|$, the orthonormal eigenstates are proportional to
$$
(g^*/|g|)|\psi\rangle\pm|\phi\rangle
$$
with eigenvalues $\pm|g|$ and squared norms $2(1\pm r)$.