



"""simple docstring"""







from unittest.mock import patch

import datasets
from datasets import Dataset


def       __SCREAMING_SNAKE_CASE      (   ):
		_lowercase							:      List[str]			=					Dataset.from_dict({"""col_1""": [3, 2, 0, 1]}	)

		with patch("""tqdm.auto.tqdm"""	) as mock_tqdm:
				datasets.disable_progress_bar()
				dset.map(lambda __UpperCAmelCase	: {"col_2": x["col_1"] + 1}	)
				mock_tqdm.assert_not_called()

				mock_tqdm.reset_mock()

				datasets.enable_progress_bar()
				dset.map(lambda __UpperCAmelCase	: {"col_2": x["col_1"] + 1}	)
				mock_tqdm.assert_called()





"""simple docstring"""

import doctest

import projectq
from projectq.ops import H, Measure




def 			lowercase__  (    lowerCAmelCase :    projectq.cengines._main.MainEngine       )       ->					int:






    """simple docstring"""




    UpperCAmelCase  	=    quantum_engine.allocate_qubit()
    H | qubit
    Measure | qubit
    return int(lowerCAmelCase       )


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

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

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

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

   print('''Random numbers''', random_numbers_list)



