# Unary Quantum Finite State Automata with Control Language
## 5 QFCs for Unary Regular Languages
### Reducing the Size  
Our first type of quantum component used in Section 5.2 is actually a dfa \"disguised\" as a qfa. This leads to a deterministic recognition of unary regular languages but actually does not allow one to fully exploit the high descriptional power of the quantum paradigm (where an error probability in the classification of input strings is potentially permitted).  
Here, we are going to build a smaller qfc for the unary regular language \(L=L_{T}\cup L_{P}\) by designing a more succinct quantum component for the \(P\)-periodic language \(L_{P\odot}\): recall that \(L_{P}=L_{P\odot}\cap\sigma^{\geq T}\). To this aim, we need a result on the ability of mo-qfa to induce linear approximations of periodic stochastic events by using a very limited amount of basis states (see the beginning of Section 4 for the definition of a periodic stochastic event):  
**Theorem 5** ([39]): _For any \(P\)-periodic stochastic event \(p\), there exists a unary mo-qfa with at most \(2\sqrt{6P}+25\) basis states inducing the \(P\)-periodic stochastic event \(\mu\cdot p+\tau\) for suitable \(\mu,\tau\in\mathbb{R}\) satisfying \(\mu>0\), \(\tau\geq 0\), and \(\mu+\tau\leq 1\)._  
Now, with any \(P\)-periodic language \(\Pi\subseteq\sigma^{*}\), we can associate its characteristic function \(\chi_{\Pi}:\mathbb{N}\to\{0,1\}\), defined as  
\[\chi_{\Pi}(k)=\begin{cases}1&\text{if }\sigma^{k}\in\Pi\\ 0&\text{otherwise,}\end{cases}\]  
which is clearly a \(P\)-periodic stochastic event. By Theorem 5, there exists a mo-qfa with \(2\sqrt{6P}+25\) basis states inducing the \(P\)-periodic stochastic event \(\mu\cdot\chi_{\Pi}+\tau\). It is easy to see that we can use \(A_{\Pi}\) to recognize the language \(\Pi\) with cut point \(\lambda=\tau+\frac{\mu}{2}\) and radius of isolation \(\varrho=\frac{\mu}{2}\). As a matter of fact, it is always possible to have an isolated cut point \(\lambda\geq\frac{1}{2}\), paying with an additional basis state (see [39] for technical details). This enables us to state  
**Theorem 6**: _Any \(P\)-periodic language can be recognized with isolated cut point \(\lambda\geq\frac{1}{2}\) by an mo-qfa featuring no more than \(2\sqrt{6P}+26\) basis states._  
Therefore, given the \(P\)-periodic language \(L_{P\odot}\), we let \(B=(\varphi_{B},\ \{U_{B}(\sigma),\ U_{B}(\sharp)\},\ \mathcal{O}_{B})\) with observable \(\mathcal{O}_{B}=a\cdot P_{B}(a)+r\cdot P_{B}(r)\) be the isolated cut point mo-qfa for \(L_{P\odot}\) with \(\ell=2\sqrt{6P}+26\) basis states resulting from Theorem 6. We can replace the quantum component in the qfc \(A\) detailed in Section 5.2 with \(B\), thus obtaining our second version \(\tilde{A}=(\varphi,\ \{U(\sigma),\ U(\sharp)\},\ \mathcal{O},\ \mathcal{L})\) of a qfc for the unary regular language \(L\), where:  
* \(\varphi=\varphi_{B}\oplus\mathbf{0}\in\mathbb{C}^{2\cdot\ell}\) is the initial superposition, with \(\|\varphi\|=\|\varphi_{B}\|=1\);
* \(U(\sigma)=U_{B}(\sigma)\oplus I^{(\ell)}\) and \(U(\sharp)=\begin{pmatrix}\mathbf{0}&U_{B}(\sharp)\\ U_{B}(\sharp)&\mathbf{0}\end{pmatrix}\) are the unitary evolution matrices;
* \(\mathcal{O}=\mathcal{S}\cdot P(\mathcal{S})+a\cdot P(a)+r\cdot P(r)\) is the \(2\cdot\ell\times 2\cdot\ell\) observable for which the projectors are defined as \(P(g)=I^{(\ell)}\oplus\mathbf{0}\), \(P(a)=\mathbf{0}\oplus P_{B}(a)\), and \(P(r)=\mathbf{0}\oplus P_{B}(r)\);
* \(\mathcal{L}=\{y\in g^{*}\{a,r\}\ |\ \sigma^{|y|_{g}}\in L_{T}\text{ or }y\in g^{\geq T}a\}\subseteq\{a,r,g\}^{*}\) is the control language recognized by the dfa \(D\) in Figure 6.  
By reasoning as in Section 5.2, one may verify that \(\tilde{A}\) is an isolated cut point qfc for the unary regular language \(L\). Thus, we can conclude with  
**Theorem 7**: _Let \(L\) be a unary regular language recognized by a dfa with \(T\) states in the initial path and \(P\) states in the cycle. Then, there exists a qfc recognizing \(L\) with isolated cut point \(\lambda\geq\frac{1}{2}\) and featuring \(4\sqrt{6P}+52\) quantum basis states and \(T+3\) classical states._