unitary_gate_infidelity

py_ste.unitary_gate_infidelity(gate: ndarray, target: ndarray) float

Computes the gate infidelity between a gate and a target gate:

\[ \mathcal I(\texttt{gate}, \texttt{target}) \coloneqq 1-\frac{ \left|\Tr\left[\texttt{target}^\dagger \cdot \texttt{gate}\right]\right|^2 +\texttt{dim}}{\texttt{dim}(\texttt{dim}+1)}, \]
where \(\texttt{dim}\) is the dimension of the Hilbert space the gates act upon.

Parameters:
  • gate (NDArray[Shape[dim, dim], scalar]) – The gate to compute the infidelity of.

  • target (NDArray[Shape[dim, dim], scalar]) – The target gate to compute the infidelity with respect to.

Returns:

The gate infidelity, \(\mathcal I(\texttt{gate}, \texttt{target})\).

Return type:

float

Note

This function is a wrapper around the C++ function Suzuki_Trotter_Evolver::unitary_gate_infidelity().