Quantum state of a trapped Bose-Einstein condensate