|View source on GitHub|
The locally invariant infidelity between two KAK vectors.
cirq.google.optimizers.two_qubit_gates.math_utils.kak_vector_infidelity( k_vec_a: np.ndarray, k_vec_b: np.ndarray, ignore_equivalent_vectors: bool = False ) -> np.ndarray
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.
||A 3-vector or tensor of 3-vectors with shape (...,3).|
||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.|
||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.|