  The algebra of quantum matrices of a given size supports a rational torus
action by automorphisms. It follows from work of Letzter and the first named
author that to understand the prime and primitive spectra of this algebra, the
first step is to understand the prime ideals that are invariant under the torus
action. In this paper, we prove that a family of quantum minors is the set of
all quantum minors that belong to a given torus-invariant prime ideal of a
quantum matrix algebra if and only if the corresponding family of minors
defines a non-empty totally nonnegative cell in the space of totally
nonnegative real matrices of the appropriate size. As a corollary, we obtain
explicit generating sets of quantum minors for the torus-invariant prime ideals
of quantum matrices in the case where the quantisation parameter $q$ is
transcendental over $\mathbb{Q}$.
