The quantum mechanics of a perfect fluid