Optimal suppression of defect generation during a passage across a quantum critical point