  We give a simple and physically intuitive necessary and sufficient condition
for a map acting on a compact metric space to be mixing (i.e. infinitely many
applications of the map transfer any input into a fixed convergency point).
This is a generalization of the "Lyapunov direct method". First we prove this
theorem in topological spaces and for arbitrary continuous maps. Finally we
apply our theorem to maps which are relevant in Open Quantum Systems and
Quantum Information, namely Quantum Channels. In this context we also discuss
the relations between mixing and ergodicity (i.e. the property that there exist
only a single input state which is left invariant by a single application of
the map) showing that the two are equivalent when the invariant point of the
ergodic map is pure.
