WorksPhysics and Astronomy
Passive Phase-Aware Hadamard Decoding: Analytical and Machine-Learning Approaches
Abstract
Hadamard-coded optical receivers typically rely on stable interference conditions, which can motivate active optical phase control. We investigate a fixed, intensity-only decoder that embeds four populated modes in an eight-mode interferometer and provides six complementary trigonometric observables through simultaneous power measurements. An analytic transition decoder uses the resulting sign-change patterns without continuous optical phase stabilization. The receiver's intensity-to-observable map is inverted exactly, and an identifiability analysis characterizes exceptional phase configurations and conditional noise sensitivity. An ideal, equal-photon-budget comparison with conventional four-port Hadamard decoding illustrates the potential value of the additional outputs without implying an unconditional advantage. Measurements on programmable photonic processors give 96.19% accuracy for the analytical decoding experiment; a complementary machine-learning analysis reports 98.31% on a held-out experimental trace. These results demonstrate an intensity-only, phase-aware approach to differential Hadamard decoding under the tested conditions, while larger codebooks and hardware-level energy benefits remain topics for future investigation.
Introduction
Hadamard encoding has long been a key technique in optical communication and signal processing, owing to its provision of orthogonal code sets that enable low-complexity encoding and decoding while offering useful coding and discrimination properties [1, 2, 3]. In particular, the 4-dimensional Hadamard matrix () offers a compact and symmetric basis that facilitates efficient mapping of input signals onto mutually orthogonal patterns, which can be reliably distinguished in ideal, phase-stable environments. Recent advances in integrated and quantum photonics have further expanded the applicability of such orthogonal coding schemes, as modern chip platforms can directly implement complex optical transformations with high precision [4, 5, 6, 7].
In practice, however, realistic optical systems are inevitably affected by phase fluctuations arising from environmental perturbations, fabrication tolerances, and propagation effects [8]. These variations disturb the relative phase relationships required for coherent interference at the receiver, reducing interference contrast and introducing decoding ambiguities that degrade link performance. A variety of active stabilization and phase-tracking schemes have been developed to mitigate such effects in programmable photonic systems [8, 9, 10]. In particular, recent experimental implementations of multi-input phase stabilization have demonstrated on-chip feedback control for four-input Hadamard transformations [24]. Furthermore, Hadamard-based joint detection has been experimentally demonstrated using separate programmable photonic processors for codeword generation and decoding, with active stabilization employed to maintain the required interference conditions [25]. While these approaches enable high-fidelity operation, they also increase control complexity, power consumption, and calibration overhead—factors that become critical in large-scale or dynamically varying optical networks. Replacing continuous optical phase stabilization with a fixed decoding transformation can therefore reduce feedback and control requirements, potentially lowering the associated energy consumption.
The significance of input phase fluctuations also extends beyond conventional coherent communication. Recent investigations of Gaussian boson sampling have examined the influence of input dephasing on computational complexity, indicating that computationally challenging regimes can persist even in the presence of input phase noise [26]. These findings further motivate the investigation of photonic architectures that can operate without continuous input-phase stabilization, although the requirements for reliable codeword discrimination differ from those of boson sampling. To overcome phase-instability limitations in optical decoding, recent research has explored passive and data-driven strategies capable of maintaining phase awareness without explicit feedback. In this context, the structure of Hadamard transformations provides a natural pathway to exploit deterministic sign relations among trigonometric components, enabling phase-tolerant decoding even when the relative optical phase drifts. Moreover, recent theoretical investigations have quantified the limitations associated with sequential measurements of phase quadratures, highlighting the advantages of obtaining complementary phase information without intermediate optical reconfiguration [27]. The optical Green Machine uses a passive Hadamard transformation to convert suitable phase-coded inputs into intensity-distinguishable outputs [14]; universal interferometers provide a complementary programmable route to implementing structured transformations [13, 15]. Related advances in photonic information processing and programmable devices provide further implementation context [12, 17, 19]. The contribution of the present work is not the general principle of phase-sensitive interference or quadrature readout in isolation. Rather, we design a fixed eight-port transformation specifically for differential decoding under three unknown input-relative phases. Its simultaneous intensity measurements yield an exactly reconstructible set of six coupled trigonometric observables, whose sign transformations are determined by the four permitted Hadamard codeword transitions. Unlike conventional four-port decoding based on output-port concentration, this architecture exploits the transition-dependent phase signatures; unlike active stabilization approaches, its decoding rule does not require continuous phase-error feedback to retune the decoder or compensate the incoming relative phases. We complement the construction with an identifiability analysis that characterizes the exceptional phase configurations and conditional noise sensitivity, and with experimental validation of sequential transition decoding. The resulting differential decisions still require a reference signature and sufficiently limited drift across each comparison interval.
In this paper, we introduce a passive phase-aware decoding framework for Hadamard-encoded optical signals that operates robustly under phase noise without active optical phase stabilization or coherent detection. Our approach supplements the conventional decoding concept with a custom eight-dimensional unitary transformation that preserves the inner products of the embedded Hadamard codewords while providing explicit sensitivity to relative phase variations. Implemented within a programmable photonic mesh configured as a fixed decoder, this transformation maps input phase information onto measurable output-power patterns from which six trigonometric observables can be reconstructed analytically. For transitions occurring with a sufficiently stable relative-phase reference, these observables obey deterministic sign-change rules that enable discrimination from direct intensity measurements. The resulting sign-pattern detector is distinct from an absolute, reference-free symbol decoder. Furthermore, we combine analytic reconstruction with machine-learning-based classification trained on synthetic and experimental data to achieve high-accuracy decoding in the presence of phase and detector noise. The proposed method thus provides a promising approach to phase-robust optical communication and information processing with reduced optical feedback requirements, while the underlying principles offer opportunities for extension to other families of structured phase codewords.
Ideal Hadamard Encoding and Decoding
In the absence of phase noise or hardware imperfections, the Hadamard transform provides an elegant and highly efficient framework for encoding and decoding optical codewords. We use the normalized Sylvester-ordered Hadamard matrix
Each row of defines a codeword that distributes the optical field uniformly across all modes, while maintaining pairwise orthogonality with every other codeword. This orthogonality ensures that, in principle, symbols can be discriminated with zero error probability as long as coherence is preserved.
From the transmitter’s perspective, the encoding operation consists of selecting one of the basis states and mapping it into the corresponding Hadamard codeword by means of the linear transformation . The resulting states are amplitude-balanced superpositions with distinct relative phase configurations, which can propagate through the channel without altering their mutual orthogonality under ideal conditions. For distinct normalized codewords and , orthogonality implies ; this is not the maximum possible distance between arbitrary normalized complex vectors. It does provide equal pairwise separation within the chosen orthogonal codebook.
At the receiver, decoding is achieved by applying the same transformation. For the Sylvester ordering in § 1.1, , so the process exactly recovers the transmitted basis symbol. This property is not only algebraically convenient but also physically meaningful: a single linear optical transformation suffices to invert the encoding, without requiring iterative procedures, auxiliary ancilla modes, or complex adaptive detection strategies. In the ideal regime, the receiver therefore performs error-free symbol recovery with minimal computational overhead.
Beyond mathematical orthogonality, the Hadamard structure has several practical consequences for optical implementations. The Hadamard codewords have balanced input amplitudes, while ideal application of the inverse Hadamard transform concentrates each decoded codeword in its corresponding output port. This characteristic provides a simple basis for output-port discrimination. Moreover, the transformation is real and binary-valued, meaning that encoding and decoding can be realized with passive optical components such as beam splitters and phase shifters, without the need for active modulation at this stage. These features collectively explain the prominence of Hadamard coding in both classical optical communication and quantum photonics.
This idealized model serves as a useful benchmark. It represents the theoretical limit of communication performance: in a noiseless and phase-stable environment, Hadamard encoding provides deterministic, unit-fidelity decoding based solely on linear optical transformations and direct power measurements. As such, it isolates the mathematical essence of the coding scheme, while abstracting away the imperfections that inevitably arise in practice. In the following sections, we relax these assumptions and analyze how phase noise, fabrication tolerances, and environmental instabilities distort the interference patterns required for discrimination. This provides the motivation for developing extended decoding strategies that incorporate phase sensitivity and noise resilience, while retaining the architectural simplicity of passive photonic implementations.
Decoding Under Phase Noise
In practical implementations, phase disturbances can affect the input modes and internal interferometric paths. Our idealized model holds the receiver transformation fixed and represents disturbances accumulated before that transformation by effective input-relative phases. At Alice, a fluctuation acting only as a common phase on the single excited input before encoding has no effect on the prepared codeword. Phase changes acquired after the optical field is distributed across the four encoded paths, including those on the transmission path, are not common-mode and must be included in the receiver-input phases. Likewise, arbitrary internal changes to the programmed decoder generally cannot be absorbed into input phase offsets; they represent departures from the ideal fixed . Fixed output-port phases alone do not affect intensity measurements. This separation clarifies which kinds of phase noise the model treats exactly and which hardware imperfections lie outside it.
Modes 1–4 correspond to the four components of a single Hadamard codeword, i.e., equal-amplitude optical fields distributed across four physical input channels with relative phases fixed by the selected row of the Hadamard matrix. In the presence of phase noise, these channels acquire additional, mode-dependent phase offsets. We designate mode 1 as a phase reference. Below we present the input state model, output power formulas, and extraction of trigonometric observables that enable robust decoding. We first revisit the four-dimensional Hadamard transform before extending the scheme to an eight-dimensional framework.
Four-Port Hadamard Decoding
We first revisit ideal four-port Hadamard decoding in the presence of phase noise. Each transmitted symbol corresponds to a single row of the Hadamard matrix , encoded as equal-amplitude optical fields distributed across four physical input modes with relative phases fixed by the entries of the selected row.
Choosing mode 1 as a phase reference, Bob’s input state can be written as
where , , and denote the total relative phases, incorporating both the encoded 0 or offsets and any subsequently acquired phase noise.
Applying the normalized Hadamard matrix yields four output powers that depend quadratically on these relative phases. For example,
while the remaining powers () follow by analogous sign permutations.
Transitions between Hadamard codewords correspond to flipping the signs of exactly two components of the Hadamard row, which is equivalent to applying -phase shifts to two input modes. Under such a transition, the trigonometric terms transform as , resulting in a permutation of the output power tuple .
Example: Codeword Flip and Small Noise
We illustrate the effect of phase noise on four-port Hadamard decoding by considering a transition between two Hadamard codewords. Such a transition changes the signs of exactly two components of the Hadamard row, corresponding to -phase shifts to two populated input modes. Here we consider a flip of modes 2 and 3, corresponding to the relative phases and .
Including additional phase perturbations , , and between the reference measurement and the new measurement, the output power at port 1 is
The expressions for the remaining output ports follow analogously.
The permutation of the output powers follows directly from the algebraic structure of the Hadamard transformation, without requiring a small-phase approximation. Define the input sign-flip operator
For the normalized, Sylvester-ordered Hadamard matrix defined in § 1.1, direct multiplication gives
Consequently, if denotes the output before the codeword transition, then in the absence of any additional drift
Taking squared magnitudes shows that the output powers are exactly permuted:
This identity holds for arbitrary initial relative phases , , ; it is not restricted to phases close to or .
When further phase changes occur between measurements, let and define the port permutation by , , , and . Because the intended input sign flips and the additional phase shifts are diagonal operations, the measured powers obey
where denotes the pre-transition four-port power function. Thus, the permutation itself is an exact consequence of Hadamard algebra; only comparison with powers measured at an earlier phase configuration becomes approximate when there is additional drift. This approximation requires small phase changes during the comparison interval and does not provide a guarantee under arbitrarily fast phase fluctuations.
Extension to an Eight-Dimensional Framework
For the real-valued four-port Hadamard transformation considered above, the output intensities contain cosine-type interference terms but do not directly furnish complementary sine-type observables. To explore more informative intensity signatures under unknown relative phase, we embed the four-dimensional Hadamard code into an eight-dimensional passive interferometric architecture that provides access to complementary phase observables.
The logical Hadamard codeword occupies modes 1–4, corresponding to the four equal-amplitude components of a single row of . The remaining four modes act as ancillary channels and are initially unpopulated. The input state is thus
where , , and denote relative phase offsets with respect to mode 1. The decoding operation is implemented by a fixed unitary transformation ,
Applying to yields eight output amplitudes, whose corresponding intensities contain both cosine- and sine-type dependencies on the relative phases. For example,
while the remaining output powers follow by analogous combinations.
The chosen transformation yields a selected mixture of cosine- and sine-type interference terms across the eight outputs. As a result, six distinct trigonometric observables can be reconstructed analytically from intensity measurements alone. For instance,
with exact expressions for , , , , and given in Eqs. (57)–(61). Appendix A.1 proves that the six quantities form a linearly recoverable, but phase-constrained, signature.
Complementary trigonometric dependence can help avoid some zero-crossing ambiguities of a cosine-only power pattern, although no phase-uniform margin is guaranteed. The optical decoding transformation is fixed during operation and requires only power detection, not coherent field measurement or active input-phase feedback. In a thermo-optically programmed mesh, holding the fixed transformation may still require electrical bias power.
Controlled comparison with conventional four-port decoding
The conventional Hadamard receiver and the eight-port decoder both conserve total input power, but their intensity signatures need not have the same distinguishability when the encoded modes acquire unknown relative phases. This can be illustrated without assigning a phase-noise model. In the port convention of the displayed Sylvester matrix in § 1.1, take
The conventional receiver gives the uniform power vector
All four Hadamard transitions permute this tuple without changing it, so this particular phase configuration is exactly ambiguous to the conventional intensity-only decoder. Applying the eight-port unitary of Eq. (9) to the state in Eq. (8) instead yields
The four candidate eight-port power signatures are distinct, with minimum observable separation (see Appendix A). This establishes an explicit advantage at the chosen point, not uniform dominance over every phase and measurement-noise condition.
To provide a reproducible, equal-photon-budget comparison, we also simulated ideal photon-counting discrimination with the true, unchanged pre-transition phase triple supplied to the decision rule as an ideal reference (an oracle assumption). Each of 50,000 trials draws , , independently and uniformly on , selects one of four transitions uniformly, and generates detected photons from the corresponding four- or eight-output multinomial power distribution. For both receivers the same total count is used, and the transition is assigned to the candidate maximizing the conditional multinomial likelihood. Figure 7 shows the resulting ideal-model error fractions. At , the simulated rates are 0.15510 for conventional four-port detection and 0.01090 for the eight-port transformation. The comparison tests the intensity signatures under a specific photon-counting model; it does not reproduce the experimental sequential sign algorithm, incorporate reference-estimation errors or phase changes during an observation window, or establish a hardware-independent advantage. The simulation details and reproducibility code accompany the source files. This reference-conditioned receiver comparison is separate from the reported machine-learning decoder.
Figure 7. Controlled ideal four-port versus eight-port comparison with an unchanged known phase reference, uniform random phase triples, 50,000 trials per count level, equal total detected photons, and conditional multinomial maximum-likelihood decisions. These are simulations, not measured decoding accuracies.
Sign-Flip Structure and Noise-Robust Decoding
The availability of both cosine- and sine-type observables in the eight-dimensional decoder enables a discrete, noise-robust representation of Hadamard codeword transitions. As shown above, the output intensities provide six complementary trigonometric observables, allowing transition signs to be compared through several interference terms. We exploit this structure by focusing on the signs of a small set of analytically reconstructed trigonometric observables. Specifically, from the measured output powers we reconstruct the six quantities
and define the corresponding sign vector
A transition between Hadamard codewords corresponds to flipping the signs of exactly two components of the Hadamard row, implemented as -phase shifts on two input modes. Under such a transition, the trigonometric observables transform deterministically. For example, a flip of the Hadamard components associated with phases and induces
while and remain unchanged. Consequently, each codeword transition corresponds to a fixed, known update pattern of the sign vector .
This representation can offer a robustness advantage. Except near zero crossings, the sign of a trigonometric observable is stable under moderate phase noise, even when its magnitude fluctuates. Moreover, other reconstructed observables may remain sufficiently far from zero to support a transition decision. The implemented analytical strategy therefore uses pattern matching on rather than full phase estimation; the amount of noise tolerance depends on the observable magnitudes, reference stability, and detector statistics.
In this framework, symbol discrimination is achieved by tracking deterministic sign changes rather than absolute phase values, enabling reliable, low-complexity decoding using intensity measurements alone.
In the following sections, we validate this decoding strategy experimentally and extend it using data-driven classifiers to further enhance robustness.
Experimental Proof-of-Concept: Hadamard-2 Decoder
To validate the feasibility of the proposed decoding scheme on real photonic hardware, we implemented a proof-of-concept experiment using a simplified Hadamard-2 decoder. This experiment serves as an initial step toward scalable implementations of higher-dimensional Hadamard codes.
We began with the standard Hadamard matrix:
where a codeword transition corresponds to a relative phase shift of between the two input arms.
To emulate the principles of the higher-order decoding scheme in hardware, we extended the transformation to four output modes by embedding the two input channels into a unitary. The transformation was chosen such that both the cosine and sine of the relative phase appear directly in the output powers:
The columns of are orthonormal, ensuring unitarity and conservation of total optical power.
The input state, corresponding to two modes with a relative phase , is
and the output is given by . The measured powers at the four detectors are then
From these outputs, the relative phase can be directly reconstructed:
This analytic extraction of phase allows the decoder to continuously track and identify abrupt -shifts corresponding to codeword transitions. As in the higher-dimensional case, the decoder selects the trigonometric component (either or ) with the larger magnitude to mitigate noise sensitivity near zero-crossings.
Minimax Optimality of the Quadrature Observables
The reconstruction of both and is not an arbitrary choice of phase-sensitive features. It is the minimax-optimal choice among all pairs of equally normalized sinusoidal observables for detecting an unknown-phase transition.
To see this, consider two equally populated optical input modes with relative phase . For an arbitrary passive linear interferometer, the power measured at output port has the general form
where is independent of , is the interference amplitude, and is fixed by the interferometer. Thus, every phase-dependent intensity observable obtainable from two populated modes is necessarily a shifted and scaled sinusoid.
Consider now two equally normalized phase observables separated by an arbitrary offset ,
A transition between the two Hadamard-2 codewords corresponds to
The resulting observable jump is
and its squared Euclidean magnitude is
For a fixed separation , the smallest transition signal over all unknown initial phases is therefore
This worst-case value is maximized when
which corresponds exactly to the sine–cosine pair. At this optimum,
and hence
for every initial phase .
The quadrature representation therefore has no blind initial phase. Whenever one component is close to zero, the complementary component remains finite. Indeed,
so at least one reconstructed observable changes in magnitude by at least under every transition.
For the four-output transformation used here,
and the minimax-optimal observables are reconstructed directly as
Moving from the raw powers to these quadrature observables therefore converts the detector outputs into a phase-independent transition representation whose total jump magnitude is constant and whose strongest component is maximized in the worst case.
This optimality statement applies to pairs of equally normalized sinusoidal observables. It does not assert global optimality among all possible passive measurements with arbitrary numbers of output ports. Different multi-output constructions may provide larger raw-power separation under particular detector-noise models. The sine–cosine construction is optimal specifically in the minimax sense relevant here: among two-observable phase representations, it maximizes the smallest detectable response to an unknown-phase transition.
Figure 1 shows the measured output powers for a test sequence of Hadamard-2 codewords. At randomly selected time indices, a relative -phase shift was manually applied, leading to visible discontinuities in the output traces. In this experimental trace, transitions were identified at all seven applied shift locations: indices 186, 254, 326, 466, 688, 838, and 910.

Figure 1. Measured optical output powers corresponding to Hadamard-2 decoding. Phase shifts of were applied at known indices to simulate codeword transitions.
Absolute codeword labels in a sequential decoder depend on the initial phase/codeword reference. In the two-mode case, a different signaling convention is possible: pilot-free differential action-based encoding, in which the information is the presence or absence of a transition rather than the absolute phase value.
In this framework, binary information is conveyed not by the absolute phase of the state but by whether or not a discrete operation—a -phase shift—is applied. Specifically, the bit value ’0’ corresponds to no action, while ’1’ is encoded by applying a phase shift of . Bob continuously monitors the phase using the reconstructed , and interprets a -jump as a ’1’, and absence of such a jump as a ’0’.
Provided the candidate symbol intervals are known, the receiver can detect an applied phase operation without needing a known initial codeword. The comparison nevertheless uses observations from successive intervals and therefore requires timing information; the scheme is differential rather than fully memoryless or synchronization-free.
Experimental Realization: Hadamard-4 Decoder
The Hadamard-4 decoder was experimentally implemented using commercial programmable photonic processors (QuiX Quantum) fabricated on a low-loss silicon nitride platform [20, 21]. Each device consists of a universal multiport interferometer network with thermo-optic phase shifters that allow full reconfiguration of the implemented unitary. In our experiments, one photonic processor was programmed to prepare and encode the Hadamard codewords, while a second processor was configured to realize the eight-dimensional decoder transformation. The universal interferometer implements arbitrary unitary operations via the Clements decomposition [22], which we used to compile the custom circuit required for this work. The transmitter prepared four-mode Hadamard codewords, while the receiver implemented the distinct eight-dimensional unitary of Eq. (9); the decoding chip did not simply implement a second four-mode Hadamard transformation.
Each codeword corresponds to a row of the matrix of and is mapped to four optical input modes. To extract the encoded information, the four-mode input is passed through a custom-designed optical transformation matrix. This transformation creates specific interference patterns across eight output ports, enabling the extraction of six distinct trigonometric phase components from the resulting optical powers.
The trigonometric variables are calculated from the normalized measured powers using Eq. (11) and the complete set of relations in Appendix § 12.§ 1. The inversion is exact for the programmed ideal transformation and equal-amplitude, four-mode input; residual gain imbalance or deviations from can perturb it. Output-power normalization removes common overall scaling, not unequal channel gains.
In the experiment, Hadamard-4 codewords were encoded as phase states across four input channels and varied over time according to a predefined sequence. Each transition between codewords was realized by introducing -phase shifts on two of the four input modes, as dictated by the structure of Hadamard matrices. The decoder tracked the measured signs of the six reconstructed trigonometric terms and searched for the transition patterns permitted by the Hadamard codebook. The comparison requires a reference sign pattern and sufficiently limited phase evolution across each decision interval.
The decoding procedure employed a sequential algorithm that continuously monitored the signs of the six trigonometric quantities and matched observed sign changes to known patterns of codeword transitions. The initial codeword served as a reference, and subsequent codewords were inferred based on the observed sign transformations. In practice the implementation prioritized the three features with the largest measured absolute magnitudes, as described below. The analysis is a sequential decoder; it is not claimed to provide absolute codeword recovery without initialization.
In the reported experimental sequence, the analytical sign-pattern decoder achieved an overall classification accuracy of 96.19%. This establishes performance on the acquired sequence rather than a universal bound for arbitrary phase-noise speeds, decision intervals, or device imperfections. Figure 3 shows the reconstructed trigonometric values alongside identified transition points corresponding to Hadamard-4 codeword changes. To further quantify the robustness of the proposed decoder against phase fluctuations, we performed numerical simulations using a Wiener phase-diffusion model,

(a) Power distribution dynamics across 8 channels during codeword updates.

(b) Trigonometric sign flips enable reconstruction during codeword transitions.
Figure 3.
where denotes a standard Wiener process and is the phase diffusion strength in units of . With sampling interval , each simulated phase increment obeys . Independent additive Gaussian detector noise was included in the simulated detection channels. The diffusion parameter is a simulation control, not an estimate obtained by fitting the experimental power trace.
Figure 2 shows the decoding accuracy as a function of the phase diffusion strength . The blue curve corresponds to the numerical simulation, while the dashed red line indicates the experimentally obtained decoding accuracy of 96.19%. The experimental accuracy is included as a reference value; without an independent estimate of the experimental diffusion coefficient, this comparison cannot assign a unique phase-noise strength to the measured trace. The gradual decrease of simulated accuracy with increasing characterizes this numerical model; the experimental accuracy should not be assigned to a particular point on the curve without separately estimating the experimental diffusion strength.

Figure 2. Decoding accuracy as a function of the phase diffusion strength . The blue curve shows the simulated decoding accuracy, while the dashed red line indicates the experimentally measured accuracy of 96.19%.
Despite these promising results, the decoding strategy has intrinsic limitations when confronted with elevated noise levels or calibration errors. Decoding accuracy degrades when phase noise surpasses the tolerance threshold of the trigonometric sign detection scheme, causing the intended codewords’ interference signatures to become obscured. Excessive phase drift or jitter scrambles the relative phase relationships, reducing the contrast of interference fringes that encode the sign information. Moreover, fabrication and alignment imperfections—such as variations in waveguide dimensions, beam splitter ratios, and phase shifter calibration—introduce systematic deviations from the ideal transformation matrix, distorting output power distributions. Thermal and environmental instabilities including temperature fluctuations and mechanical vibrations alter the optical path lengths unpredictably, further degrading phase coherence. Additionally, measurement noise arising from detector dark counts, shot noise, and electronic noise limits the precision of power measurements, causing errors in sign determination.
These factors collectively impose practical bounds on the operational regime of the decoder. The decoding algorithm assumes that the six trigonometric quantities maintain stable sign patterns for each codeword; when noise causes frequent sign flips or ambiguous zero crossings, the sequential matching of codewords breaks down, leading to decoding failures.
To improve decoding reliability in the presence of noise and near-zero crossings, our implementation prioritized the three trigonometric quantities with the largest absolute values at each step. Specifically, we tracked sign changes in , , , , , and , and selected the three most significant (in magnitude) to determine codeword transitions. For instance, in a representative transition from Codeword 2 to Codeword 3 at index 1239, the decoding logic predicts sign changes in both and . However, as illustrated in Figure 4, does not exhibit the expected sign inversion. This discrepancy is consistent with phase fluctuations, including Brownian-like drift, which introduces stochastic fluctuations in the optical phase and can mask sign transitions when a trigonometric component is near zero. Such cases underscore the importance of dynamic significance-based selection among trigonometric variables, as relying on low-magnitude terms increases susceptibility to noise-induced errors.

Figure 4. Reconstructed trigonometric observables around an example of analytical transition-decoding failure. The highlighted transition occurs near index 1239.
Additionally, decoding performance is influenced by the precision and noise characteristics of the signal acquisition system. The acquisition hardware employed in this experiment was not specifically optimized for high-resolution, low-noise optical measurements. Consequently, finite measurement resolution and electronic noise may introduce uncertainties in the recorded output powers, which propagate through the analytical reconstruction of the trigonometric observables. These uncertainties become particularly relevant when the reconstructed quantities approach zero, where small measurement deviations can lead to incorrect sign assignments and subsequent decoding errors. The relative contribution of acquisition-related noise to the overall decoding error rate was not independently characterized.
To mitigate these issues, careful calibration of the photonic chip is essential [11, 23]. This includes fine-tuning the relative phases, balancing splitter ratios, and compensating for fabrication variances through thermal or electrical control elements. Additional coding or optical feedback could be explored for more demanding noise conditions, at the cost of added complexity. Here the optical receiver is held fixed during the reported decoding measurements, and no overall electrical-energy or throughput advantage has been quantified.
Machine–learning decoding
Second method to find correct codeword with no phase stabilization is the machine - learning decoding that relies on sequential inference: the previously decoded symbol supplies a phase reference and only the differential jump around each detected transition is fed to the classifier. A single transition is thus represented by the eight components of plus the categorical flag "initial state" (0–3); the label to be learned is the succeeding "final state".
To train and evaluate our decoders we relied on three physics-based synthetic data sets and two experimental data sets. Each synthetic data set contains 20 000 labeled symbol transitions and captures a distinct noise regime: (i) an ideal, noise-free processor; (ii) the same processor disturbed solely by Brownian phase noise; and (iii) the processor perturbed by both Brownian phase noise and the ≈ 15% detector-gain noise measured on our hardware (see Figure 2). When we recorded two back-to-back experimental traces comprising 1502 and 1363 transitions, respectively; we use the first for fine-tuning and keep the second strictly for blind-test evaluation. For every transition we normalise the raw powers such that , yielding a nine-dimensional feature vector (the eight normalised power differences plus the categorical previous state) and a four-class target label .
Six independent learners were trained: XGBoost, LightGBM, CatBoost, Random-Forest, Extra-Trees and a fully connected neural network (layers 64–32–32–16–8–4 with ReLU activations, Adam optimizer , early stopping after 70 idle epochs). For the tree ensembles we used 200 estimators, depth 8–9 and learning rates 0.02–0.03; Random- and Extra-Trees were later enlarged by 100 trees via warm-start. Two curricula were explored. In the first, the three simulations were shown successively for 200 epochs each and the models were then fine-tuned for 50 epochs on the experimental training set. In the second, the simulations were concatenated and shuffled once, processed for 300 epochs, and again fine-tuned for 50 epochs on the experiment. Both delivered statistically identical results, so the joint curriculum—faster by 18 % wall time—was adopted.
Figure 5 plots the validation accuracy versus epoch for all six learners. CatBoost and the neural net cross the 99 % line within forty epochs; XGBoost follows closely, while LightGBM climbs more gradually. The shaded band (not shown to avoid clutter) is narrower than ±0.004 for five random splits, confirming good statistical robustness. The power of sequential encoding despite noise is illustrated in Figure 6; even though Brownian drift broadens the traces (center panel) and detector noise blurs them further (right panel), the eight-dimensional jump vectors still form distinguishable clusters.

Figure 5. Validation accuracy on the mixed synthetic corpus; numbers in the legend are the final values.

Figure 6. Normalised powers for an 80-iteration excerpt: ideal simulation (left), Brownian phase noise only (center), Brownian plus detector noise (right). Strings on top denote the ground-truth codewords.
| Class | Precision | Recall | Support | |
| 0 | 0.98 | 0.98 | 0.98 | 334 |
| 1 | 0.98 | 0.98 | 0.98 | 348 |
| 2 | 0.99 | 0.99 | 0.99 | 351 |
| 3 | 0.98 | 0.99 | 0.99 | 330 |
| Macro avg | 0.98 | 0.98 | 0.98 | 1 363 |
Table 2. Confusion-matrix metrics for the ensemble on the blind experimental test set.
Table 1 summarises the top-1 accuracies after curriculum training. On a held-out synthetic fold the ensemble reaches 0.9906, and on the blind experimental trace 0.9831. Precision, recall and remain balanced across the four classes (see Table 1), the weakest transition () still scoring . A confusion-matrix inspection shows only nearest-neighbour errors, consistent with occasional phase slips of magnitude .
| Model | Synthetic | Experimental |
| XGBoost | 0.9866 | 0.9817 |
| LightGBM | 0.9865 | 0.9685 |
| CatBoost | 0.9900 | 0.9442 |
| Random-Forest | 0.9888 | 0.9560 |
| Extra-Trees | 0.9879 | 0.9751 |
| Neural-Net | 0.9902 | 0.9340 |
| Soft-vote ensemble | 0.9906 | 0.9831 |
Table 1. Top-1 accuracy of each learner after curriculum training. Synthetic column refers to a held-out 10 % split; experimental column is the blind test.
In conclusion, a compact six-model ensemble trained on a blend of physics-based simulations and a single 90-s experimental trace suppresses the raw symbol error by more than two orders of magnitude, achieving % accuracy in a strongly perturbed photonic processor without any optical phase stabilization. The approach is immediately applicable to larger meshes and promises a low-power, fully passive path towards high-throughput reconfigurable optical networks.
Generalization Beyond Hadamard Transitions
The principle that a passive interferometer maps phase differences into intensity-dependent interference terms is not restricted to Hadamard inputs. However, exact recovery, distinguishability, and phase-noise robustness do not automatically extend to an arbitrary codebook; they depend on the receiver and the available measurements. To state the generic algebraic principle, consider a family of mutually orthogonal equal-amplitude phase codewords. Let each codeword be written as
with orthogonality condition
When such a codeword passes through a passive interferometer , the output field at port is
and the detected power is
The diagonal terms contribute a constant offset
while all phase dependence arises from the off-diagonal interference terms. A general unitary interferometer contains complex-valued coefficients, so each product can be written as
Expressing the input phase difference as
shows that the real-valued intensity measurement necessarily involves both trigonometric quadratures:
Consequently,
with coefficients
consistent with the definitions in Eqs. (10) and (19). Both cosine and sine contributions can arise when the interferometer coupling coefficients have appropriate real and imaginary components; their individual observability depends on the chosen transformation. The real part of the coupling contributes to the cosine channel, while the imaginary part contributes to the sine channel.
Each phase codeword can be associated, up to a global phase, with a trigonometric signature
and transitions between codewords correspond to deterministic transformations of these signatures. In Hadamard-encoded systems these appear as sign flips in , whereas for general codes they involve simultaneous changes in multiple cosine and sine components. The structure, however, remains fully deterministic.
In the presence of small phase noise on each mode, the differences shift as with . First-order expansions give
illustrating that the two quadratures exhibit complementary noise responses. Whenever one observable becomes unreliable due to a zero crossing, the other typically remains strong, providing intrinsic redundancy that enhances robustness.
These expressions establish the generic possibility of sinusoidal intensity responses, not generic access to every quadrature or an invertible measurement map. For other codebooks, suitably chosen interferometers may yield useful distinguishable signatures, but this requires an independent identifiability and noise analysis. Mutually unbiased bases are one possible structured family of interest [28]; no such extension is implemented or proven here. Related hardware-oriented contexts include integrated optical neural networks [16] and machine-learning-assisted integrated photonics [18].
Conclusion
We developed and experimentally tested a fixed eight-port photonic receiver for differential Hadamard-4 decoding using intensity measurements alone. The selected unitary maps three effective input-relative phases to six trigonometric observables recoverable by explicit linear combinations of eight output powers. The contribution lies in the combined receiver construction, simultaneous observable reconstruction, and Hadamard-specific transition discrimination without continuous optical phase feedback, rather than in quadrature detection considered separately. The appendix proves exact reconstruction and almost-everywhere distinguishability of four transition signatures, identifies 24 exceptional configurations, and gives noise bounds conditional on a known stable reference.
The experimental analytical decoder reached 96.19% accuracy on its measured sequence without continuous optical phase feedback. A separate machine-learning analysis reports 98.31% on its held-out experimental test data. Because the two evaluations are not established here as a matched head-to-head test, their percentages are presented as separate experimental results. Neither result demonstrates reference-free absolute codeword identification or unrestricted tolerance to rapid phase diffusion.
We also compared the conventional four-port Hadamard decoder and the proposed eight-port receiver under an explicitly idealized, equal-detected-photon model. The added outputs resolve an example phase ambiguity of the four-port receiver and reduce conditional classification errors in the stated numerical comparison. These results identify a useful design trade-off; they are not a guarantee of superiority under arbitrary optical loss, detector noise, or drifting references.
Potential directions include structured phase-coded classical links, optical code-division multiple access, and phase-sensitive preprocessing in programmable photonic circuits. Applications to non-Hadamard codebooks and quantum photonic measurements would require separate receiver-design and measurement analyses. Similarly, the fixed optical transformation avoids continuous input-phase feedback but does not imply that maintaining thermo-optic biases is electrically free. Actual power consumption, latency, scalability, and network-level performance remain to be measured.
Funding
This work was financed by the DFG via grant NO 1129/2-1 and by the Federal Ministry of Education and Research of Germany via grants 16KIS1598K, 16KISQ093, 16KISQ077 and 16KIS2604. The generous support of the state of Bavaria via the 6GQT project is greatly appreciated. Finally, the authors acknowledge the financial support by the Federal Ministry of Education and Research of Germany in the programme of “Souverän. Digital. Vernetzt.”. Joint project 6G-life, project identification number: 16KISK002.
Disclosures
The authors declare no conflicts of interest.
Data availability
Data underlying the results presented in this paper are available from the corresponding author upon reasonable request.
References
Algebraic Identifiability and Noise Robustness of Hadamard Codeword Transitions
Exact reconstruction from output powers
We first verify that the six trigonometric observables used by the decoder are directly reconstructible from the eight output-power measurements. With the input state in Eq. (8) and the fixed unitary transformation in Eq. (9), let
Define
Direct matrix multiplication gives the affine mapping
where
The columns of are mutually orthogonal:
Hence the exact inverse formula is
For normalized measured powers, this is equivalently
These identities hold for arbitrary , , , rather than only ideal Hadamard phases. Thus all six observables can be recovered from intensity measurements alone in the ideal model. The six quantities are constrained by the three input-relative phases and should not be interpreted as six independent degrees of freedom.
Hadamard transition operators
The phases , , are relative to the first populated input mode. For a four-dimensional Hadamard codebook with its first component fixed, the allowed transitions are no change or a shift of exactly two phases:
They act on through diagonal sign matrices, , where
The matrices satisfy and , with corresponding cyclic identities. The transition group is therefore isomorphic to .
Almost-everywhere identifiability
Theorem A1 (Almost-everywhere identifiability). For every except a finite set, the four candidate signatures , , , and are pairwise distinct.
Proof. For any two candidates define
The second equality follows because the commuting sign matrices are orthogonal and symmetric. Thus every pairwise distance is one of
Each right-hand side is a sum of nonnegative terms and vanishes only when every term vanishes. Their zero sets are
Each family has eight members in , and the families are disjoint. Therefore there are exactly 24 exceptional phase configurations. At all other configurations every nonidentity transition distance is positive, so all four candidates are distinct. □
Corollary A1. If has a probability distribution absolutely continuous with respect to Lebesgue measure, the probability of exact transition ambiguity is zero.
This concerns transition identification from a known, unchanged reference signature, not absolute codeword identification without an initial state.
Minimum signature separation
Define
Theorem A1 implies outside the exceptional set, but approaches zero near that set. Thus the result does not give a phase-uniform noise margin.
For a candidate transition , Eq. (52) gives the ideal power vector
Using ,
Hence the mapping scales every squared pairwise signature distance by . Exact ambiguities in observable space and in ideal output power space coincide.
Ideal photon-counting comparison protocol
The quantitative four-port/eight-port comparison in § 2.4 is a numerical ideal-model benchmark, separate from either experimental decoding algorithm. The pre-transition phases are supplied without uncertainty to both receivers, each trial uses the same fixed number of detected photons , and a conditional multinomial likelihood is maximized across the four possible transitions. Each random phase triple is drawn independently and uniformly on , with a uniformly random true transition. This benchmark excludes phase drift within the detection interval, loss and channel-dependent detector effects, and uncertainty in the pre-transition reference. The finite-sample estimates are illustrated in Figure 7; reproducibility code and exact counts are included in the accompanying source archive.
Conditional error bound under Gaussian noise
Assume that the reference is known and remains fixed during the transition comparison, and model the reconstructed observation as
Consider the minimum-distance decoder
Proof. For an incorrect hypothesis , set . The decoder can prefer only if
Since is Gaussian with variance , the probability of this event is
There are three incorrect hypotheses, and every pairwise distance is at least . The union bound, combined with the trivial upper bound of one, proves Eq. (79). □
This bound applies to the ideal nearest-signature decoder with a known reference. It does not directly bound a sign-only sequential decoder under drift between measurements.
Correlated observable noise
The six observables are reconstructed from the same eight powers, so their measurement errors can be correlated. Let
Applying the exact linear reconstruction produces
and consequently
If , then
Thus the isotropic observable-noise model corresponds to independent, equal-variance additive noise on the eight unnormalized powers. If the recorded powers are first divided by their fluctuating sum, the resulting normalization generally introduces inter-channel correlations, and must refer to the covariance after that processing step. Unequal detector variances and other noise mechanisms may also yield non-isotropic observable noise.
For Gaussian observable noise with fixed positive-definite covariance , the maximum-likelihood rule is
Define
The Gaussian pairwise-error argument yields
These results establish conditional distinguishability under explicit measurement models. They do not assume that Brownian phase evolution is negligible over arbitrarily long comparison intervals, and they do not provide unconditional guarantees under arbitrary phase drift or inaccurate reference estimation.
References
- [1]Li, W., Wang, D., and Liu, J., 2024. "Robust Walsh–Hadamard Transform Based Imaging Method for Low-SNR Scenes." Sensors, 24(10), 3062. https://doi.org/10.3390/s24103062
- [2]Wei, Z. and Ghafouri-Shiraz, H., 2002. "Codes for spectral-amplitude-coding optical CDMA systems." Journal of lightwave technology, 20(8), p.1284.
- [3]Noshad, M. and Brandt-Pearce, M., 2016. "Hadamard-coded modulation for visible light communications." IEEE Transactions on Communications, 64(3), pp.1167-1175.arxiv.org/abs/1406.2897
- [4]Luo, W., Cao, L., Shi, Y., Wan, L., Zhang, H., Li, S., Chen, G., Li, Y., Li, S., Wang, Y. and Sun, S., 2023. "Recent progress in quantum photonic chips for quantum communication and internet.", Light: Science & Applications, 12(1), p.175.DOI
- [5]Flamini, F., Spagnolo, N. and Sciarrino, F., 2018. "Photonic quantum information processing: a review.", Reports on Progress in Physics, 82(1), p.016001.DOI
- [6]Aghaee Rad, H., Ainsworth, T., Alexander, R.N., Altieri, B., Askarani, M.F., Baby, R., Banchi, L., Baragiola, B.Q., Bourassa, J.E., Chadwick, R.S. and Charania, I., 2025. "Scaling and networking a modular photonic quantum computer.", Nature, 638(8052), pp.912-919.
- [7]Maring, N., Fyrillas, A., Pont, M., Ivanov, E., Stepanov, P., Margaria, N., Hease, W., Pishchagin, A., Lemaître, A., Sagnes, I. and Au, T.H., 2024. "A versatile single-photon-based quantum computing platform." Nature Photonics, 18(6), pp.603-609.DOI
- [8]Elmas, G., Litvin, I., Kohl, P., and Nötzel, J., 2025. "Modeling and analysis of phase instability in photonic processors." Applied Optics, 64(14), 3995-4003.DOI
- [9]Litvin, I. A., Elmas, G., El-Safty, K., Chaudhary, S., and Nötzel, J. (2025). "Robust calibration and energy optimization in reconfigurable photonic processors." Optics Express, 33(16), 35011-35027.
- [10]I. A. Litvin, G. Elmas, P. Kohl and J. Nötzel, "Stable Signal Processing with a Photonic Processor," in Journal of Lightwave Technology, doi: 10.1109/JLT.2025.3606027.DOI
- [11]G. Elmas, I. A. Litvin, and J. Nötzel, “Local Variance-Based Calibration of Programmable Photonic Interferometer Meshes,” Journal of Lightwave Technology, submitted for publication, 2026. [Online]. Available: https://arxiv.org/abs/2607.14759.
- [12]Madsen, L. S., Laudenbach, F., et al., 2022. "A quantum computational advantage with a programmable photonic processor." Nature, 606(7912), 75–81. https://doi.org/10.1038/s41586-022-04725-x
- [13]Reck, M., Zeilinger, A., Bernstein, H.J. and Bertani, P., 1994. "Experimental realization of any discrete unitary operator." Physical review letters, 73(1), p.58.pubmed.ncbi.nlm.nih.gov/10056719
- [14]Cui, C., Postlewaite, J., Saif, B.N., Fan, L. and Guha, S., 2025. "Superadditive communication with the green machine as a practical demonstration of nonlocality without entanglement." Nature Communications, 16(1), p.3760.
- [15]Qiang, X., Zhou, X., Wang, J., Wilkes, C.M., Loke, T., O’Gara, S., Kling, L., Marshall, G.D., Santagati, R., Ralph, T.C. and Wang, J.B., 2018. "Large-scale silicon quantum photonics implementing arbitrary two-qubit processing." Nature photonics, 12(9), pp.534-539.DOI
- [16]Shen, Y., Harris, N. C., Skirlo, S., et al., 2017. "Deep learning with coherent nanophotonic circuits." Nature Photonics, 11(7), 441–446.https://doi.org/10.1038/nphoton.2017.93
- [17]Harris, N., Steinbrecher, G. R., Prabhu, M., Lahini, Y., Mower, J., Bunandar, D., Chen, C., Wong, F. N., Baehr-Jones, T., Hochberg, M. and Lloyd, S., 2017. "Quantum transport simulations in a programmable nanophotonic processor." Nature Photonics, 11(7), pp.447-452.DOI
- [18]Kudyshev, Z. A., Shalaev, V. M., and Boltasseva, A., 2021. "Machine Learning for Integrated Quantum Photonics." ACS Photonics, 8(1), 34–46. doi:10.1021/acsphotonics.0c00960.DOI
- [19]C. G. H. Roeloffzen et al., "Low-Loss Si3N4 TriPleX Optical Waveguides: Technology and Applications Overview," in IEEE Journal of Selected Topics in Quantum Electronics, vol. 24, no. 4, pp. 1-21, July-Aug. 2018, Art no. 4400321, doi: 10.1109/JSTQE.2018.2793945.DOI
- [20]Caterina Taballione, Tom A. W. Wonterink, Jasleen Lugani, Andreas Eckstein, Bryn A. Bell, Robert Grootjans, Ilka Visscher, Dimitri Geskus, Chris G. H. Roeloffzen, Jelmer J. Renema, Ian A. Walmsley, Pepijn W. H. Pinkse, and Klaus-J. Boller, "8x8 reconfigurable quantum photonic processor based on silicon nitride waveguides," Opt. Express 27, 26842-26857 (2019)DOI
- [21]Bogaerts, W., Pérez, D., Capmany, J., Miller, D. A., Poon, J., Englund, D., ... & Melloni, A. (2020). "Programmable photonic circuits." Nature, 586(7828), 207-216.
- [22]Clements, W. R., Humphreys, P. C., Metcalf, B. J., Kolthammer, W. S., & Walmsley, I. A. (2016). "Optimal design for universal multiport interferometers." Optica, 3(12), 1460-1465.arxiv.org/abs/1603.08788
- [23]David A. B. Miller, "Perfect optics with imperfect components," Optica 2, 747-750 (2015)DOI
- [24]I. A. Litvin, G. Elmas, P. Kohl, and J. Nötzel, "Multi-input signal phase stabilization in photonic processors with on-chip feedback control," Optics Express, 34(6), 11244–11258 (2026), doi:10.1364/OE.579969.DOI
- [25]I. A. Litvin, G. Elmas, and J. Nötzel, "Joint Detection on Reconfigurable Photonic Processors With Multi-Input Phase Stabilization," IEEE Photonics Journal (2026), doi:10.1109/JPHOT.2026.3683204.DOI
- [26]M. Paryżková, C. S. Hamilton, I. Jex, M. Stefsky, and C. Silberhorn, "Input phase noise in Gaussian boson sampling," Physical Review A, 114, 022203 (2026), doi:10.1103/pddb-5z5q.DOI
- [27]G. Elmas, I. A. Litvin, and J. Nötzel, "Phase-Drift Limits and Adaptive Quadrature Readout in Programmable Photonic Processors," arXiv:2608.02249 (2026).arxiv.org/abs/2608.02249
- [28]Durt, T., Englert, B. G., Bengtsson, I., & Życzkowski, K. (2010). "On mutually unbiased bases." International journal of quantum information, 8(04), 535-640.DOI
