from typing import Any

import numpy as np


def     __lowerCAmelCase						(       a_		)      ->	List[Any]:





     '''simple docstring'''





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


def     __lowerCAmelCase						(       a_       ,      a_		)      ->	List[str]:





     '''simple docstring'''





     SCREAMING_SNAKE_CASE					:			Dict    	=       v.conjugate().T
     SCREAMING_SNAKE_CASE					:			Optional[int]    	=       v_star.dot(a_		)
     assert isinstance(a_       ,      np.ndarray		)
     return (v_star_dot.dot(a_		)) / (v_star.dot(a_		))


def     __lowerCAmelCase						(       )      ->	Optional[Any]:





     '''simple docstring'''





     SCREAMING_SNAKE_CASE					:			Any    	=       np.array([[2, 2 + 1j, 4], [2 - 1j, 3, 1j], [4, -1j, 1]]		)
     SCREAMING_SNAKE_CASE					:			str    	=       np.array([[1], [2], [3]]		)
     assert is_hermitian(a_		), f"""{a} is not hermitian."""
     print(rayleigh_quotient(a_       ,      a_		)		)

     SCREAMING_SNAKE_CASE					:			Union[str, Any]    	=       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()




'''simple docstring'''





def     __lowerCAmelCase						(       a_       ,      a_		)      ->	str:





     '''simple docstring'''





     if number < 0 or shift_amount < 0:
          raise ValueError('both inputs must be positive integers'		)

     SCREAMING_SNAKE_CASE					:			str    	=       str(bin(a_		)		)
     binary_number += "0" * shift_amount
     return binary_number


def     __lowerCAmelCase						(       a_       ,      a_		)      ->	str:





     '''simple docstring'''





     if number < 0 or shift_amount < 0:
          raise ValueError('both inputs must be positive integers'		)

     SCREAMING_SNAKE_CASE					:			Optional[Any]    	=       str(bin(a_		)		)[2:]
     if shift_amount >= len(a_		):
          return "0b0"
     SCREAMING_SNAKE_CASE					:			Dict    	=       binary_number[: len(a_		) - shift_amount]
     return "0b" + shifted_binary_number


def     __lowerCAmelCase						(       a_       ,      a_		)      ->	str:





     '''simple docstring'''





     if number >= 0:  # Get binary representation of positive number
          SCREAMING_SNAKE_CASE					:			Tuple    	=       '0' + str(bin(a_		)		).strip('-'		)[2:]
     else:  # Get binary (2's complement) representation of negative number
          SCREAMING_SNAKE_CASE					:			Union[str, Any]    	=       len(bin(a_		)[3:]		)  # Find 2's complement of number
          SCREAMING_SNAKE_CASE					:			Any    	=       bin(abs(a_		) - (1 << binary_number_length)		)[3:]
          SCREAMING_SNAKE_CASE					:			Optional[Any]    	=       (
              '1' + '0' * (binary_number_length - len(a_		)) + binary_number
          )

     if shift_amount >= len(a_		):
          return "0b" + binary_number[0] * len(a_		)
     return (
         "0b"
         + binary_number[0] * shift_amount
         + binary_number[: len(a_		) - shift_amount]
     )


if __name__ == "__main__":
 import doctest

 doctest.testmod()



