dq.isbra
isbra(x: QArrayLike) -> bool
Returns True if the qarray is in the format of a bra.
Parameters:
-
x(qarray-like of shape (...)) –Qarray-like.
Returns:
-
True if the second to last dimension of
xis 1, False otherwise.
Examples:
>>> dq.isbra(jnp.ones((1, 3)))
True
>>> dq.isbra(jnp.ones((5, 1, 3)))
True
>>> dq.isbra(jnp.ones((3, 3)))
False