## 5 Arbitrary Number of Modes
### Three-Mode Encoding and Estimation Scheme  
In the three-mode case, a natural guess for the optimal estimation is to concatenate two times the scheme proposed in Section 4 in a way that the second output mode of the first scheme will serve as an input for the second scheme (see Figure 4). Notice that, being an output of the first \"optimal\" scheme, the state in the second mode after the first beam splitter always has some fixed phase determined by the first scheme (see Equation (30)). Then, to bring the state into the form of an optimal input for the second scheme, a local rotation by some angle \(\phi\) may be required, as depicted in Figure 4. The full transformation of the quadrature operators of the input modes into those of the output modes is  
Figure 3: Family of optimal encoding schemes. For a given value of the parameters \(a\) and \(b\) (here, \(a=2\) and \(b=1\)), each optimal encoding consists of preparing two coherent states (see two black points, two yellow points, two red points, etc.) according to Equation (29).  
written as \(\mathbf{\hat{r}}^{\prime}=B(T_{2})U(\phi)B(T_{1})\mathbf{\hat{r}}\), where \(U(\phi)\) is a rotation in phase space by angle \(\phi\) and the two beam splitter transformations are characterized by transmissivities \(T_{1}\) and \(T_{2}\).  
Denoting as \(a\), \(b\), and \(c\) the three real parameters that are encoded into the three coherent states, we choose the final output state to be in a similar form as Equation (30), namely \(\mathbf{r}^{out}=(\sqrt{2}a,0,\sqrt{2}b,0,0,\sqrt{2}c)\), which allows us to recover these parameters by homodyne measurement of the output quadratures with the same error variances as in the optimal two-mode scheme, hence saturating the QCRB. Using the relation between the mean value of the input and output quadratures, which is given by the same transformation \(\mathbf{r}^{\prime}=B(T_{2})U(\phi)B(T_{1})\mathbf{r}\), we obtain the parameters of the optimal input states for the three-mode scheme  
\[\begin{array}{ll}x_{1}^{\rm(opt)}=&\sqrt{2T_{1}}\;a,\\ p_{1}^{\rm(opt)}=&\sqrt{2(1-T_{1})}\;d(T_{2},b,c),\\ x_{2}^{\rm(opt)}=&\sqrt{2(1-T_{1})}\;a,\\ p_{2}^{\rm(opt)}=&-\sqrt{2T_{1}}\;d(T_{2},b,c),\\ x_{3}^{\rm(opt)}=&\sqrt{2(1-T_{2})}\;b,\\ p_{3}^{\rm(opt)}=&-\sqrt{2T_{2}}\;c,\end{array} \tag{36}\]  
where  
\[d(T_{2},b,c)=\left(T_{2}b^{2}+(1-T_{2})c^{2}\right)^{1/2}, \tag{37}\]  
and  
\[\tan(\phi)=\frac{b}{c}\left(\frac{T_{2}}{1-T_{2}}\right)^{1/2}. \tag{38}\]  
This encoding and estimation setting enables the optimal retrieval of the three unknown parameters \(a\), \(b\), and \(c\) with variances saturating the QCRB \(\Delta^{2}\tilde{a}=\Delta^{2}\tilde{b}=\Delta^{2}\tilde{c}=1/4\). Moreover, the encoding strategy in Equation (36) satisfies the three-mode extension of Equation (2), which is the energy condition: \(x_{1}^{2}+p_{1}^{2}+x_{2}^{2}+p_{2}^{2}+x_{3}^{2}+p_{3}^{2}=2(a^{2}+b^{2}+c^{ 2})\).  
For a \(n\)-mode encoding strategy, the energy condition is  
\[\sum_{i=1}^{n}(x_{i}^{2}+p_{i}^{2})=2\sum_{i=1}^{n}a_{i}^{2}, \tag{39}\]  
where the \(a_{i}\)s are the \(n\) real parameters to be encoded and estimated. The energy constraint on all the \(n\) modes given by Equation (39) can always be divided in a system of \(\lfloor\frac{n}{2}\rfloor\) equations corresponding to the two- and three-mode energy constraints. Hence, a combination of two- and three-mode optimal schemes allows one to encode and retrieve optimally an arbitrary number \(n\) of classical parameters encoded in \(n\) coherent states. Note that optimal combinations are not necessarily unique.  
Figure 4: Optimal joint estimation scheme for three modes using two beam splitters of transmittance \(T_{1}\) and \(T_{2}\) and a phase shifter of angle \(\phi\).  
For example, for six modes, three pairwise optimal measurements work as well as two three-mode optimal measurements.