A method for generating a compressed optical pulse, the method comprising: - providing a wavelength tunable microcavity laser system having a reference wavelength corresponding to a central operating wavelength, comprising ∘ an optical cavity with a mechanically adjustable cavity length, so as to enable the wavelength tunable microcavity laser system to emit photons of different wavelengths with respect to each other, wherein the optical cavity comprises a microcavity wherein the length of the microcavity is at least 1⁄2 times the reference wavelength and less than 10 times the reference wavelength, and wherein the optical cavity comprises a MEMS component and wherein a position of the MEMS component is adjustable and wherein the cavity length of the optical cavity depends on the position of the MEMS component so that a cavity controller may control the cavity length of the optical cavity by controlling the position of the MEMS component, ∘ a photon emitter for emitting photons into the optical cavity, ∘ a cavity controller arranged for controlling the length of the optical cavity, - providing a dispersive medium, - emitting a primary optical pulse having a primary temporal width from the wavelength tunable microcavity laser system, - adjusting the optical cavity length so that said primary optical pulse comprises temporally separated photons of different wavelengths, - receiving the primary optical pulse with the dispersive medium, and - re-emitting the primary optical pulse from the dispersive medium as a compressed optical pulse with a secondary temporal width, wherein the secondary temporal width is smaller than the primary temporal width, and wherein the step of - adjusting the optical cavity length so that said primary optical pulse comprises temporally separated photons of different wavelengths, further comprises adjusting the position of the MEMS component. - providing a wavelength tunable microcavity laser system having a reference wavelength corresponding to a central operating wavelength, comprising ∘ an optical cavity with a mechanically adjustable cavity length, so as to enable the wavelength tunable microcavity laser system to emit photons of different wavelengths with respect to each other, wherein the optical cavity comprises a microcavity wherein the length of the microcavity is at least 1⁄2 times the reference wavelength and less than 10 times the reference wavelength, and wherein the optical cavity comprises a MEMS component and wherein a position of the MEMS component is adjustable and wherein the cavity length of the optical cavity depends on the position of the MEMS component so that a cavity controller may control the cavity length of the optical cavity by controlling the position of the MEMS component, ∘ a photon emitter for emitting photons into the optical cavity, ∘ a cavity controller arranged for controlling the length of the optical cavity, ∘ an optical cavity with a mechanically adjustable cavity length, so as to enable the wavelength tunable microcavity laser system to emit photons of different wavelengths with respect to each other, wherein the optical cavity comprises a microcavity wherein the length of the microcavity is at least 1⁄2 times the reference wavelength and less than 10 times the reference wavelength, and wherein the optical cavity comprises a MEMS component and wherein a position of the MEMS component is adjustable and wherein the cavity length of the optical cavity depends on the position of the MEMS component so that a cavity controller may control the cavity length of the optical cavity by controlling the position of the MEMS component, ∘ a photon emitter for emitting photons into the optical cavity, ∘ a cavity controller arranged for controlling the length of the optical cavity, - providing a dispersive medium, - emitting a primary optical pulse having a primary temporal width from the wavelength tunable microcavity laser system, - adjusting the optical cavity length so that said primary optical pulse comprises temporally separated photons of different wavelengths, - receiving the primary optical pulse with the dispersive medium, and - re-emitting the primary optical pulse from the dispersive medium as a compressed optical pulse with a secondary temporal width, wherein the secondary temporal width is smaller than the primary temporal width, - adjusting the optical cavity length so that said primary optical pulse comprises temporally separated photons of different wavelengths, further comprises adjusting the position of the MEMS component.