# cirq.linalg.AxisAngleDecomposition

Represents a unitary operation as an axis, angle, and global phase.

The unitary $$U$$ is decomposed as follows:

$$U = g e^{-i heta/2 (xX + yY + zZ)}$$


where heta is the rotation angle, (x, y, z) is a unit vector along the rotation axis, and g is the global phase.

## Methods

### canonicalize

View source

Returns a standardized AxisAngleDecomposition with the same unitary.

Ensures the axis (x, y, z) satisfies x+y+z >= 0. Ensures the angle theta satisfies -pi + atol < theta <= pi + atol.

Args
atol Absolute tolerance for errors in the representation and the canonicalization. Determines how much larger a value needs to be than pi before it wraps into the negative range (so that approximation errors less than the tolerance do not cause sign instabilities).

Returns
The canonicalized AxisAngleDecomposition.

View source

### __ne__

View source

[{ "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" }]