"""simple docstring"""


from ..utils import DummyObject, requires_backends






class    a__    (   metaclass=_a	):
			snake_case_							=      ["torch", "scipy"]


			def __init__(     self,				*_UpperCAmelCase,				**_UpperCAmelCase  ):
								'''simple docstring'''



								requires_backends(self,				["torch", "scipy"]  )


			@classmethod
			def 	snake_case__	(     cls,				*_UpperCAmelCase,				**_UpperCAmelCase  ):
								'''simple docstring'''



								requires_backends(cls,				["torch", "scipy"]  )


			@classmethod
			def 	snake_case__	(     cls,				*_UpperCAmelCase,				**_UpperCAmelCase  ):
								'''simple docstring'''



								requires_backends(cls,				["torch", "scipy"]  )





"""simple docstring"""


from typing import Any

import numpy as np







def 					__a   (		A      ):






     '''simple docstring'''



     return np.array_equal(A    ,				matrix.conjugate().T      )







def 					__a   (		A    ,				A      ):






     '''simple docstring'''



     lowercase__				 =							v.conjugate().T
     lowercase__				 =							v_star.dot(A      )
     assert isinstance(A    ,				np.ndarray      )
     return (v_star_dot.dot(A      )) / (v_star.dot(A      ))







def 					__a   (		):






     '''simple docstring'''



     lowercase__				 =							np.array([[2, 2 + 1j, 4], [2 - 1j, 3, 1j], [4, -1j, 1]]      )
     lowercase__				 =							np.array([[1], [2], [3]]      )
     assert is_hermitian(A      ), f'''{a} is not hermitian.'''
     print(rayleigh_quotient(A    ,				A      )      )

     lowercase__				 =							np.array([[1, 2, 4], [2, 3, -1], [4, -1, 1]]      )
     assert is_hermitian(A      ), f'''{a} is not hermitian.'''
     assert rayleigh_quotient(A    ,				A      ) == float(3      )


if __name__ == "__main__":
 import doctest

 doctest.testmod()
 tests()




