



import doctest

import projectq
from projectq.ops import H, Measure



def  lowercase    (				SCREAMING_SNAKE_CASE__    :		Union[str, Any]			)					->       List[str]:
 _snake_case      :					List[Any]					=   quantum_engine.allocate_qubit()
 H | qubit
 Measure | qubit
 return int(_lowerCAmelCase			)


if __name__ == "__main__":
 doctest.testmod()

 # initialises a new quantum backend
 a__      =		projectq.MainEngine()

 # Generate a list of 10 random numbers
 a__      =		[get_random_number(quantum_engine) for _ in range(10)]

 # Flushes the quantum engine from memory
 quantum_engine.flush()

 print("""Random numbers""", random_numbers_list)





def  lowercase    (				SCREAMING_SNAKE_CASE__    :		int			)					->       int:
 if not isinstance(SCREAMING_SNAKE_CASE__			,    SCREAMING_SNAKE_CASE__			):
  raise TypeError("""recursive_lucas_number accepts only integer arguments."""			)
 if n_th_number == 0:
  return 2
 if n_th_number == 1:
  return 1

 return recursive_lucas_number(n_th_number - 1			) + recursive_lucas_number(
     n_th_number - 2			)



def  lowercase    (				SCREAMING_SNAKE_CASE__    :		int			)					->       int:
 if not isinstance(SCREAMING_SNAKE_CASE__			,    SCREAMING_SNAKE_CASE__			):
  raise TypeError("""dynamic_lucas_number accepts only integer arguments."""			)
 _snake_case		,      _snake_case      :					Any					=   2, 1
 for _ in range(SCREAMING_SNAKE_CASE__			):
  _snake_case		,      _snake_case      :					Union[str, Any]					=   b, a + b
 return a


if __name__ == "__main__":
  from doctest import testmod

  testmod()
  a__      =		int(input("""Enter the number of terms in lucas series:\n""").strip())
  print("""Using recursive function to calculate lucas series:""")
  print(""" """.join(str(recursive_lucas_number(i)) for i in range(n)))
  print("""\nUsing dynamic function to calculate lucas series:""")
  print(""" """.join(str(dynamic_lucas_number(i)) for i in range(n)))
