  We consider the generic form of a two-mode bosonic state $|\Psi_n\rangle$
with finite Fock expansion and fixed mean photon number to an integer $n\geq1$.
The upper and lower modes of the input state $|\Psi_n\rangle$ pick up a phase
$\phi$ and $-\phi$ respectively and we study the form of the optimal input
state, i.e., the form of the state's Fock coefficients, such that the mean
square error (MSE) for estimating $\phi$ is minimized while the MSE is always
attainable by a measurement. Our setting is Bayesian, meaning that we consider
$\phi$ as a random variable that follows a prior probability distribution
function (PDF). For the celebrated NOON state (equal superposition of
$|n0\rangle$ and $|0n\rangle$), which is a special case of the input state we
consider, and for a flat prior PDF we find that the Heisenberg scaling is lost
and the attainable minimum mean square error (MMSE) is found to be
$\pi^2/3-1/4n^2$, which is a manifestation of the fundamental difference
between the Fisherian and Bayesian approaches. Then, our numerical analysis
provides the optimal form of the generic input state for fixed values of $n$
and we provide evidence that a state $|\Psi_{\tau}\rangle$ produced by mixing a
Fock state with vacuum in a beam-splitter of transmissivity $\tau$ (i.e. a
special case of the state $|\Psi_n\rangle$), must correspond to $\tau=0.5$.
Finally, we consider an example of an adaptive technique: We consider a state
of the form of $|\Psi_n\rangle$ for $n=1$. We start with a flat prior PDF, and
for each subsequent step we use as prior PDF the posterior probability of the
previous step, while for each step we update the optimal state and optimal
measurement. We show our analysis for up to five steps, but one can allow the
algorithm to run further. Finally, we conjecture the form the of the prior PDF
and the optimal state for the infinite step and we calculate the corresponding
MMSE.
