is_unitary

is_unitary(matrix)

Check if a given matrix is unitary.

Parameters:

matrix (ndarray | Array) – A square matrix to be checked for unitarity.

Raises:

SimphonyError – If the provided matrix is not 2-dimensional or not square.

Return type:

bool | ndarray | Array