pygsti.baseobjs.opcalc.slowopcalc.compact_deriv#
- compact_deriv(vtape, ctape, wrt_params)#
Take the derivative of one or more compact Polynomials with respect to one or more variables/parameters.
- Parameters:
vtape (numpy.ndarray) – Specifies “variable” and “coefficient” 1D numpy arrays to differentiate. These “tapes” can be generated by concatenating the tapes of individual complact-polynomial tuples returned by
Polynomial.compact().ctape (numpy.ndarray) – Specifies “variable” and “coefficient” 1D numpy arrays to differentiate. These “tapes” can be generated by concatenating the tapes of individual complact-polynomial tuples returned by
Polynomial.compact().wrt_params (list) – The variable indices to differentiate with respect to. They must be sorted in ascending order. E.g. “[0,3]” means separatey differentiate w.r.t x_0 and x_3 (concatenated first by wrt_param then by poly).
- Returns:
vtape, ctape
- Return type:
numpy.ndarray