Gradient-based optimization of scatterer arrangements based on the T-matrix method | Synapse