# An Enhanced Photonic Quantum Finite Automaton
## 5 Confidence Amplification: An Enhanced Strategy  
To reduce the probability of error, we can adopt a technique of confidence amplification as also proposed in [6], namely, we sent a mean number of photons \(\langle N_{\text{c}}\rangle\) and we count the number of click \(N_{\text{c}}^{x}(k)\) at the photodetector \(x=H,V\), see Figure 1. Therefore, the observed detection frequency at detector \(x=H,V\) for an input word \(a^{k}\) will be  
\[f_{k}^{x}=\frac{N_{\text{c}}^{x}(k)}{\langle N_{\text{c}}\rangle}\xrightarrow[ \langle N_{\text{c}}\rangle\gg 1]{}p_{\mathcal{A}_{i-1,2}}^{x}(a^{k})\,. \tag{11}\]  
Thereafter, we turn our problem into that of discriminating among the corresponding detection frequencies and, in particular, we can focus on those related to \(k=0\) (or, equiva  
Figure 1: Scheme of the photonic implementation of the 1 qfa highlighting the main involved optical elements. See the text for details. lently, \(k\mod m=0\)) and \(k=1\) (or, more in general, \(k\mod m=1\)), since if \(k>1\) one has \(f_{k}^{H}<f_{1}^{H}\) (\(f_{k}^{V}>f_{1}^{V}\)). To implement this strategy, we set a threshold frequency as  
\[f_{\text{th}}^{x}=\frac{f_{0}^{x}+f_{1}^{x}}{2}= \begin{cases}\frac{1+f_{1}^{H}}{ 2}&x=H,\\ \frac{f_{1}^{V}}{2}&x=V,\end{cases}  \tag{12}\]  
where \(f_{1}^{H}\) (\(f_{1}^{V}\)) is the highest (lowest) frequency of erroneously accepted words \(a^{k_{1}}\), while \(f_{0}^{H}\) (\(f_{0}^{V}\)) is the frequency corresponding to the correct word. In this formula, we have distinguished the two different strategies: for the \(H\) detector, \(f_{0}^{H}=1\), as the corresponding photon will always be detected; instead, for the \(V\) detector, \(f_{0}^{V}=0\), as no photon is detected when the word belongs to \(L_{m}\). Therefore, the strategy is to accept the word if \(f_{k}^{H}>f_{\text{th}}^{H}\) (\(f_{k}^{V}<f_{\text{th}}^{V}\)) and reject it if \(f_{k}^{H}<f_{\text{th}}^{H}\) (\(f_{k}^{V}>f_{\text{th}}^{V}\)). From now on, we will refer to these strategies as \"H strategy\" and \"V strategy\", respectively. In an ideal scenario, namely, without fluctuations in the sent number of photons, it is clear that the two approaches are complementary and yield to the same conclusion, as the single detections in \(H\) and \(V\) are perfectly correlated. Moreover, given that only the words \(a^{k}\in L_{m}\) satisfy the condition \(f_{k}>f_{\text{th}}\), with this strategy we have a zero error probability, provided that \(\langle N_{\text{c}}\rangle\) is large enough such that the integer part of \(N_{\text{th}}^{H}\) (\(N_{\text{th}}^{V}\)) is strictly positive (negative) than \(N_{\text{c}}^{H}(k_{1})\) (\(N_{\text{c}}^{V}(k_{1})\)), i.e., we have the conditions  
\[\left\lfloor N_{\text{th}}^{H}\right\rfloor =\left\lfloor\frac{\langle N_{\text{c}}\rangle(1+\cos^{2}\theta_ {m})}{2}\right\rfloor>\left\lfloor\langle N_{\text{c}}\rangle\cos^{2}\theta_ {m}\right\rfloor, \tag{13}\] \[\left\lfloor N_{\text{th}}^{V}\right\rfloor =\left\lfloor\frac{\langle N_{\text{c}}\rangle\sin^{2}\theta_{m} }{2}\right\rfloor<\left\lfloor\langle N_{\text{c}}\rangle\sin^{2}\theta_{m} \right\rfloor. \tag{14}\]  
In Figure 2 (black lines and dots), we report the minimum values of \(\langle N_{c}\rangle\) such that the last two inequalities hold. In a realistic scenario, the photo-detection is influenced by two distinct noisy effects that can affect the error probability. The first is that the number of detected photons follows a Poisson distribution [32], that is, we have  
\[\text{Poi}(n;\mu)=\frac{\mu^{n}e^{-\mu}}{n!} \tag{15}\]  
Figure 2: Black line and dots: minimum value \(\langle N_{\text{c}}\rangle^{min}\) such that Equation (13) (**left plot**) and Equation (14) (**right plot**) are satisfied as a function of \(m\) in the absence of dark counts (\(N_{\text{dc}}=0\)). Red line and dots (\(N_{\text{dc}}=50\)), blue line and dot (\(N_{\text{dc}}=100\)): minimum value \(\langle N_{\text{c}}\rangle^{min}\) such that Equation (22) (**left plot**) and Equation (23) (**right plot**) are satisfied.