Better notation for reward function

Discovered that it is really just the trace of the matrix multiplication