dq.rz
rz(theta: ArrayLike) -> Array
Returns the rotation gate.
It is defined by
Parameters
-
theta
(array_like of shape (...))
–
Rotation angle in radians.
Returns
(array of shape (..., 2, 2)) gate.
Examples
>>> dq.rz(jnp.pi)
Array([[-0.-1.j, 0.+0.j],
[ 0.+0.j, -0.+1.j]], dtype=complex64)
>>> dq.rz([0, jnp.pi/4, jnp.pi/3, jnp.pi/2, jnp.pi]).shape
(5, 2, 2)