Phase measurement of a quantum oscillator