A phase modulation device implemented in an ophthalmic instrument using a main light beam interacting with an eye, the device including: an apparatus for modulating the phase of the wave front of the main light beam, a controller for controlling the phase modulation apparatus following a modulation instruction, and an analyzer for analyzing the thus-performed modulation of the phase of the wave front of the main light beam, further including emitting a secondary light beam, an apparatus for directing the secondary light beam along an optical path to the modulation apparatus, then to the analyzer, and in that the optical path does not pass through the eye, and in that the controller and the analyzer receiving the modulated secondary light beam cooperate, during a stage called a learning stage, to supply data regarding the response of the phase modulation apparatus to a set of predetermined modulation instructions.