In Quantum Hydro-Dynamics the following problem is relevant: let (sqrt{rho },Lambda ) in {W^{1,2}}({mathbb {R}}^d,{mathcal {L}}^d,{mathbb {R}}^+) times L^2({mathbb {R}}^d,mathcal L^d,{mathbb {R}}^d) be a finite energy hydrodynamics state, i.e. Lambda = 0 when rho = 0 and E=∫Rd12|∇ρ|2+12Λ2Ld<∞.\\documentclass[12pt]{minimal} \\usepackage{amsmath} \\usepackage{wasysym} \\usepackage{amsfonts} \\usepackage{amssymb} \\usepackage{amsbsy} \\usepackage{mathrsfs} \\usepackage{upgreek} \\setlength{\\oddsidemargin}{-69pt} \\begin{document}$$\\begin{aligned} E = \\int _{{\\mathbb {R}}^d} \\frac{1}{2} \\big | \ abla \\sqrt{\\rho } \\big |^2 + \\frac{1}{2} \\Lambda ^2 {\\mathcal {L}}^d < \\infty . \\end{aligned}$$\\end{document}The question is under which conditions there exists a wave function psi in {W^{1,2}}({mathbb {R}}^d,{mathcal {L}}^d,{mathbb {C}}) such that ρ=|ψ|,J=ρΛ=ℑ(ψ¯∇ψ).\\documentclass[12pt]{minimal} \\usepackage{amsmath} \\usepackage{wasysym} \\usepackage{amsfonts} \\usepackage{amssymb} \\usepackage{amsbsy} \\usepackage{mathrsfs} \\usepackage{upgreek} \\setlength{\\oddsidemargin}{-69pt} \\begin{document}$$\\begin{aligned} \\sqrt{\\rho } = |\\psi |, \\quad J = \\sqrt{\\rho } \\Lambda = \\Im \\big ( {\\bar{\\psi }} \ abla \\psi ). \\end{aligned}$$\\end{document}The second equation gives for psi = sqrt{rho } w smooth, |w| = 1, that i Lambda = sqrt{rho } {bar{w}} nabla w. Interpreting rho {mathcal {L}}^d as a measure in the metric space {mathbb {R}}^d, this question can be stated in generality as follows: given metric measure space (X,d,mu ) and a cotangent vector field v in L^2(T^* X), is there a function w in {W^{1,2}}(X,mu ,{mathbb {S}}^1) such that dw=iwv.\\documentclass[12pt]{minimal} \\usepackage{amsmath} \\usepackage{wasysym} \\usepackage{amsfonts} \\usepackage{amssymb} \\usepackage{amsbsy} \\usepackage{mathrsfs} \\usepackage{upgreek} \\setlength{\\oddsidemargin}{-69pt} \\begin{document}$$\\begin{aligned} dw = i w v. \\end{aligned}$$\\end{document}Under some assumptions on the metric measure space (X,d,mu ) (conditions which are verified on Riemann manifolds with the measure mu = rho textrm{Vol} or more generally on non-branching textrm{MCP}(K,N)), we show that the necessary and sufficient conditions for the existence of w is that (in the case of differentiable manifold) ∫v(γ(t))·γ˙(t)dt∈2πZ\\documentclass[12pt]{minimal} \\usepackage{amsmath} \\usepackage{wasysym} \\usepackage{amsfonts} \\usepackage{amssymb} \\usepackage{amsbsy} \\usepackage{mathrsfs} \\usepackage{upgreek} \\setlength{\\oddsidemargin}{-69pt} \\begin{document}$$\\begin{aligned} \\int v(\\gamma (t)) \\cdot {\\dot{\\gamma }} (t) dt \\in 2\\pi {\\mathbb {Z}}\\end{aligned}$$\\end{document}for pi -a.e. gamma , where pi is a test plan supported on closed curves. This condition generalizes the condition that the vorticity is quantized. We also give a representation of every possible solution. In particular, we deduce that the wave function psi = sqrt{rho } w is in W^{1,2}(X,mu ,{mathbb {C}}) whenever sqrt{rho } in W^{1,2}(X,mu ,{mathbb {R}}^+).