A mode-locked laser comprising: - an insulating substrate , - a rib extending over the substrate in an extension direction (X), - a resonant cavity for at least one electromagnetic wave, the cavity being defined in the substrate , in line with the rib , - a wave guide defined in the substrate , extending in a guiding direction (X'), the rib comprising a lower layer (C 2 ), a plurality of intermediate layers (C 3 to C N-1 ) and an upper layer (C N ), stacked in a stacking direction (Z) orthogonal to the direction of extent (X), the cavity being able to accommodate a plurality of resonance modes equidistant in frequency, the cavity comprising a plurality of trenches formed in at least one of the faces of the cavity , the trenches extending perpendicularly to the direction of extent (X), each trench having parameters, the parameters being: - a width (W n ) of the trench , measured in a transverse direction (Y) orthogonal to the direction of extent (X) and to the direction of stacking (Z), - a thickness (E n ) of the trench , measured in the direction of extent (X), - a depth (P n ) of the trench , measured in the stacking direction (Z), and - a dimension (a n ) of a spacing separating each trench from an adjacent trench , the dimension (a n ) being measured in the direction of extent (X), at least one of the parameters of the trenches varying along the direction of extent (X) according to a law of variation, the law of variation being a symmetrical polynomial function of order greater than or equal to four of a position of the trench along the direction of extent (X). - an insulating substrate , - a rib extending over the substrate in an extension direction (X), - a resonant cavity for at least one electromagnetic wave, the cavity being defined in the substrate , in line with the rib , - a wave guide defined in the substrate , extending in a guiding direction (X'), the rib comprising a lower layer (C 2 ), a plurality of intermediate layers (C 3 to C N-1 ) and an upper layer (C N ), stacked in a stacking direction (Z) orthogonal to the direction of extent (X), the cavity being able to accommodate a plurality of resonance modes equidistant in frequency, the cavity comprising a plurality of trenches formed in at least one of the faces of the cavity , the trenches extending perpendicularly to the direction of extent (X), each trench having parameters, the parameters being: the rib comprising a lower layer (C 2 ), a plurality of intermediate layers (C 3 to C N-1 ) and an upper layer (C N ), stacked in a stacking direction (Z) orthogonal to the direction of extent (X), the cavity being able to accommodate a plurality of resonance modes equidistant in frequency, the cavity comprising a plurality of trenches formed in at least one of the faces of the cavity , the trenches extending perpendicularly to the direction of extent (X), each trench having parameters, the parameters being: - a width (W n ) of the trench , measured in a transverse direction (Y) orthogonal to the direction of extent (X) and to the direction of stacking (Z), - a thickness (E n ) of the trench , measured in the direction of extent (X), - a depth (P n ) of the trench , measured in the stacking direction (Z), and - a dimension (a n ) of a spacing separating each trench from an adjacent trench , the dimension (a n ) being measured in the direction of extent (X), at least one of the parameters of the trenches varying along the direction of extent (X) according to a law of variation, the law of variation being a symmetrical polynomial function of order greater than or equal to four of a position of the trench along the direction of extent (X). at least one of the parameters of the trenches varying along the direction of extent (X) according to a law of variation, the law of variation being a symmetrical polynomial function of order greater than or equal to four of a position of the trench along the direction of extent (X). <EOS>