






from __future__ import annotations

from cmath import sqrt
def 		_a       ( a					:int      ,				a					:int      ,				a					:int					)				->     tuple[complex, complex]:

 if a == 0:
  raise ValueError('''Coefficient \'a\' must not be zero.'''					)
 a						    = b * b - 4 * a * c

 a						    = (-b + sqrt(a					)) / (2 * a)
 a						    = (-b - sqrt(a					)) / (2 * a)

 return (
     root_a.real if not root_a.imag else root_a,
     root_a.real if not root_a.imag else root_a,
 )
def 		_a       ( )				->     Optional[int]:
 a    ,	a						    = quadratic_roots(a=5      ,				b=6      ,				c=1					)
 print(F"""The solutions are: {solutiona} and {solutiona}"""					)


if __name__ == "__main__":
     main()










from typing import Any

import numpy as np
def 		_a       ( a					:np.ndarray					)				->     bool:
 return np.array_equal(a      ,				matrix.conjugate().T					)
def 		_a       ( a					:np.ndarray      ,				a					:np.ndarray					)				->     Any:
 a						    = v.conjugate().T
 a						    = v_star.dot(a					)
 assert isinstance(a      ,				np.ndarray					)
 return (v_star_dot.dot(a					)) / (v_star.dot(a					))
def 		_a       ( )				->     None:
 a						    = np.array([[2, 2 + 1j, 4], [2 - 1j, 3, 1j], [4, -1j, 1]]					)
 a						    = np.array([[1], [2], [3]]					)
 assert is_hermitian(a					), F"""{a} is not hermitian."""
 print(rayleigh_quotient(a      ,				a					)					)

 a						    = 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()


