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.

__eq__

View source

__ne__

View source