  We develop a sensitivity function for the design of electron optics using an
adjoint approach based on a form of reciprocity implicit in Hamilton's
equations of motion. The sensitivity function, which is computed with a small
number of time-reversed runs of a beam optics code, allows for the
determination of the effects on specific beam quality figures of merit of
small, but arbitrary changes in electrode potentials, positions and shapes, and
in magnet strengths and locations. The sensitivity function can thus be used in
an optimization cycle of a focusing system's design, and/or to predict the
sensitivity of a particular design to manufacturing, assembly, and alignment
errors.
