  We give a detailed discussion of optimal quantum states for optical two-mode
interferometry in the presence of photon losses. We derive analytical formulae
for the precision of phase estimation obtainable using quantum states of light
with a definite photon number and prove that maximization of the precision is a
convex optimization problem. The corresponding optimal precision, i.e. the
lowest possible uncertainty, is shown to beat the standard quantum limit thus
outperforming classical interferometry. Furthermore, we discuss more general
inputs: states with indefinite photon number and states with photons
distributed between distinguishable time bins. We prove that neither of these
is helpful in improving phase estimation precision.
