  Inverse design of complex flows is notoriously challenging because of the
high cost of high dimensional optimization. Usually, optimization problems are
either restricted to few control parameters, or adjoint-based approaches are
used to convert the optimization problem into a boundary value problem. Here,
we show that the recent advances in automatic differentiation (AD) provide a
generic platform for solving inverse problems in complex fluids. To demonstrate
the versatility of the approach, we solve an array of optimization problems
related to active matter motion in Newtonian fluids, dispersion in structured
porous media, and mixing in journal bearing. Each of these problems highlights
the advantages of AD in ease of implementation and computational efficiency to
solve high-dimensional optimization problems involving particle-laden flows.
