cirq.google.optimizers.two_qubit_gates.math_utils.kak_vector_to_unitary

Convert a KAK vector to its unitary matrix equivalent.

vector A KAK vector shape (..., 3). (Input may be vectorized).

unitary Corresponding 2-qubit unitary, of the form exp( i k_x \sigma_x \sigma_x + i k_y \sigma_y \sigma_y

  • i k_z \sigma_z \sigma_z). matrix or tensor of matrices of shape (..., 4,4).