The phase of a single-mode field can be measured in a single-shot meas
urement by interfering the field with an effectively classical local o
scillator of known phase. The standard technique is to have the local
oscillator detuned from the system (heterodyne detection) so that it i
s sometimes in phase and sometimes in quadrature with the system over
the course of the measurement. This enables both quadratures of the sy
stem to be measured, from which the phase can be estimated. One of us
[H. M. Wiseman, Phys. Rev. Lett. 75, 4587 (1995)] has shown recently t
hat it is possible to make a much better estimate of the phase by usin
g an adaptive technique in which a resonant local oscillator has its p
hase adjusted by a feedback loop during the single-shot measurement. I
n a previous work [H. M. Wiseman and R. B. Killip, Phys. Rev. A 56, 94
4 (1997)] we presented a semiclassical analysis of a particular adapti
ve scheme, which yielded asymptotic results for the phase variance of
strong fields. In this paper we present an exact quantum mechanical tr
eatment. This is necessary for calculating the phase variance for fiel
ds with small photon numbers, and also for considering figures of meri
t other than the phase variance. Our results show that an adaptive sch
eme is always superior to heterodyne detection as far as the variance
is concerned. However, the tails of the probability distribution are s
urprisingly high for this adaptive measurement, so that it does not al
ways result in a smaller probability of error in phase-based optical c
ommunication.