Diagrammatic Differentiation for Quantum Machine Learning