arXiv:2608.29319cs.FLAug 2026

Manuscript Offprint

arXiv:2608.29319

The Emptiness Problem for Quantum Finite Automata with Classical States

Jyun-Ao Lin, Patrick Totzke, Yun Chen Tsai, Di-De Yen

Jyun-Ao Lin 1^{1}[0000-0001-8560-2147], Patrick Totzke 2^{2}[0000-0001-5274-8190], Yun Chen Tsai 3^{3}[0009-0003-7705-9609], and Di-De Yen 2^{2}[0000-0003-0045-9594]

1^{1} National Taipei University of Technology, Taiwan

2^{2} School of Computer Science and Informatics, University of Liverpool, UK

3^{3} National Institute of Informatics and SOKENDAI, Japan

Abstract. Quantum Finite Automata with Classical states (QFACs) are nondeterministic finite automata over a finite alphabet of quantum operations. We study expressiveness of this model on finite words and the corresponding emptiness problem. We show that regular languages are incomparable with those definable by Quantum Finite Automata (QFAs) and that both are strictly subsumed by QFAC-definable languages. We show that the emptiness problem for a QFAC can be reduced to the emptiness of the language intersection of a QFA and a finite automaton. This intersection is known to be decidable for strict thresholds but undecidable for non-strict cases. Furthermore, we consider the problem for flat QFACs, a restriction where the underlying automata contain no nested loops, and relate it to the higher-dimensional orbit problem, a long-standing open challenge in dynamical systems.

Finally, we propose a sound and semi-complete witness searching procedure to verify the non-emptiness of one-loop QFACs, which are sufficiently expressive to represent some prominent quantum algorithms, such as Grover's search and quantum random walks.

Keywords: Quantum Finite Automata · Verification · Emptiness

1 Introduction

Formal verification of critical hardware and software is well established, both at circuit [13,12,25,45,32,46] and program level [52,47,26,48,51]. For quantum systems, circuit verification [50,3,14,1,18,29,28,38] has received far more attention than program-level verification [16,56,35,17], where current methods require user-supplied proofs or annotations.

In the automated verification of classical programs, state machines or automata are frequently used to simulate program behavior [4]. The added complication in quantum programs is that they combine classical control flow with operations on quantum states. Therefore, in order to replicate the automata-based approach to verification, we need a model that captures both aspects. Several such automata models have been proposed for quantum computation, including quantum finite automata (QFAs) [41,10,9], quantum finite automata

J.A. Lin, P. Totzke, Y.C. Tsai, and D.D. Yen

void eq(int x, int y){ qubit z=|0\rangle; for(int i=0; i<x; i++) z = rotate(z); for(int i=0; i<y; i++) z = reverse_rotate(z); if(measure(z)==|0\rangle) return 1; else return 0; }

(a) A C-like code subroutine.

Figure

(b) The corresponding QFAC A, where the symbols a and c refer to the quantum operations rotate and reverse_rotate, respectively, while the symbol b refers to the identity operation.

Fig. 1: An example of a QFAC simulating the behavior of a quantum program.

with control languages (QFALs) [40], and quantum finite automata with classical states (QFACs) [43,55]. The latter two generalize the basic QFA model which, perhaps surprisingly, does not incorporate a finite-state control and instead corresponds to a single state with one or more loops that determine operations on the quantum state. In this work, we focus on QFACs, in which the classical states simulate and track program control flow while quantum operations act on the quantum state throughout the computation. A QFAC acts as a language acceptor over an alphabet of quantum operations; a word is accepted if there exists a run such that the final quantum state, derived by applying the operations dictated by the word starting in a fixed initial quantum state, lies within a target space. This allows to study decision problems such as equivalence, minimization, and emptiness to argue about the represented quantum programs. Among these, the emptiness problem is the most fundamental and corresponds to the problem to determine whether a specific program configuration is reachable.

Example 1. Consider the quantum program in Fig. 1a, represented by the QFAC in Fig. 1b, which preserves the program flow as well as semantics directly: The single qubit state z is initialized as ∣0⟩|0\rangle. In the first for-loop, at each iteration, the quantum state is rotated by a given angle θ\theta; in the second for-loop, it is rotated by an angle of −θ-\theta. The probability that the subroutine returns the value 1 depends on the input values x and y. Specifically, the probability that the subroutine returns 1, and correspondingly that the automaton A accepts the word axbcya^x bc^y, is ∣cos⁡((x−y)⋅θ)∣|\cos((x - y) \cdot \theta)|.

Analogous to classical finite automata (FAs), QFAs are categorized as either one-way [41,11] or two-way [33]. An FA is two-way if it can move its input head both backward and forward on the input tape; otherwise, it is one-way, and each input symbol can be accessed only once. For FAs, one-way and two-way models recognize exactly the class of regular languages [27]. In contrast to their classical counterparts, one-way QFAs are strictly less expressive than two-way QFAs [33].

Information about the state of a quantum system is obtained through measurement, and unlike in classical systems, measurement affects the state of the

Figure

Fig. 2: Relative expressiveness of quantum automata models.

system. Based on the number of measurements performed during computation, QFAs can be classified into measure-once QFAs (MO-QFAs) [41] and measure-many QFAs (MM-QFAs) [11,37]. In an MO-QFA, the quantum state is measured only at the end of the computation, whereas in an MM-QFA, measurements may be performed throughout the computation. In terms of expressive power, MM-QFAs are more powerful than MO-QFAs [11]. These one-way/two-way and measure-once/measure-many distinctions apply to the various extensions of QFAs as well.

The semantics of QFAs and their extensions vary across the literature, including cut-point semantics [10,9,40] and bounded-error semantics [11,42,44,54,55]. Regarding expressiveness, QFACs under bounded-error semantics recognize exactly the class of regular languages [44]. In this paper, we focus on cut-point semantics, where QFAC languages are defined based on a threshold λ∈[0,1]\lambda \in [0,1] and a comparison operator ⋈∈{>,<,≥,≤}\bowtie \in \{>, <, \geq, \leq\}. For instance, if λ=1/3\lambda = 1/3 and ⋈\bowtie is ≥\geq, the corresponding language is the set of words with an acceptance probability of at least 1/3. We prove that QFAs and FAs are incomparable, and both are strictly less powerful than QFACs in terms of expressiveness, referring to Fig. 2.

We study the emptiness problem for QFACs, which asks whether the language recognized by a QFAC is empty for a given threshold λ\lambda and comparison operator ⋈\bowtie. It is known that this problem is decidable for QFAs with a strict comparison operator ∈{>,<}\in \{>, <\}, but undecidable with a non-strict comparison operator ∈{≥,≤}\in \{\geq, \leq\} [10]. We show that the same result holds for QFACs by reducing the problem to the language intersection of a QFA and an FA, which is known to be decidable in the strict case [8]. Additionally, we study the emptiness problem for flat QFACs, which are QFACs without nested loops, and relate it to the higher-dimensional orbit problem, a long-standing open problem [30]. Specifically, we provide a reduction from the emptiness problem for one-loop QFACs (which are a subclass of flat QFACs) to the higher-dimensional orbit problem. Furthermore, we establish complexity lower bounds for the emptiness problem of QFACs and flat QFACs. This is achieved by reducing the DFA universality problem (PSpace-complete) and the Hamiltonian path problem (NP-complete) to these problems, respectively. The results are summarized in Table 1.

Finally, we develop a tool for searching for witnesses to non-emptiness for one-loop QFACs. Even though the problem is decidable in the strict case, the algorithm proposed in the proof and in [10,8] requires iteratively solving a quantifier elimination problem over the reals, which does not scale in practice. Another common line of approach [2,49] is to design suitable templates for witnesses and solve them using SMT solvers such as Z3 [24], which also does not scale

J.A. Lin, P. Totzke, Y.C. Tsai, and D.D. Yen

Emptinessgeneralone-loop/unary QFAflatflat and finite group
strictPSPACE-hardNP-hardNP-hardNP-hard
non-strictundecidabledecidable while rank(P)=0,1,2,n-2,n-1,n?decidable

Table 1: Summary of results

when polynomial templates and objectives are involved due to blow-ups in the number of variables. Alternatively, we propose a witness generation procedure based on nonlinear integer programming (NIP). Our witness does not depend on any predefined template. We systematically generate them based on the Taylor approximation of trigonometric functions and verify them using an NIP solver Mindtpy [7]. We formally prove that our witness is not only sound but also semi-complete for the strict operator. We demonstrate through experiments that our tool can successfully verify Grover's search for up to 13 qubits and quantum random walks for up to 4 qubits.

References (45)