iqm.benchmarks.compressive_gst.mgst.low_level_jit.objf_gauge#
- iqm.benchmarks.compressive_gst.mgst.low_level_jit.objf_gauge(X: ndarray, E: ndarray, rho: ndarray, X_target: ndarray, E_target: ndarray, rho_target: ndarray, U: ndarray, weights: list[float] | None = None) float#
Calculate the objective function with respect to a unitary gauge transformation.
This function computes the weighted sum of squared Frobenius norm differences between the gauge-transformed gate set and the target gate set, including gates, POVM elements, and the initial state.
- Parameters:
X (ndarray) – A 3D array containing the input matrices, of shape (n_gates, pdim**2, pdim**2).
E (ndarray) – A 2D array representing the POVM elements, of shape (n_povm, pdim**2).
rho (ndarray) – A 1D array representing the density matrix, of shape (pdim**2,).
X_target (ndarray) – A 3D array containing the target gate matrices, of shape (n_gates, pdim**2, pdim**2).
E_target (ndarray) – A 2D array representing the target POVM elements, of shape (n_povm, pdim**2).
rho_target (ndarray) – A 1D array representing the target density matrix, of shape (pdim**2,).
U (ndarray) – A 2D unitary matrix representing the gauge transformation, of shape (pdim, pdim).
weights (list[float] | None) – A list of weights for the different components. Length must be n_gates + 2. If None or incorrect length, defaults to all ones.
- Returns:
The normalized objective function value, scaled by pdim**2.
- Return type: