  Optimization with constraints is a typical problem in quantum physics and
quantum information science that becomes especially challenging for
high-dimensional systems and complex architectures like tensor networks. Here
we use ideas of Riemannian geometry to perform optimization on manifolds of
unitary and isometric matrices as well as the cone of positive-definite
matrices. Combining this approach with the up-to-date computational methods of
automatic differentiation, we demonstrate the efficacy of the Riemannian
optimization in the study of the low-energy spectrum and eigenstates of
multipartite Hamiltonians, variational search of a tensor network in the form
of the multiscale entanglement-renormalization ansatz, preparation of arbitrary
states (including highly entangled ones) in the circuit implementation of
quantum computation, decomposition of quantum gates, and tomography of quantum
states. Universality of the developed approach together with the provided open
source software enable one to apply the Riemannian optimization to complex
quantum architectures well beyond the listed problems, for instance, to the
optimal control of noisy quantum systems.
