= Solution
For target <unitary operator> $U_T$ and actual propagator $U_f(T)$ on an $n$-dimensional space, minimize the <phase-insensitive unitary gate error>
$$
\boxed{J_{
m gate}[f]=1-\frac{|\operatorname{Tr}(U_T^\dagger U_f(T))|^2}{n^2}.}
$$
The <Cauchy-Schwarz inequality> for the <Hilbert-Schmidt inner product> gives a value in $[0,1]$, because both <unitary matrices> have squared <norm> $n$. The error is zero exactly when the matrices are proportional, namely $U_f(T)=e^{i\phi}U_T$. It therefore tests the full process, not just its action on one state, and ignores a physically irrelevant common phase. If the gate phase itself must be fixed, instead minimize $\|U_f(T)-U_T\|_{\rm HS}^2/(2n)=1-\operatorname{Re}\operatorname{Tr}(U_T^\dagger U_f(T))/n$, which vanishes only at exact equality.
Back to article page