Let $\mathcal{H}$ be a complex Hilbert space of dimension $d<+\infty$, and let $\{|n\rangle\}$ with $n=0,\cdots,d$ be an orthonormal basis in $\mathcal{H}$. Let $\mathbf{A}$ be a self-adjoint operator on $\mathcal{H}$ having matrix elements $A_{nn}=0$ w.r.t. the basis $\{|n\rangle\}$.
Consider the equations:
$$ \langle\psi|\mathbf{A}|\psi\rangle=\sum_{m\neq n} A_{mn}\overline{\psi_{m}}\psi_{n}=0 $$ $$ \sum_{m\neq n}A_{mn}(h_{m} - h_{n})\overline{\psi_{m}}\psi_{n}=0 $$ where $h_{m}=h_{n}$ if and only if $m=n$. Let $|\psi\rangle$ be a solution to the first equation. What are the necessary and sufficient conditions on $A_{mn},h_{m},h_{n}$ implying that $|\psi\rangle$ is a solution to the second equation too?
Obviously, both the equations have the common solutions $|\psi\rangle=\psi_{n}|n\rangle$, furthermore, I can clearly see that, if there are $m^{\star}$ and $n^{\star}$ such that $A_{m^{\star}n^{\star}}=0$, then, the two equations have the other common solution $|\psi\rangle=\psi_{m^{\star}}|m^{\star}\rangle + \psi_{n^{\star}}|n^{\star}\rangle$. However, I am not able to say anything else.
Thank You.
The solution sets generally won't be the same. Try the example $$ A = \pmatrix{0&1\\1&0}, \\ h_1 = 0, \quad h_2 = 1 $$ In this case, the first equation gives us $$ \Re\{\psi_1\psi_2\} = 0 $$ Whereas the second gives us $$ \Im\{\psi_1\psi_2\} = 0 $$
The two equations have the same solution if and only if $A = 0$. Otherwise, suppose that $A_{ij} \neq 0$. Let $\tilde A$ denote the matrix with elements $(h_m - h_n)A_{mn}$. Consider the two equations $$ \left[\psi_i \langle i| + \psi_j \langle j| \right] A \left[\psi_i^* |i\rangle + \psi_j^* |j\rangle \right] = 0\\ \left[\psi_i \langle i| + \psi_j \langle j| \right] \tilde A \left[\psi_i^* |i\rangle + \psi_j^* |j\rangle \right] = 0 $$ in which we set $\psi_k = 0$ for $k \neq i$ and $k \neq j$. If the overall solution sets were the same, then these two equations would necessarily have the same solutions. However, by the example above, they necessarily do not.