  We analytically demonstrate the emergence of surface non-Hermitian boundary
contributions that appear in an extended form of the quantum Ehrenfest theorem
and are crucial (although so far overlooked) in the calculation of optical
matrix elements that govern the optical transitions in semiconductors, e.g.
solar cells. Their inevitable existence, strongly related to the boundary
conditions of a given quantum mechanical problem, is far-reaching in the sense
that they play a crucial role in the dynamics of solar absorption and the
corresponding optical transitions that follow. Processes like optical
transitions in localized and delocalized states and probabilities of
intermolecular transitions can be investigated through this generalized
off-diagonal Ehrenfest theorem, employed in the present work for the first
time. An explicit demonstration of bulk-boundary correspondence is shown, as
the extended Ehrenfest theorem can be separated into bulk and surface
contributions, each behaving separately from the other, but at the end
collaborating to give the correct time-derivative of the desired optical
element; this paves the way for future application of the extended theorem to
optical transitions in topologically nontrivial quantum systems. It is also
demonstrated through two examples in the literature as well as through a new
example (of a system exhibiting the Integer Quantum Hall Effect) that
non-Hermitian boundary terms (that have been designated "topological anomalies"
in the mathematical literature) may be expected to be quantized, especially in
topologically nontrivial quantum systems but also in certain conventional ones.
