 A regular language is accepted with probability formula_49 by a quantum finite automaton, if, for all sentences formula_48 in the language, (and a given, fixed initial state formula_22), one has formula_52.Consider the classical deterministic finite automaton given by the state transition table
The quantum state is a vector, in bra–ket notation

with the complex numbers formula_54 normalized so that

The unitary transition matrices are

and 

Taking formula_58 to be the accept state, the projection matrix is

As should be readily apparent, if the initial state is the pure state formula_60 or formula_61, 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