Optical potentials in time‐dependent quantum theory