  There is a fundamental difficulty in generalizing weighted automata to the
case of infinite words: in general the infinite sum-of-products from which the
weight of a given word is derived will diverge. Many solutions to this problem
have been proposed, including restricting the type of weights used and
employing a different valuation function that forces convergence. In this paper
we describe an alternative approach that, rather than seeking to avoid the
inevitable divergences, instead embraces them as a source of useful
information. Specifically, rather than taking coefficients from an arbitrary
semiring S we instead take them from S^N. Doing this is useful because it gives
us information about how the weight of an infinite word does or does not
diverge, and if it does diverge what form the divergence takes --- e.g.,
polynomial, exponential, etc. This approach has proved to be incredibly useful
in the field of quantum simulation because when studying infinite systems,
information about how quantities of interest, such as energy or magnetization,
diverge is exactly what we want.
  In this paper we introduce a new kind of automaton which we call a diverging
automaton that maps infinite words to sequences of weights from a semiring and
which employs a Buchi-like boundary condition. We then develop a theory for
diverging power series and prove a Kleene Theorem connecting rational diverging
power series to diverging automata. Afterward we repeat this process by
introducing bidiverging automata which map biinfinite words to elements in S^(Z
x N), developing a theory for bidiverging power series, and proving another
Kleene Theorem. We conclude by describing how bidiverging automata are applied
to simulate biinfinite quantum systems.
