Photonic circuits are a promising platform for quantum computation and quantum communication: they don't require low temperatures or vacuum to operate and they can be built on a small chip. It would be wonderful to be able to design photonic circuits for any desired purpose, however in general this is a difficult task which we would much rather automate. In this talk I will present a new method to optimize photonic circuits (through differentiable simulation), which is about 100x faster than the previous state of the art. This allows us to automate the design of photonic devices, by starting with a random circuit and optimizing it until it achieves the desired behaviour. The added speed of our method allows us to design larger circuits and to achieve a much higher accuracy than it was previously possible. The talk is designed to be accessible to non-experts and will cover the basics of quantum optics, optical gates, photonic circuits and differentiable simulation.