Quantization of systems with a general phase space equipped with a Riemannian metric