Measuring non-commuting observables of a single photon