'''simple docstring'''




import doctest

import projectq
from projectq.ops import H, Measure


def  lowerCamelCase__						(  SCREAMING_SNAKE_CASE :				Dict  ):
  UpperCAmelCase  							=		quantum_engine.allocate_qubit()
  H | qubit
  Measure | qubit
  return int(_lowerCAmelCase  )


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

  # initialises a new quantum backend
  _a			:	List[Any]								=  projectq.MainEngine()

  # Generate a list of 10 random numbers
  _a			:	Optional[int]								=  [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  lowerCamelCase__						(  SCREAMING_SNAKE_CASE :				str  ):
  UpperCAmelCase  							=		str(SCREAMING_SNAKE_CASE  ).strip()
  if not bin_string:
    raise ValueError('Empty string was passed to the function'  )
  UpperCAmelCase  							=		bin_string[0] == '-'
  if is_negative:
    UpperCAmelCase  							=		bin_string[1:]
  if not all(char in '01' for char in bin_string  ):
    raise ValueError('Non-binary value was passed to the function'  )
  UpperCAmelCase  							=		0
  for char in bin_string:
    UpperCAmelCase  							=		2 * decimal_number + int(SCREAMING_SNAKE_CASE  )
  return -decimal_number if is_negative else decimal_number


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

  testmod()


