I have an optimisation over a vector that I have written in python. I begin my computing the cost function of the vector. To do this I take the vector's outer product and apply a unitary transformation, this is the time evolved state. From the time evolved state I calculate another another, the quantum fisher information matrix (QFIM). The trace of the inverse of the QFIM is the cost function I am trying to minimise.
When I calculate the cost function in isolation, the value is accurate. However, when I perform the optimisation I naturally have to compute this many times. The error occurs in the calculation of the time evolved state. This problem confuses me because these errors don't occur whenever I calculate the final state on its own and only after several iterations of the optimisation. Once errors start, they begin small, on the eighth decimal place, but then appear to get worse. I have looked online and couldn't find anything pertinent to this problem. I can also obviously upload code if this isn't a known problem and would be useful.
Any help appreciated, thanks in advanced,