Experimental multiphase estimation on a chip

Multiparameter estimation is a general problem that aims at measuring unknown physical quantities, obtaining high precision in the process. In this context, the adoption of quantum resources promises a substantial boost in the achievable performances with respect to the classical case. However, several open problems remain to be addressed in the multiparameter scenario. A crucial requirement is the identification of suitable platforms to develop and experimentally test novel efficient methodologies that can be employed in this general framework. We report the experimental implementation of a reconfigurable integrated multimode interferometer designed for the simultaneous estimation of two optical phases. We verify the high-fidelity operation of the implemented device, and demonstrate quantum-enhanced performances in two-phase estimation with respect to the best classical case, post-selected to the number of detected coincidences. This device can be employed to test general adaptive multiphase protocols due to its high reconfigurability level, and represents a powerful platform to investigate the multiparameter estimation scenario.


I. INTRODUCTION
Quantum metrology aims at exploiting quantum resources to enhance the sensitivity in the estimation of unknown physical parameters with respect to what can be achieved with classical approaches [1,2]. This field of research is increasingly active and represents one of the most promising applications of quantum information theory [3][4][5][6]. In the single parameter case, the estimation of an unknown physical quantity with classical resources is bounded by the standard quantum limit (SQL), stating that the achievable error on the unknown parameter scales as ν −1/2 , being ν the number of particles. Such limit can be improved by adopting quantum resources, defining the more fundamental Heisenberg limit (HL) scaling as ν −1 [3][4][5]. Recently, the first unconditional violation of the SQL was reported in [7]. Given a probe preparation, the optimal limit for single parameter estimation can be always saturated by appropriately choosing the performed measurement [8], and thus the HL effectively represents the ultimate achievable precision limit.
Although multiparameter estimation holds a broad range of applications, there are still several open questions with respect to the single parameter case. For in-stance, while the theoretical framework for the singleparameter scenario is well established [26], few recipes to saturate the ultimate bounds are known in the multiparameter case [1,[27][28][29][30][31]. Due to possible noncommutativity of the quantum measurements required to simultaneously optimize the estimation of different parameters [32], it may not be possible to optimally estimate all parameters at the same time. In the case of d compatible parameters, a reduction of resources by a factor d can be obtained with respect to single individual estimations [33]. On the one side, simultaneous multiparameter estimation can surpass the individual optimized strategies, but the definition of general quantum bounds still requires additional investigations. On the other side, several physical processes are characterized by dynamics that require intrinsically the simultaneous treatment of all relevant parameters.
It is thus crucial to identify a specific scenario and a corresponding suitable experimental platform to investigate multiparameter estimation tasks. Such scenario is provided by the multiphase problem, where the parameters to be estimated are a set of optical phases. Several theoretical works have been reported in this direction [6,20,31,39,[45][46][47][48][49][50][51][52][53][54]. Very recent results reported necessary and sufficient conditions to define the optimal projective measurements for pure states [31], with a subsequent extension to general probe states [53]. Furthermore, generalized matrix bounds and optimal states have FIG. 1. Experimental apparatus. a, Layout of the integrated reconfigurable device. Three straight waveguide segments are included between two multiport splitters UA and UB. The dynamical control of the phases is achieved by thermo-optic phase shifters. Central inset: conceptual scheme of the interferometer. Top left inset: layout of the multiport splitters U A,B , each composed of three directional couplers (T A,B 1,2,3 , green regions) and a dynamically reconfigurable phase (ϕ T A,B , red). By appropriately tuning ϕ T A,B the two multiport splitters can be set to operate as balanced tritters. b, Parametric down-conversion source for generation of single-photon and two-photon states. The dotted path is employed to inject classical light into the device for the device alignment. The generated photons (p1 and p2) are coupled in single mode fibers and sent to the integrated device. c, Coupling and detection stage. Photons are coupled to the device by an input fiber array (single-mode operation), and collected with a second fiber array (multimode operation). For single-photon inputs, photon (p2) is directly measured to act as a trigger. For two-photon inputs, both photons are injected in the interferometer, and the output state is measured by adding a set of fiber beam-splitters to detect bunching events. (PDC: parametric down-conversion, SHG: second harmonic generation, DM: dichroic mirror, HWP: half wave plate, PBS: polarizing beam-splitter, IF: interference filter, PC: polarization controller, FBS: fiber beam-splitter, APD: avalanche photodiode.) been defined in [55]. Nevertheless, no experimental realizations have been reported yet. The most suitable platform to implement multiphase estimation tasks is provided by integrated multiarm interferometers injected by multiphoton states [46]. Such platform presents several advantages in terms of stability, tunability and compactness of the devices [56][57][58][59].
In this work we report on an integrated three-mode interferometer built through the femtosecond laser writing (FLW) technique [14,60], to implement quantum multiphase estimation tasks. Such device is composed by two cascaded tritters [61] and includes six reconfigurable thermo-optic phase shifters. We show that the device achieves high fidelity of operation throughout the full dynamical range. Then, we demonstrate experimentally the capability to achieve quantum-enhanced performances in multiphase estimation by using two-photon input states with respect to classical strategies, post-selected to the number of detected coincidences. Finally, we show that the same device can be employed to tune the input and output transformation to investigate the role of measurement operators in this scenario. The device reconfig-urability can be exploited to implement general adaptive multiphase estimation protocols [62][63][64], thus providing a promising platform to develop appropriate methodologies for this task.

II. FABRICATION AND CHARACTERIZATION
The integrated device, working at 785 nm, is composed as shown in Fig. 1a. The input state is prepared by a first unitary (U A ), where a reconfigurable thermo-optic phase shifter is employed to perform fine tuning of the implemented transformation. Then, the prepared state propagates through three internal waveguides with dynamical control of two independent phases between the three paths, ensured by four thermo-optic phase shifters. Finally, the output state undergoes a second unitary transformation U B , implemented with the same layout of U A , that is employed at the measurement stage. When the reconfigurable phases of U A and U B are set to ±π/2, they act as balanced tritter, and the devices permit to engineer a reconfigurable 3-mode Mach-Zehnder interfer- 2. a-f, Two-photon probabilities P (23 → ij) as a function of the phase differences ∆φ1 and ∆φ2. The latter are varied changing the dissipated powers on resistors R1 and R2. In all plots, dots are experimental data while surfaces are the theoretical expectations from the circuit characterization process. Error bars are standard deviations due to the Poissonian statistics of the measured single-photon counts and two-photon coincidences. The good agreement between model and experimental data is quantified by the average R 2 value over all output combinations R 2 = 0.835. In the model, photon indistinguishability of V = 0.95 is taken into account.

A. Fabrication
The photonic chip was fabricated by FLW, adopting a Yb-based cavity-dumped femtosecond laser oscillator operating at the output repetition rate of 1 MHz, and producing laser pulses of 300 fs duration and 1030 nm wavelength. The substrate employed was a commercial borosilicate glass (EagleXG, from Corning). The irradiation parameters used for the waveguides inscription are 250 nJ pulse energy and 30 mm/s substrate scan speed. The laser beam was focused 30 µm beneath the sample top surface by means of a microscope objective with 0.6 NA. The waveguide shallow depth was chosen to obtain an efficient control of the light phase by means of thermal shifters positioned on top of the circuit. The polarization of the writing beam was linear and set perpendicular with respect to the sample translation direction. With this fabrication configuration we obtained single-mode waveguides at the operating wavelength of 785 nm, with 1/e 2 mode diameter of 7.2 µm × 8.4 µm and propagation losses < 0.8 dB/cm for the vertically polarized mode.
The thermal shifters that control the tritter operation and the interferometric phases were added to the photonic chip following the procedure presented in [56]. A thin and uniform gold layer (thickness of ≈ 60 nm) was sputtered on top of the glass sample after the inscription of the waveguides. The gold layer was then patterned by FLW, in order to define the electrical circuit and the resistors above the waveguides, used as local heaters. As irradiation parameters, we used the second harmonic (at 515 nm) of the same laser employed for the waveguide writing, focused with a 0.6 NA objective on the glass surface, with a pulse energy of 100 nJ and a scan speed of 2 mm/s. Each ablated line is scanned 8 times, in order to avoid parasitic shortcuts within the circuit. The resistors are fabricated with a width of 100 µm and a length in the waveguide direction ranging from 5 mm to 7 mm , which give resistance values in the range 60-100 Ω. Standard electrical pins were directly glued on top of the circuit terminations, in order to facilitate the connectorization of our device with external power supplies.

B. Characterization of the device
As a first step after the fabrication process, we have characterized the integrated interferometer, in order to determine the relevant static parameters (beam-splitter transmittivies and internal phases when no voltage is applied) and the dynamical response of the device. In detail, a voltage V Ri applied on the resistor R i produces a power dissipation P Ri = V 2 Ri /R i ; the temperature gradient in the chip induces a different phase shift along each optical path. Considering the combined action of multiple resistors, the resulting phase shifts are given by: where ∆φ j (j = 1, 2) are variations of the two independent phases of the three-arm interferometer (see inset in Fig. 1), namely ∆φ 1 = ϕ 1 − ϕ ref and ∆φ 2 = ϕ 2 − ϕ ref .
Furthermore, α ij and α N L ij are respectively the linear and non linear response coefficients associated to the dissipation P Ri . The linear terms depend on all the geometric, thermal, and optical properties of the device [56], while non-linear terms are associated to variations in the resistance value due to temperature increase.
The characterization procedure has been performed with single-photon inputs, generated by exploiting a 785 nm photon-pair SPDC source, consisting in a type-II BBO nonlinear crystal pumped by a 392.5 nm wavelength pump field (see Fig. 1b-c). This allowed to measure the input-output probabilities P (i → j) from input i to output j . A detailed explanation of the full procedure and the corresponding results are reported in Supplementary Material. The high quality of operation of the device is confirmed by the average fidelity of the device, calculated using the characterized parameters, with respect to the set of achievable transformation in which both the tritters are considered to be ideal. Indeed, the fidelity F ∆φ1,∆φ2 , averaged over the interferometer phase differences (∆φ 1 , ∆φ 2 ), reaches a value F ∆φ1,∆φ2 = 0.963 ± 0.015. Here the fidelity is defined as F = |Tr[Ũ (∆φ 1 , ∆φ 2 )U † (∆φ 1 , ∆φ 2 )]|/m, where U (∆φ 1 , ∆φ 2 ) andŨ (∆φ 1 , ∆φ 2 ) are respectively the ideal and reconstructed transformation for phases (∆φ 1 , ∆φ 2 ). By exploiting the results of the characterization process, it is possible to control arbitrary phase differences between the interferometer arms by applying a suitable voltage on resistors R i .

III. MULTIPHASE ESTIMATION ON A CHIP
After performing the characterization process, twophoton measurements have been performed as a function of phase differences ∆φ 1 and ∆φ 2 , by setting transformations U A and U B as balanced tritters. Phases are tuned by varying voltages applied to resistors R 1 and R 2 . The results are shown in Fig. 2 and are compared with the theoretical predictions based upon the fit parameters obtained from the characterization process. Two-photon inputs are obtained by injecting both photons generated by the source into the integrated device (see Fig. 1bc). Two-photon coincidences are then recorded between the output detectors of the chip. The indistinguishability of the photon pairs injected into the chip was estimated from the visibility of a Hong-Ou-Mandel interference experiment, which gave the value V = 0.95 ± 0.01. As shown in Fig. 2, the measured two-photon output probabilities present a very good agreement with the theoretical model obtained by the reconstruction process. This demonstrates the capability to control the device transformation by simultaneously operating on multiple thermo-optic phase shifters (additional independent single-photon measurements are reported in Supplementary Material). The correct operation of the device is also confirmed by the capability of preserving quantum coherence during the evolution. In Fig. 3 we show the coincidence detection measurements with two-photon inputs, as a function of the relative time delay δτ . The latter is varied through adjustable delay lines, thus allowing to tune the degree of indistinguishability between the two input particles. The reported data show a clear signature of quantum interference when tuning the regime from indistinguishable to distinguishable particles.

A. Experimental multiphase estimation
The present device can be directly employed to test and develop multiphase estimation protocols able to reach quantum-enhanced performances. When dealing with multiphase estimation in a (n + 1)-mode multiarm interferometer, the unknown parameters Φ = (∆φ 1 , ∆φ 2 , ..., ∆φ n ) are the n independent phases relative to a reference arm. To perform their simultaneous estimation, an initial state ρ 0 , is prepared by a unitary transformation U A and evolves through a transformation U Φ that encodes the information on the phases. Then, such information is extracted by a mea-surementΠ x . Finally a suitable estimatorΦ(x) = (∆φ 1 (x),∆φ 2 (x), ...,∆ φ n (x)) provides an estimate of the phases by exploiting the m measurement results x = (x 1 , ..., x m ). The phase sensitivity of an estimator, given a choice of the measurement operators, is quan-tified by its covariance matrix: The precision in multiparameter estimation experiment can be evaluated as the trace of the covariance matrix, corresponding to the sum of the individual errors, in the form of the following chain of inequalities [1]: where I(Φ) is the Fisher information matrix, H(Φ) is the quantum Fisher information matrix, and m is the number of measurements. Optimal precision is achieved when the equality is saturated. In a more general form, such inequality should be written in matrix form , where the chain of inequality defines respectively the Cramer-Rao (CRB) and the quantum Cramer-Rao (QCRB) bounds. Indeed, as shown recently in [55], the full covariance matrix has to be considered for a complete treatment of the sensitivity bounds. In particular, a one-by-one comparison between a desired target scenario (described by a Fisher information matrixÎ) and a given benchmark state (described byĤ) can be performed by calculating the number of positive eigenvalues ofÎ -Ĥ. This analysis provides the number of independent combination of the parameters where a sensitivity enhancement can be achieved by using the target state. To verify the performance of the implemented device in this scenario, we have then evaluated the Fisher Information matrix I with two-photon inputs from the reconstructed parameters. Here, transformations U A and U B are set as balanced tritters. The results are shown in Fig. 4, and compared with the corresponding calculations from an ideal three-mode balanced interferometer. We observe that, for all input states, regions can be identified that provide a value of Tr(I −1 ) lower than the optimal bound achievable with two distinguishable singlephoton inputs, quantified by the corresponding matrix H [39,46,48]. While regions corresponding to quantumenhanced performances are smaller than for ideal device, the minimum of Tr(I −1 ) achieved by the implemented interferometer is close to the ideal value. Nevertheless, by exploiting adaptive protocols such performances can be extended to all pairs of phases if only a single region performs better than with classical resources.
We have then verified that enhanced estimation can be actually achieved by using an appropriate estimator. In Fig. 5 we show the results for a maximum likeli-hood (ML) approach in a local estimation framework for (∆φ 1 , ∆φ 2 ) = (−1.159, 2.810) and input (2,3). The ML approach provides an estimate of the phases by maximizing the likelihood function L(Φ) = k,l P (23 → kl) n kl , where n kl is the number of measured events on output (k, l). We observe that the overall error on both parameters, quantified by i Var(∆φ i ), drops below the bound with the optimal separable inputs. More specifically, the achieved performance, exploiting m two-photon events (2m total photons) overcomes the scenario in which the phases are estimated simultaneously (H sim ) or separately (H sep ) with classical inputs having the same overall number of photons (2m) [39]. The obtained enhancement with respect to a classical input is achieved in a postselected scenario. Furthermore, the estimation of both parameters is achieved with comparable errors, thus leading to a symmetric estimation of the two phases. Finally, we can also compare the sensitivities relative to the full covariance matrices by using the approach of [55] discussed above. More specifically, we find that our system (I) permits, for some pairs of phases, to obtain a sensitivity enhancement in both the two linearly independent combinations of the phases with respect to the scenario where the parameters are estimated separately (H sep ) by means of classical probes and also with respect to optimal simultaneous classical estimation (H sim ). Indeed, both the matrix differences I − H sep and I − H sim have two positive eigenvalues.
The obtained enhancement can be extended to all pairs of phases by considering the application of adaptive estimation protocols [46,[62][63][64]. This can be achieved with our device by exploiting the additional resistors R 3 and R 4 present in the circuit. The capability of performing adaptive protocols is particularly crucial in this multiparameter scenario, where the achievement of optimal [27][28][29] or symmetric [46] errors in all parameters are not always achievable.

B. Tuning input and output transformations
The tunability of the device allows to implement different interferometers besides that composed by two cascaded tritters. This is obtained by varying the phases in resistors R T A and R T B , and by exploiting the additional resistors R 3 and R 4 (see Supplementary Material for the characterization of resistors in U A and U B ). More specifically, let us consider the layout of Fig. 6a. The additional phases on R 3 and R 4 are employed to configure the device such that U B U A = I (up to a set of output phases). The implemented transformations U A and U B , different from balanced tritters, are reported in Supplementary Material. This corresponds to tuning the device transformation as the identity I for (∆φ 1 , ∆φ 2 ) = (0, 0). This scenario is particularly relevant in the multiparameter estimation context in order to saturate inequality (2). Indeed, recent work [31], providing the conditions for projective measurements to saturate such bound, has shown that such measurements include the projection over the initial state, thus requiring U B U A = I. The results are shown in Fig. 6b-c. More specifically, we observe that the single-photon input-output probabilities P (i → j) closely resemble the identity matrix (see Fig. 6b) at (∆φ 1 , ∆φ 2 ) = (0, 0), with a similarity S = 1 3 3 i=1 P (i → i) = 0.979 ± 0.008. Similar results are observed for two-photon inputs (see Fig. 6c), thus showing the capability of tuning the input and output transformations by exploiting the additional phases embedded in the interferometer.
FIG. 6. a, Conceptual layout employed to tune the input and output transformations U A and U B b, Experimental single-photon probability measurements (blue bars) at (∆φ1, ∆φ2) = (0, 0), compared with the identity corresponding to the ideal case (red bars). c, Experimental two-photon probability measurements for input (1,3) and output (1,3) as a function of (∆φ1, ∆φ2) by tuning voltages applied to resistors R1 and R2. b-c, Transformations U A and U B are set to reach the condition U B U A = I (up to a set of output phases) as described in the main text.

C. Perspectives: improving sensitivity with multiphoton inputs
Sensitivity in multiphase estimation with the implemented device can be improved by changing the input state. For instance, let us consider a three-photon input where all modes are injected with a single photon. By evaluating the quantum Fisher information matrix H obtained after application of U A we obtain Tr(H −1 ) 0.527, which is close to the value 0.5 obtained for an ideal interferometer. The actual sensitivity after mea-suring the output state by applying transformation U B is quantified by the CRB Tr(I −1 ), shown in Fig. 7. We observe that improved sensitivity can be achieved with the implemented device, leading to min Tr(I −1 ) 0.584, lower than the bound 0.5 + √ 2/3 obtained by sending three distinguishable single photons prepared in the optimal state.  (1,2,3). a, CRB for the implemented device evaluated from the reconstructed parameters, and b, CRB for the ideal three-mode interferometer. In the ideal interferometer case, points where the Fisher information matrix is singular are not shown. Regions included within white closed curves highlight the presence of improved performances with respect to the QCRB with three optimal distinguishable single-photon inputs.

IV. CONCLUSIONS AND DISCUSSION
In order to fully disclose the potential of multiparameter estimation, several open problems are currently under investigation, both from the theoretical and the experimental side. In this context it is crucial to identify suitable platforms that can be employed to develop new methodologies and to benchmark their performances.
In this article we have shown experimentally the capability of performing multiphase estimation in a reconfigurable integrated photonic chip realized via the femtosecond micromachining technology. Within such platform, the adoption of active thermo-optic phase shifters in a complex interferometric layout allows to investigate experimentally the simultaneous estimation of more than one Hamiltonian parameter. By properly tuning the input state, we have shown that such platform allows to reach quantum-enhanced performances with respect to what can be achieved with separable states, in a postselected scenario to the number of detected coincidences. Furthermore, additional optical phase-shifters fabricated in the device increase the number of available control parameters. In this way we provide an experimental demonstration of a benchmark platform for the paradigmatic scenario of multiphase estimation in multimode interferometers.
Interesting perspectives can be envisaged starting from the presented results. On the one side, enlarging the dimensionality of the system will enable the investigation of a richer landscape [46]. On the other side, the capability of fabricating devices with additional controlled phases will allow to develop and test novel adaptive protocols [46,[62][63][64], or to tune the detection operator searching for the optimal measurement [31]. These ingredients can be combined in the same platform to develop a novel class of optimal protocols, allowing to efficiently extract information on an unknown set of parameters with minimal resource commitment. Finally our platform is also suitable for the inclusion of other integrated elements allowing for all-in-chip processes: laser-written nonlinear waveguides, generating single photons [65], and microfluidic channels, enabling actual sensing experiments on fluid solutions [14]. This would allow all-in-chip multiphase estimation experiments, thus exploiting the potential of the platform.
This supplementary material contains a detailed theoretical analysis of the integrated device reported in the main text, and a full description of the experimental procedure for its characterization.

I. DESCRIPTION OF THE INTEGRATED DEVICE
The implemented device is an integrated three-arm interferometer comprising two cascaded tritters, built through the femtosecond laser-writing technique (FLW). A tritter is a three-port beam-splitter, and can be realized with different possible geometries. The FLW technique is suitable for a 3D realization of a tritter, that consists of a directional coupler made by three waveguides with a common coupling region [1]. Nevertheless, in this article we realized the tritters embedded within the interferometer by employing a 2D geometry. Indeed, it is also possible to the decompose a tritter into cascaded two-mode beam splitters and a phase shifter [2], as shown in Fig. 1 of the main text. This decomposition has the advantage of enabling the introduction of active reconfigurable elements to obtain fine control on the transformation.
The mathematical description of a tritter, in the lossless case, is given by a unitary matrix U (3) defined in the three-dimensional Hilbert space of the spatial modes. The matrix element of a symmetric tritter are U are the output modes operators and the a † j (j = 1, 2, 3) are the input modes operators. Let us now discuss the decomposition of the unitary matrix U A of the first tritter of the interferometer (Fig.  1 of main text). The first directional coupler mixes the first two modes of the interferometer. Assuming a lossless evolution, the reflectivity and transmission coefficients of the coupler R A 1 and T A 1 are related according to R A 1 + T A 1 = 1. Hence, the directional coupler is described by the unitary matrix U A T1 : The second directional coupler mixes the second and the third modes and is described by the unitary matrix: where T A 2 is the transmission coefficient of the second directional coupler. To obtain the tritter transformation, an additional phase shifter P S ϕ T A that introduces a phase ϕ T A between the first arm and the other two is required. Such transformation is described by the following matrix: Finally the first two modes interfere again in a third directional coupler U A T3 , whose action is described by the same matrix of Eq. (1) (with T A 3 as the transmission coefficient). The first tritter is then described by a unitary matrix obtained as an appropriate product of the previously defined transformations: The values of the transmission coefficients and the phase shift to obtain a symmetric tritter described by U (3) are: T A 1 = T A 3 = 1/2, T A 2 = 2/3 and |ϕ T A | = π/2. After the first transformation, the three phases embedded within the three internal arms of the interferometer (Fig.1 of main text) are described by the matrices: where the latter term is chosen as the reference phase. The overall matrix U int of the interferometer is: Therefore, the device is described by 11 parameters: the transmission coefficients of the tritters directional couplers T A,B 1,2,3 , phases ϕ T A,B embedded in U A,B , and the three internal phases ϕ 1 , ϕ 2 and ϕ ref of the interferometer. The output probabilities for single-or multi-photon states entering in the device can be thus calculated by using the evolution in Eq. (6).
The six transmission coefficients are fixed and depend on the coupling parameters between the involved waveguides. Conversely, all the phases can be tuned by thermooptic phase shifters. Phases can be changed by applying appropriate voltages on the corresponding resistors according to Eq.(1) of main text. Six independent resistors are present in the structure. Resistors R T A and R T B are fabricated along the arms of the U A,B to directly change ϕ T A and ϕ T B . Resistors R 1−4 are distributed along the three arms between the two tritters as shown in Fig. 1 of main text. We observe that only two resistors (namely R 1 and R 2 ) are necessary to have the full control of the output probabilities. Indeed only two physically relevant phases can be identified, corresponding to the two phase differences with respect to the reference arm ∆φ 1 = ϕ 1 − ϕ ref and ∆φ 2 = ϕ 2 − ϕ ref . As discussed in the main text, the other two resistors R 3 and R 4 can be employed to add further control on the device, enabling the implementation of adaptive protocols or the capability of tuning the measurement operators so as to have

II. CHARACTERIZATION OF THE INTEGRATED DEVICE
A. Characterization of tunable phase shifts response time As a first step towards characterization of the integrated device, it is necessary to measure the response time of the resistors after a modification of the applied voltage. This is required to evaluate thermalisation mechanisms of the thermo-optic resistors, and therefore to determine the waiting time after a voltage change to obtain a stable optical phase. This analysis is reported in Fig. 1. More specifically, we injected classical light in input 1 and measured the time evolution of the optical power emerging from output 1 by changing the applied voltage during the acquisition. The overall results are reported in Fig.1 a, while in Fig.1 b-c we focus on specific intervals. The transient regime can be described by an exponential decay model, leading to a time constant τ ∼ 0.3 s for our device. This constant includes all relevant transient mechanisms leading to a phase change in the device. To ensure a complete thermalisation of the chip during measurements, we choose a waiting time after voltage changes of 4 s τ before starting a new acquisition.

B. Definition of the tritter phases
In the first stage of the characterization, according to the notation in Fig. 1 of the main text, we are interested in setting the phases ϕ T A and ϕ T B close to ±π/2 to implement two ideal balanced tritters at U A and U B . In this case, we exploit knowledge on the structure of U int b,e,h,k: Input 2. c,f,i,l: Input 3. For each plot, output 1 corresponds to red points and lines, output 2 to green ones, and output 3 to blue ones. Those data are fitted to retrieve the values of the device parameters.
to search for appropriate input-output configurations for this characterization stage. Therefore we initially assume ideal coupling parameters for the device only to set the tritters phases. This is performed by following the three steps described below.
Step 1 (Interferometer phase setting). -By measuring P (3 → 3), the output probability is independent of both phases ϕ T A and ϕ T B , since path leading to this inputoutput configuration do not propagate through the associated optical modes. Therefore this condition can be used to set the internal phases to known values. The analytical expression of the output probability P (3 → 3) for an ideal interferomter in this configuration is: The internal phase difference can be set to ϕ 1 − ϕ 2 = ϕ 2 − ϕ ref = ±π/3 by minimizing this output probability through tuning of the voltages applied to R 1 and R 2 . In our device, this is achieved for voltages values V R1 = 2.05 V and V R2 = 2.01 V.
Step 2 (U B transformation). -The input-output probability P (3 → 1) [or equivalently P (3 → 2)], is independent of the phase ϕ T A . Therefore, this configuration can be used to set the phase ϕ T B to a known value by tuning the internal phases to the values found in step 1. The analytical expression of the output probability in this configuration is: Phase ϕ T B is then set to ±π/2 by minimizing such output probability through tuning of the voltage applied to R T B . This is achieved for a voltage value V R T B = 5.94 V.
Step 3 (U A transformation). -The final step is performed to determine the transformation U A . This is done by using the internal phases and the value of ϕ T B found in the previous steps 1-2. More specifically, by measuring P (1 → j) [or equivalently P (2 → j)] for any j, this path now depends on phase ϕ T A . For instance, the analytical expression of P (1 → 1) in this configuration is: (9) Phase ϕ T A is then set to ±π/2 by minimizing such output probability through tuning of the voltage applied to R T A . This is achieved for a voltage value V R T A = 2.90 V.
In conclusion, the transformations U A and U B correspond to balanced tritters for voltages V R T A = 2.90 V and V R T B = 5.94 V. Hence, the multiarm integrated interferometer chip implements a balanced reconfigurable three-mode Mach-Zehnder interferometer.

C. Characterization of the thermal response coefficients of the internal phases
The response of the relevant phases (∆φ j , j = 1, 2) in the interferometer is described by Eq.(1) of the main text.
Indeed, ∆φ j depends on thermal response coefficients α ji and α N L ji of the internal modes, where (j, i) indicates the action of a voltage V Ri applied on the resistor R i . After setting the transformations U A,B to balanced tritters, it is necessary to determine the complete set of relevant chip parameters. More specifically, it is necessary to reconstruct the thermal response coefficients of the internal phases and the relevant static parameters of the device (internal phases at zero applied voltage and transmittivities of the directional couplers). In order to estimate these coefficients, single photon measurements (see Fig.  2) are performed as follows. For each input i and output j, probability P (i → j) is recorded by tuning the applied voltage to each resistor separately. In such a way, the action of each resistor is characterized independently. This procedure corresponds to an overall amount of 36 independent input-output probability measurements. All reconstructed curves are then simultaneously fitted with the theoretical model U int of Eq. (6). This fit estimate all the relevant parameters described above, and the two initial static relative phases ∆φ 10 and ∆φ 20 of the internal interferometer arms when no voltage is applied, for an overall amount of 26 parameters. During this procedure, it is necessary to give reasonable starting values for all these parameters to enable the correct convergence of the numerical minimization. Such starting values are obtained as follows. According to the fabrication process (see Fig. 1 of the main text) and to the first stage of the characterization, true values of the tritter parameters can be searched around their expected values: Conversely, as starting points for the thermal response coefficients we adopt the fundamentals harmonics obtained by performing Fourier analysis on the measured data. Hence, the output probabilities are expressed as a linear combinations of sines and cosines, where the relative arguments depend on thermal response coefficients. Note that the number of harmonics generated from each measurement is bigger than the real one. This is observed since each curve is measured on a finite range of dissipated power. The analysis has been then restricted by keeping those harmonics shared by all curves. Moreover, to assign each harmonic value to the appropriate coefficient, we considered that each resistor has a greater influence on the nearest modes. Then, the obtained results are employed as a starting point for the fitting procedure. The value of χ 2 after the characterization process is evaluated as the squared difference between experimentally measured probabilities and the predictions obtained from the expected curve with best fit parameters, normalized to the errors on the data. We obtained χ 2 = 3795 with ν = 3258 experimental points. All resulting parameter values are reported in Tab. I with the associated errors. We observe that phases ϕ T A and ϕ T B are set to values ϕ T A = 1.893 ± 0.002 and ϕ T B = 1.866 ± 0.002 due to the non-ideality of the coupling parameters of the tritter directional couplers. However, this difference with respect to ideal π/2 does not correspond to additional inaccuracy in the characterization process, since all actual device parameters are recovered by the fitting procedure. After performing the characterization procedure, we have then verified that the reconstructed parameters are able to correctly predict the behaviour of the device and the value of the applied phases ∆φ 1 and ∆φ 2 . To this end, we have collected an independent set of measurements with single-photon inputs, by varying both phases ∆φ 1 and ∆φ 2 simultaneously and by setting the transformation U A and U B as balanced tritters. The obtained results are shown in Fig. 3, while two-photon measurements are reported in Fig. 2 of the main text. We observe that the curves calculated from the reconstructed parameters provide a good description of the measured experimental data obtained by simultaneously tuning the dissipated power in both resistors R 1 and R 2 .
E. Characterization of the thermal response coefficients of phases in U A and U B During the initial characterization, the phases on R T A and R T B (ϕ T A and ϕ T B ) are set to values near ±π/2 to realize balanced tritter as U A and U B . However, it is necessary to fully characterize the thermal response of those phases to exploit the full potential of the device. Therefore, we need to measure linear and non linear thermal response coefficients of the two phases . Single photon measurements (see Fig. 4) have been performed as in the previous characterization to estimate those coefficients, namely by separately tuning the applied voltage on resistors R T A and R T B . This procedure corresponds to an overall amount of 18 independent input-output probability measurements. The set of unknown parameters to be determined also includes the two initial static phases ϕ 0 T A and ϕ 0 T B when no voltage is applied on the corresponding resistors. Finally, The measured data are processed to obtain a best fit of the 6 parameters. The obtained value of the χ 2 is 6591 with 2418 experimental points. All resulted fitting values are reported in the Table II. Characterization of the dynamical response of resistors R T A and R T B can be exploited to perform a fine tuning of the phases ϕ T A and ϕ T B . Furthermore, this characterization procedure has been then exploited to implement U A and U B transformations different from ideal balanced tritters (see Fig. 6 of the main text).

Parameter
Estimated value  3. Measured single-photon input-output probabilities P (i → j) as a function of phase differences ∆φ1 and δφ2, tuned by simultaneously varying the dissipated power in resistors R1 and R2. Points: experimental data. Surfaces: curves obtained from the characterized parameters and from the model of Eq. (6). a-c, Input 1, d-f, input 2 and g-i, input 3. For each input, the three plots correspond to the three different output modes. The good agreement between model and experimental data is quantified by the average R 2 value over all output combinations R 2 = 0.965.

F. Implemented transformations U A and U B
Here we report the implemented transformations U A and U B for the two-photon measurements reported in the main text. The integrated chip structure allows to tune its parameters ϕ T A and ϕ T B in order to set the input and output transformation as balanced tritters, as described by the characterization procedure discussed above. By setting those parameters to the values discussed in Table  I,  As discussed in the main text, the additional resistors R 3 and R 4 can be employed to tune the input and output transformations U A and U B to reach the condition U B U A = I (up to a set of output phases). The measurements reported in Sec. 3B have been collected by setting the transformations U A and U B respectively as: