Skip to content

dq.isop

isop(x: QArrayLike) -> bool

Returns True if the qarray is in the format of an operator.

Parameters:

  • x (qarray-like of shape (...)) –

    Qarray-like.

Returns:

  • True if the last two dimensions of x are equal, False otherwise.

Examples:

>>> dq.isop(jnp.ones((3, 3)))
True
>>> dq.isop(jnp.ones((5, 3, 3)))
True
>>> dq.isop(jnp.ones((3, 1)))
False