Template Function Suzuki_Trotter_Evolver::unitary_gate_infidelity

Function Documentation

template<typename Derived>
double Suzuki_Trotter_Evolver::unitary_gate_infidelity(const Eigen::MatrixBase<Derived> &gate, const Eigen::MatrixBase<Derived> &target)

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 – The gate to compute the infidelity of.

  • target – The target gate to compute the infidelity with respect to.

Returns:

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