## Appendix A  
Here, we present a protocol which allows [PERSON], given two optical modes in arbitrary chosen coherent states \(|\alpha_{1}\rangle|\alpha_{2}\rangle\), to provide [PERSON] with measurement settings such that he can optimally extract by homodyne measurement two real parameters \(a\) and \(b\), which [PERSON] encoded into the given states. 1. [PERSON] chooses real \(a\), \(b\), and \(0\leq T\leq 1\) by imposing that energies of the \"optimal input states\" given by Equation (29) are equal to the energies of the given coherent states in corresponding modes. This leads to the following equations: \[ \begin{cases}x_{1}^{2}+p_{1}^{2}=2 Ta^{2}+2(1-T)b^{2}\\ x_{2}^{2}+p_{2}^{2}=2(1-T)a^{2}+2 Tb^{2}.\end{cases} \] (11) The two equations contain three unknown variables, \(a\), \(b\), and \(T\). Although \(a\) and \(b\) are related by the energy conservation in Equation (2), it is linearly dependent on the two equations above. Indeed, the above system is obviously equivalent to \[ \begin{cases}x_{1}^{2}+p_{1}^{2}+x_{2}^{2}+p_{2}^{2}=2(a^{2}+b^{2})\\ x_{1}^{2}+p_{1}^{2}-x_{2}^{2}-p_{2}^{2}=2(2T-1)(a^{2}-b^{2}).\end{cases} \] (12) where the first equation is, in fact, the energy constraint. If the energies of the given coherent states 1 and 2 are equal, then \(T=1/2\) satisfies the second equation and we are free to choose any \(a\) and \(b\) on the circle determined by the first equation. Another valid option is to choose \(a^{2}=b^{2}=(x_{1}^{2}+p_{1}^{2}+x_{2}^{2}+p_{2}^{2})/4\) and take an arbitrary \(T\). If the energies of the given coherent states are not equal, we can replace the second equation by\[\frac{x_{1}^{2}+p_{1}^{2}-x_{2}^{2}-p_{2}^{2}}{a^{2}-b^{2}}=2(2T-1),\] (11) so that \(T\) becomes a function of the ratio between the differences of the number of photon in the input and output modes. Equation (11) further limits the choice of \(x\) and \(p\) because \(|2T-1|\leq 1\), meaning that \[2|a^{2}-b^{2}|\geq|x_{1}^{2}+p_{1}^{2}-x_{2}^{2}-p_{2}^{2}|.\] (12) Once \(x\) and \(p\) are chosen, \(T\) becomes \[T=\frac{1}{2}\left(\frac{x_{1}^{2}+p_{1}^{2}-x_{2}^{2}-p_{2}^{2}}{2(a^{2}-b^{2 })}+1\right). \tag{13}\]
2. In both cases considered above, Equation (29) determines the parameters of two input states, which would provide the desired optimal measurement, \[ \begin{split} x_{1}^{\rm(opt)}=& x\sqrt{\frac{x_{1}^ {2}+p_{1}^{2}-x_{2}^{2}-p_{2}^{2}}{2(a^{2}-b^{2})}+1},\\ p_{1}^{\rm(opt)}=& p\sqrt{\frac{x_{1}^{2}+p_{1}^{2}-x _{2}^{2}-p_{2}^{2}}{2(a^{2}-b^{2})}-1},\\ x_{2}^{\rm(opt)}=& x\sqrt{\frac{x_{1}^{2}+p_{1}^{2}-x _{2}^{2}-p_{2}^{2}}{2(a^{2}-b^{2})}-1},\\ p_{2}^{\rm(opt)}=&-p\sqrt{\frac{x_{1}^{2}+p_{1}^{2}-x _{2}^{2}-p_{2}^{2}}{2(a^{2}-b^{2})}+1}.\end{split} \] (14) By our construction, the energies of the optimal input states are equal to the energies of the given states in corresponding input modes. Then, the given and optimal input states are related by simple rotation in phase space by angles \(\theta\) and \(\phi\), which can be easily found from the vector algebra \[\cos\theta_{i}=\frac{x_{i}^{\rm(opt)}x_{i}+p_{i}^{\rm(opt)}p_{i}}{x_{i}^{2}+p_ {i}^{2}}.\] (15) where \(\theta_{1}=\theta\) and \(\theta_{2}=\phi\). 3. After performing the calculations described above, [PERSON] provides to [PERSON] with the measurement settings \(\{T,\theta,\phi\}\) and the given coherent states. 4. Upon receiving the measurement settings, [PERSON] applies local rotations to the input modes followed by the beam splitter transformation and homodyne measurements in the output modes, thus realizing an optimal extraction of encoded \(x\) and \(p\) variable. Finally, let us make an interesting observation coming from Equation (11). Recall that, following Equation (34), the precision gain monotonously increases when \(|1-2T|\) tends to zero. Hence, when choosing \(a\), \(b\), and \(T\), we are interested in attaining the minimal possible value of the right hand side of Equation (11) compatible with all the constraints.