Skip to content

dq.sinm

sinm(x: ArrayLike) -> Array

Returns the sine of an array.

Parameters

  • x (array_like of shape (..., n, n))

    Square matrix.

Returns

(array of shape (..., n, n)) Sine of x.

Note

This function uses jax.scipy.linalg.expm() to compute the sine of a matrix \(A\): $$ \sin(A) = \frac{e^{iA} - e^{-iA}}{2i} $$

Examples

>>> dq.sinm(0.5 * jnp.pi * dq.sigmax())
Array([[0.-0.j, 1.-0.j],
       [1.-0.j, 0.-0.j]], dtype=complex64)