cirq.google.optimizers.two_qubit_gates.math_utils.kak_vector_infidelity

The locally invariant infidelity between two KAK vectors.

This is the quantity

\min 1 - F_e( exp(i k_a · (XX,YY,ZZ)) kL exp(i k_b · (XX,YY,ZZ)) kR)

where F_e is the entanglement (process) fidelity and the minimum is taken over all 1-local unitaries kL, kR.

k_vec_a A 3-vector or tensor of 3-vectors with shape (...,3).
k_vec_b A 3-vector or tensor of 3-vectors with shape (...,3). If both k_vec_a and k_vec_b are tensors, their shapes must be compatible for broadcasting.
ignore_equivalent_vectors If True, the calculation ignores any other KAK vectors that are equivalent to the inputs under local unitaries. The resulting infidelity is then only an upper bound to the true infidelity.

An ndarray storing the locally invariant infidelity between the inputs. If k_vec_a or k_vec_b is a tensor, the result is vectorized.