Next question: is there such a thing as a derivative of code?
For quantum computers all programs correspond to unitary matrices. You could take the logarithm of the matrix M, define f(x) = e^{ln(M) x}, then compute the derivative of f at 1. You might need a factor of i to make it work. (It works extremely nicely for single-qubit operations.)
(Alternatively, you could apply that process separately to all of the individual gates making up the circuit, vary them all at once, and get a different continuous transformation with a derivative.)