  We consider the wave and Schr\"odinger equations on a bounded open connected
subset $\Omega$ of a Riemannian manifold, with Dirichlet, Neumann or Robin
boundary conditions whenever its boundary is nonempty. We observe the
restriction of the solutions to a measurable subset $\omega$ of $\Omega$ during
a time interval [0,T] with T>0. We address the problem of the optimal location
of the observation subset \omega among all possible subsets of a given measure
or volume fraction. We solve it in two different situations. First, when a
specific choice of the initial data is given and therefore we deal with a
particular solution, we show that the problem always admits at least one
solution that can be regular or of fractal type depending on the regularity of
the initial data. We then introduce a relevant criterion, not depending on the
initial conditions and to choose the observation set in an uniform way,
independent of the data and solutions under consideration. Through spectral
decompositions, this leads to a second problem which consists of maximizing a
spectral functional that can be viewed as a measure of eigenfunction
concentration. This spectral criterion can be interpreted in two ways: it
corresponds either to a time asymptotic observability constant as the
observation time interval tends to infinity, or to a randomized version of the
deterministic observability inequality. Under appropriate quantum ergodicity
assumptions on $\Omega$, we compute the optimal value. We then provide spectral
approximations and present some numerical simulations that fully confirm the
theoretical results in the paper and support our conjectures. Our results
highlight precise connections between optimal observability issues and quantum
ergodic properties of the domain under consideration.
