A device for determining an ultrashort laser pulse, the device comprising the following optical elements being arranged in the following order in an optical path along which an incident laser pulse propagates: - an imaging optical element configured to form a line focused laser pulse by imaging the incident laser pulse on a straight line perpendicular to an incident direction of the laser pulse, - a first optical element configured to apply predetermined varying group delay dispersion on the line focused laser pulse, wherein a local value of the group delay dispersion, which is applied on the line focused laser pulse at a certain point varies as a function of the position of said point on the straight line, - a non-linear optical element configured to generate a line focused second harmonic laser pulse of the line focused dispersed laser pulse, - a second optical element configured to apply an angular dispersion on the line focused second harmonic laser pulse, which compensates for an angular dispersion, which is applied by the first optical element, - an optical grating having a direction of diffraction that is perpendicular to the straight line along which the line focused laser pulse is imaged by the imaging optical element and - a flat sensor configured to capture a diffraction image of the line focused second harmonic laser pulse, wherein the device further comprises - a processing unit, which is configured to simulate the captured diffraction image by simulating the influence of at least the first optical element and the non-linear optical element on a presumed laser pulse having a presumed frequency spectrum and spectral phase, wherein an error between the simulated and the captured diffraction image is minimized by iteratively finding best fit values of the frequency spectrum and spectral phase of the presumed laser pulse, wherein the ultrashort laser pulse is characterized by assigning it the best fit values, wherein the first optical element is configured in that the local value of the group delay dispersion linearly varies as a function of the position on the straight line. - an imaging optical element configured to form a line focused laser pulse by imaging the incident laser pulse on a straight line perpendicular to an incident direction of the laser pulse, - a first optical element configured to apply predetermined varying group delay dispersion on the line focused laser pulse, wherein a local value of the group delay dispersion, which is applied on the line focused laser pulse at a certain point varies as a function of the position of said point on the straight line, - a non-linear optical element configured to generate a line focused second harmonic laser pulse of the line focused dispersed laser pulse, - a second optical element configured to apply an angular dispersion on the line focused second harmonic laser pulse, which compensates for an angular dispersion, which is applied by the first optical element, - an optical grating having a direction of diffraction that is perpendicular to the straight line along which the line focused laser pulse is imaged by the imaging optical element and - a flat sensor configured to capture a diffraction image of the line focused second harmonic laser pulse, wherein the device further comprises - a processing unit, which is configured to simulate the captured diffraction image by simulating the influence of at least the first optical element and the non-linear optical element on a presumed laser pulse having a presumed frequency spectrum and spectral phase, wherein an error between the simulated and the captured diffraction image is minimized by iteratively finding best fit values of the frequency spectrum and spectral phase of the presumed laser pulse, wherein the ultrashort laser pulse is characterized by assigning it the best fit values, wherein the first optical element is configured in that the local value of the group delay dispersion linearly varies as a function of the position on the straight line.