  We derive the equations of quantum mechanics and quantum thermodynamics from
the assumption that a quantum system can be described by an underlying
classical system of particles. Each component $\phi_j$ of the wave vector is
understood as a stochastic complex variable whose real and imaginary parts are
proportional to the coordinate and momentum associated to a degree of freedom
of the underlying classical system. From the classical stochastic equations of
motion, we derive a general equation for the covariance matrix of the wave
vector which turns out to be of the Lindblad type. When the noise changes only
the phase of $\phi_j$, the Schr\"odinger and the quantum Liouville equation are
obtained. The component $\psi_j$ of the wave vector obeying the Schr\"odinger
equation is related to stochastic wave vector by
$|\psi_j|^2=\langle|\phi_j|^2\rangle$.
