  In this article, we solve the loop equations of the \beta-random matrix
model, in a way similar to what was found for the case of hermitian matrices
\beta=1. For \beta=1, the solution was expressed in terms of algebraic geometry
properties of an algebraic spectral curve of equation y^2=U(x). For arbitrary
\beta, the spectral curve is no longer algebraic, it is a Schroedinger equation
((\hbar\partial)^2-U(x)).\psi(x)=0 where \hbar\propto
(\sqrt\beta-1/\sqrt\beta). In this article, we find a solution of loop
equations, which takes the same form as the topological recursion found for
\beta=1. This allows to define natural generalizations of all algebraic
geometry properties, like the notions of genus, cycles, forms of 1st, 2nd and
3rd kind, Riemann bilinear identities, and spectral invariants F_g, for a
quantum spectral curve, i.e. a D-module of the form y^2-U(x), where
[y,x]=\hbar. Also, our method allows to enumerate non-oriented discrete
surfaces.
