  The Perron--Frobenius theorem in infinite-dimensional Hilbert spaces can be
breifly stated as follows: Given a Hilbert cone in a real Hilbert space, a
bounded positive self-adjoint operator $A$ is ergodic with respect to this cone
if and only if the maximum eigenvalue $\|A\|$ of $A$ is simple, and the
corresponding eigenvector is strictly positive with respect to this cone. This
paper addresses the inverse problem of the Perron--Frobenius theorem: Does
there exist a Hilbert cone such that a given bounded positive self-adjoint
operator $A$ becomes ergodic when its maximum eigenvalue $\|A\|$ is simple? We
provide an affirmative answer to this question in this paper. Furthermore, we
conduct a detailed analysis of a specialized Hilbert cone introduced to obtain
this result. Additionally, we provide an illustrative example of an application
of the obtained results to the heat semigroup generated by the magnetic
Schr\"odinger operator
