



import doctest

import projectq
from projectq.ops import H, Measure




def    UpperCAmelCase					(  lowercase__						:					projectq.cengines._main.MainEngine	):



			'''simple docstring'''





			a__					=  quantum_engine.allocate_qubit()
			H | qubit
			Measure | qubit
			return int(lowercase__	)


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

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

	# Generate a list of 10 random numbers
	_lowercase				:					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)






def    UpperCAmelCase					(  lowercase__						:					List[Any]				,					lowercase__						:					Optional[int]	):



			'''simple docstring'''





			print("""\nVertex Distance"""	)
			for i in range(lowercase__	):
						if dist[i] != float("""inf"""	):
									print(lowercase__				,					"""\t"""				,					int(dist[i]	)				,					end="""\t"""	)
						else:
									print(lowercase__				,					"""\t"""				,					"""INF"""				,					end="""\t"""	)
						print()




def    UpperCAmelCase					(  lowercase__						:					Optional[int]				,					lowercase__						:					Any				,					lowercase__						:					Tuple	):



			'''simple docstring'''





			a__					=  float("""inf"""	)
			a__					=  -1
			for i in range(lowercase__	):
						if (not vset[i]) and mdist[i] < min_val:
									a__					=  i
									a__					=  mdist[i]
			return min_ind




def    UpperCAmelCase					(  lowercase__						:					Optional[Any]				,					lowercase__						:					Tuple				,					lowercase__						:					List[Any]	):



			'''simple docstring'''





			a__					=  [float("""inf"""	) for _ in range(lowercase__	)]
			a__					=  [False for _ in range(lowercase__	)]
			a__					=  0.0

			for _ in range(v - 1	):
						a__					=  min_dist(lowercase__				,					lowercase__				,					lowercase__	)
						a__					=  True

						for i in range(lowercase__	):
									if (
									    (not vset[i])
									    and graph[u][i] != float("""inf"""	)
									    and mdist[u] + graph[u][i] < mdist[i]
									):
												a__					=  mdist[u] + graph[u][i]

			print_dist(lowercase__				,					lowercase__	)


if __name__ == "__main__":
	_lowercase				:					Any     					=int(input("""Enter number of vertices: """).strip())
	_lowercase				:					List[str]     					=int(input("""Enter number of edges: """).strip())

	_lowercase				:					List[str]     					=[[float("""inf""") for i in range(V)] for j in range(V)]

	for i in range(V):
		_lowercase				:					Dict     					=0.0

	for i in range(E):
		print("""\nEdge """, i + 1)
		_lowercase				:					Dict     					=int(input("""Enter source:""").strip())
		_lowercase				:					Optional[Any]     					=int(input("""Enter destination:""").strip())
		_lowercase				:					List[Any]     					=float(input("""Enter weight:""").strip())
		_lowercase				:					List[str]     					=weight

	_lowercase				:					List[Any]     					=int(input("""\nEnter shortest path source:""").strip())
	dijkstra(graph, V, gsrc)

