rydiqule.sensor_utils.check_positive_semi_definite¶
- rydiqule.sensor_utils.check_positive_semi_definite(dm: ndarray)[source]¶
Checks if the provided matrices is a physical density matrix.
This is done by confirming each matrix of the stack is positive semi-definite.
- Parameters:
dm (numpy.ndarray) – Stack of density matrices in rydiqule’s computational basis (i.e. real with ground state removed). Expected shape is
(..., N)whereN = basis_size**2-1.- Raises:
RydiquleError – If at least one density matrix of the stack is not positive semi-definite.