# cirq.linalg.kak_canonicalize_vector

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

`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

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))
``````

[{ "type": "thumb-down", "id": "missingTheInformationINeed", "label":"Missing the information I need" },{ "type": "thumb-down", "id": "tooComplicatedTooManySteps", "label":"Too complicated / too many steps" },{ "type": "thumb-down", "id": "outOfDate", "label":"Out of date" },{ "type": "thumb-down", "id": "samplesCodeIssue", "label":"Samples / code issue" },{ "type": "thumb-down", "id": "otherDown", "label":"Other" }]
[{ "type": "thumb-up", "id": "easyToUnderstand", "label":"Easy to understand" },{ "type": "thumb-up", "id": "solvedMyProblem", "label":"Solved my problem" },{ "type": "thumb-up", "id": "otherUp", "label":"Other" }]