



'''simple docstring'''







import doctest

import projectq
from projectq.ops import H, Measure
def 			_lowerCAmelCase(      UpperCAmelCase_      :	Dict						) ->							Optional[Any]:
							lowerCAmelCase__  =   quantum_engine.allocate_qubit()
							H | qubit
							Measure | qubit
							return int(snake_case_						)


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

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

		# Generate a list of 10 random numbers
		_UpperCamelCase  						=			[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"""





from cva import COLOR_BGR2GRAY, cvtColor, imread, imshow, waitKey
from numpy import divide, inta, multiply, ravel, sort, zeros_like






def 							A(    snake_case_		,  snake_case_=3						):
       """simple docstring"""





       lowercase__:							Tuple         =     int(mask / 2						)
       # copy image size
       lowercase__:							str         =     zeros_like(snake_case_						)
       for i in range(snake_case_		,  gray_img.shape[0] - bd						):
              for j in range(snake_case_		,  gray_img.shape[1] - bd						):
                     # get mask according with mask
                     lowercase__:							Optional[int]         =     ravel(gray_img[i - bd : i + bd + 1, j - bd : j + bd + 1]						)
                     # calculate mask median
                     lowercase__:							Union[str, Any]         =     sort(snake_case_						)[inta(divide((multiply(snake_case_		,  snake_case_						))		,  2						) + 1						)]
                     lowercase__:							Optional[Any]         =     median
       return median_img


if __name__ == "__main__":
  # read original image
  UpperCamelCase					=     imread("""../image_data/lena.jpg""")
  # turn image in gray scale value
  UpperCamelCase					=     cvtColor(img, COLOR_BGR2GRAY)

  # get values with two different mask size
  UpperCamelCase					=     median_filter(gray, 3)
  UpperCamelCase					=     median_filter(gray, 5)

  # show result images
  imshow("""median filter with 3x3 mask""", medianaxa)
  imshow("""median filter with 5x5 mask""", medianaxa)
  waitKey(0)






