iqm.benchmarks.compressive_gst.mgst.low_level_jit.ddB_derivs#
- iqm.benchmarks.compressive_gst.mgst.low_level_jit.ddB_derivs(X: ndarray, A: ndarray, B: ndarray, J: ndarray, y: ndarray, r: int, pdim: int, mle: bool = False) tuple[ndarray, ndarray, ndarray, ndarray]#
Calculate all nonzero terms of the second derivative with respect to the state tensor B.
- Parameters:
X (ndarray) – The input matrix X, of shape (pdim, pdim).
A (ndarray) – A 3D array of shape (n_povm, pdim, pdim) representing the POVM elements.
B (ndarray) – A 2D array of shape (pdim, pdim) representing the isometry matrix.
J (ndarray) – A 2D array representing the indices for which the derivatives will be computed.
y (ndarray) – A 2D array of shape (n_povm, len(J)) containing the target values.
r (int) – The rank of the problem.
pdim (int) – The dimension of the input matrices A and B.
mle (bool) – If True, the log-likelihood objective function is used instead of the least squares objective function
- Returns:
dB: The derivative w.r.t. B, of shape (pdim, pdim).
dMdM: The product of the derivatives dM and dM, of shape (r, r).
dMconjdM: The product of the conjugate of dM and dM, of shape (r, r).
dconjdB: The mixed second derivative of by dB and dB*, of shape (r, r).
- Return type:
A tuple containing the computed derivatives