cirq.kak_canonicalize_vector

cirq.kak_canonicalize_vector(x: float, y: float, z: float, atol: float = 1e-09) → cirq.linalg.decompositions.KakDecomposition[source]

Canonicalizes an XX/YY/ZZ interaction by swap/negate/shift-ing axes.

Parameters
  • x – The strength of the XX interaction.

  • y – The strength of the YY interaction.

  • z – The strength of the ZZ interaction.

  • atol – How close x2 must be to π/4 to guarantee z2 >= 0

Returns

The canonicalized decomposition, with vector coefficients (x2, y2, z2) satisfying:

0 ≤ abs(z2) ≤ y2 ≤ x2 ≤ π/4 if x2 = π/4, z2 >= 0

Guarantees that the implied output matrix:

g · (a1 ⊗ a0) · exp(i·(x2·XX + y2·YY + z2·ZZ)) · (b1 ⊗ b0)

is approximately equal to the implied input matrix:

exp(i·(x·XX + y·YY + z·ZZ))