


'''simple docstring'''






from typing import Any

import numpy as np





def       lowercase_      (		lowercase__						)   ->bool:
						return np.array_equal(lowercase__				,  matrix.conjugate().T						)





def       lowercase_      (		lowercase__				,  lowercase__						)   ->Any:
						_snake_case:   Union[str, Any]  					=		v.conjugate().T
						_snake_case:   List[Any]  					=		v_star.dot(lowercase__						)
						assert isinstance(lowercase__				,  np.ndarray						)
						return (v_star_dot.dot(lowercase__						)) / (v_star.dot(lowercase__						))





def       lowercase_      (		)   ->None:
						_snake_case:   Optional[int]  					=		np.array([[2, 2 + 1J, 4], [2 - 1J, 3, 1J], [4, -1J, 1]]						)
						_snake_case:   Optional[int]  					=		np.array([[1], [2], [3]]						)
						assert is_hermitian(lowercase__						), F'''{a} is not hermitian.'''
						print(rayleigh_quotient(lowercase__				,  lowercase__						)						)

						_snake_case:   List[Any]  					=		np.array([[1, 2, 4], [2, 3, -1], [4, -1, 1]]						)
						assert is_hermitian(lowercase__						), F'''{a} is not hermitian.'''
						assert rayleigh_quotient(lowercase__				,  lowercase__						) == float(3						)


if __name__ == "__main__":
		import doctest

		doctest.testmod()
		tests()












'''simple docstring'''






from ..utils import DummyObject, requires_backends







class 			lowerCamelCase					(						metaclass=__UpperCAmelCase  ):
					_SCREAMING_SNAKE_CASE							   =    ["torch", "scipy"]


					def __init__(					self	:  Tuple       ,     *__snake_case	:  List[Any]       ,     **__snake_case	:  List[Any]       ):





											'''simple docstring'''





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


					@classmethod
					def    SCREAMING_SNAKE_CASE_		(					cls	:  Optional[int]       ,     *__snake_case	:  Optional[Any]       ,     **__snake_case	:  Tuple       ):





											'''simple docstring'''





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




					@classmethod
					def    SCREAMING_SNAKE_CASE_		(					cls	:  List[Any]       ,     *__snake_case	:  Optional[Any]       ,     **__snake_case	:  str       ):





											'''simple docstring'''





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





