Definitions

# Quantum finite automata

In quantum computing, quantum finite automata or QFA are a quantum analog of probabilistic automata. They are related to quantum computers in a similar fashion as finite automata are related to Turing machines. Several types of automata may be defined, including measure-once and measure-many automata. Quantum finite automata can also be understood as the quantization of subshifts of finite type, or as a quantization of Markov chains. QFA's are, in turn, special cases of geometric finite automata or topological finite automata.

The automata work by accepting a finite-length string $sigma=\left(sigma_0,sigma_1,cdots,sigma_k\right)$ of letters $sigma_i$ from a finite alphabet $Sigmanisigma_i$, and assigning to each such string a probability $operatorname\left\{Pr\right\}\left(sigma\right)$ indicating the probability of the automaton being in an accept state; that is, indicating whether the automaton accepted or rejected the string.

## Measure-once automata

Measure-once automata were introduced by Moore and Crutchfield. They may be defined formally as follows.

As with an ordinary finite automaton, the quantum automaton is considered to have $N$ possible internal states, represented in this case by an $N$-state qubit $|psirangle$. More precisely, the $N$-state qubit $|psiranglein mathbb \left\{C\right\}P^N$ is an element of $N$-dimensional complex projective space, carrying an inner product $VertcdotVert$ that is the Fubini-Study metric.

The state transitions, transition matrixes or de Bruijn graphs are represented by a collection of $Ntimes N$ unitary matrixes $U_alpha$, with one unitary matrix for each letter $alphainSigma$. That is, given an input letter $alpha$, the unitary matrix describes the transition of the automaton from its current state $|psirangle$ to its next state $|psi^primerangle$:

$|psi^primerangle = U_alpha |psirangle$

Thus, the triple $\left(mathbb \left\{C\right\}P^N,Sigma,\left\{U_alphavertalphainSigma\right\}\right)$ form a quantum semiautomaton.

The accept state of the automaton is given by an $Ntimes N$ projection matrix $P$, so that, given a $N$-dimensional quantum state $|psirangle$, the probability of $|psirangle$ being in the accept state is

$langlepsi |P |psirangle = Vert P |psirangleVert^2$

The probability of the state machine accepting a given finite input string $sigma=\left(sigma_0,sigma_1,cdots,sigma_k\right)$ is given by

$operatorname\left\{Pr\right\}\left(sigma\right) = Vert P U_\left\{sigma_k\right\} cdots U_\left\{sigma_1\right\} U_\left\{sigma_0\right\}|psirangleVert^2$

Here, the vector $|psirangle$ is understood to represent the initial state of the automaton, that is, the state the automaton was in before it stated accepting the string input. The empty string $varnothing$ is understood to be just the unit matrix, so that

$operatorname\left\{Pr\right\}\left(varnothing\right)= Vert P |psirangleVert^2$

is just the probability of the initial state being an accepted state.

Because the left-action of $U_alpha$ on $|psirangle$ reverses the order of the letters in the string $sigma$, it is not uncommon for QFA's to be defined using a right action on the Hermitian transpose states, simply in order to keep the order of the letters the same.

A regular language is accepted with probability $p$ by a quantum finite automaton, if, for all sentences $sigma$ in the language, (and a given, fixed initial state $|psirangle$), one has

## Example

Consider the classical deterministic finite state machine given by the state transition table
State Transition Table
Input
State
1 0
S1 S1 S2
S2 S2 S1
State Diagram

The quantum state is a vector, in bra-ket notation

$|psirangle=a_1 |S_1rangle + a_2|S_2rangle =$
begin{bmatrix} a_1 a_2 end{bmatrix}

with the complex numbers $a_1,a_2$ normalized so that

$begin\left\{bmatrix\right\} a^*_1 ;; a^*_2 end\left\{bmatrix\right\} begin\left\{bmatrix\right\} a_1 a_2 end\left\{bmatrix\right\} = a_1^*a_1 + a_2^*a_2 = 1$

The unitary transition matrices are

$U_0=begin\left\{bmatrix\right\} 0 & 1 1 & 0 end\left\{bmatrix\right\}$

and

$U_1=begin\left\{bmatrix\right\} 1 & 0 0 & 1 end\left\{bmatrix\right\}$

Taking $S_1$ to be the accept state, the projection matrix is

$P=begin\left\{bmatrix\right\} 1 & 0 0 & 0 end\left\{bmatrix\right\}$

As should be readily apparent, if the initial state is the pure state $|S_1rangle$ or $|S_2rangle$, then the result of running the machine will be exactly identical to the classical deterministic finite state machine. In particular, there is a language accepted by this automaton with probability one, for these initial states, and it is identical to the regular language for the classical DFA, and is given by the regular expression:

$\left(1^*\left(01^*0\right)^*\right)^* ,!$

The non-classical behaviour occurs if both $a_1$ and $a_2$ are non-zero. More subtle behaviour occurs when the matrices $U_0$ and $U_1$ are not so simple; see, for example, the de Rham curve as an example of a quantum finite state machine acting on the set of all possible finite binary strings.

## Measure-many automata

Measure-many automata were introduced by Kondacs and Watrous in 1997.. The general framework resembles that of the measure-once automaton, except that instead of there being one projection, at the end, there is a projection, or quantum measurement, performed after each letter is read. A formal definition follows.

The Hilbert space $mathcal\left\{H\right\}_Q=mathbb\left\{C\right\}P^N$ is decomposed into three orthogonal subspaces

$mathcal\left\{H\right\}_Q=mathcal\left\{H\right\}_mbox\left\{accept\right\} oplus mathcal\left\{H\right\}_mbox\left\{reject\right\} oplus mathcal\left\{H\right\}_mbox\left\{non-halting\right\}$

In the literature, these orthogonal subspaces are usually formulated in terms of the set $Q$ of orthogonal basis vectors for the Hilbert space $mathcal\left\{H\right\}_Q$. This set of basis vectors is divided up into subsets $Q_mbox\left\{acc\right\} subset Q$ and $Q_mbox\left\{rej\right\} subset Q$, such that

$mathcal\left\{H\right\}_mbox\left\{accept\right\}=operatorname\left\{span\right\} \left\{|qrangle : |qrangle in Q_mbox\left\{acc\right\} \right\}$

is the linear span of the basis vectors in the accept set. The reject space is defined analogously, and the remaining space is designated the non-halting subspace. There are three projection matrices, $P_mbox\left\{acc\right\}$, $P_mbox\left\{rej\right\}$ and $P_mbox\left\{non\right\}$, each projecting to the respective subspace:

$Pmbox\left\{acc\right\}:mathcal\left\{H\right\}_Q to mathcal\left\{H\right\}_mbox\left\{accept\right\}$

and so on. The parsing of the input sring proceeds as follows. Consider the automaton to be in a state $|psirangle$. After reading an input letter $alpha$, the automaton will be in the state

$|psi^primerangle =U_alpha |psirangle$

At this point, a measurement is performed on the state $|psi^primerangle$, using the projection operators $P$, at which time its wave-function collapses into one of the three subspaces $mathcal\left\{H\right\}_mbox\left\{accept\right\}$ or $mathcal\left\{H\right\}_mbox\left\{reject\right\}$ or $mathcal\left\{H\right\}_mbox\left\{non-halting\right\}$. The probability of collapse is given by

$operatorname\left\{Pr\right\}_mbox\left\{acc\right\} \left(sigma\right) = Vert P_mbox\left\{acc\right\} |psi^primerangle Vert^2$

for the "accept" subspace, and analogously for the other two spaces.

If the wave function has collapsed to either the "accept" or "reject" subspaces, then further processing halts. Otherwise, processing continues, with the next letter read from the input, and applied to what must be an eigenstate of $P_mbox\left\{non\right\}$. Processng continues until the whole string is read, or the machine halts. Often, additional symbols $kappa$ and \$ are adjoined to the alphabet, to act as the left and right end-markers for the string.

In the literature, the meaure-many automaton is often denoted by the tuple $\left(Q;Sigma; delta; q_0; Q_mbox\left\{acc\right\}; Q_mbox\left\{rej\right\}\right)$. Here, $Q$, $Sigma$, $Qmbox\left\{acc\right\}$ and $Qmbox\left\{rej\right\}$ are as defined above. The initial state is denoted by $|psirangle=|q_0rangle$. The unitary transformations are denoted by the map $delta$,

$delta:Qtimes Sigma times Q to mathbb\left\{C\right\}$

so that

$U_alpha |q_1rangle = sum_\left\{q_2in Q\right\} delta \left(q_1, alpha, q_2\right) |q_2rangle$

## Geometric generalizations

The above constructions indicate how the concept of a quantum finite automaton can be generalized to an arbitrary topological spaces. For example, one may take some (N-dimensional) Riemann symmetric space to take the place of $mathbb\left\{C\right\}P^N$. In place of the unitary matrices, one uses the isometries of the Riemannian manifold, or, more generally, some set of open functions appropriate for the given topological space. The initial state may be taken to be a point in the space. The set of accept states can be taken to be some arbitrary subset of the topological space. One then says that a formal language is accepted by this topological automaton if the point, after iteration by the homeomorphisms, intersects the accept set. But, of course, this is nothing more than the standard definition of an M-automaton. The behaviour of topological automata is studied in the field of topological dynamics.

The quantum automaton differs from the topological automaton in that, instead of having a binary result (is the iterated point in, or not in, the final set?), one has a probability. The quantum probability is the (square of) the initial state projected onto some final state P; that is $bold\left\{Pr\right\} = vert langle Pvert psirangle vert^2$. But this probability amplitude is just a very simple function of the distance between the point $vert Prangle$ and the point $vert psirangle$ in $mathbb\left\{C\right\}P^N$, under the distance metric given by the Fubini-Study metric. To recap, the quantum probability of a language being accepted can be interpreted as a metric, with the probability of accept being unity, if the metric distance between the initial and final states is zero, and otherwise the probability of accept is less than one, if the metric distance is non-zero. Thus, it follows that the quantum finite automaton is just a special case of a geometric automaton or a metric automaton, where $mathbb\left\{C\right\}P^N$ is generalized to some metric space, and the probability measure is replaced by a simple function of the metric on that space.