




"""simple docstring"""

import doctest

import projectq
from projectq.ops import H, Measure



def 				a (						__snake_case     :				projectq.cengines._main.MainEngine  ):



				'''simple docstring'''





				UpperCAmelCase_					:Union[str, Any]      			=      quantum_engine.allocate_qubit()
				H | qubit
				Measure | qubit
				return int(__snake_case  )


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

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

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

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

						print("Random numbers", random_numbers_list)








"""simple docstring"""

def 				a (						__snake_case     :				int  ):



				'''simple docstring'''





				if not isinstance(__snake_case,    __snake_case  ) or number < 0:
								raise ValueError('''Input must be a non-negative integer'''  )

				UpperCAmelCase_					:Optional[Any]      			=      number & ~(number - 1)
				UpperCAmelCase_					:List[str]      			=      0
				while intermediate:
								intermediate >>= 1
								index += 1
				return index - 1


if __name__ == "__main__":
						import doctest

						doctest.testmod(verbose=True)


