Skip to content

dq.isherm

isherm(x: ArrayLike, rtol: float = 1e-05, atol: float = 1e-08) -> bool

Returns True if the array is Hermitian.

Parameters

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

    Array.

  • rtol

    Relative tolerance of the check.

  • atol

    Absolute tolerance of the check.

Returns

True if x is Hermitian, False otherwise.

Examples

>>> dq.isherm(jnp.eye(3))
Array(True, dtype=bool)
>>> dq.isherm([[0, 1j], [1j, 0]])
Array(False, dtype=bool)