Optimisation Using Machine Learning of the Pump Spectrale Shape to Generate Multimode Squeezing